Search found 80 matches

by Big Muscle
Thu Jan 23, 2020 10:16 am
Forum: C++ Development
Topic: Showing images from a video stream
Replies: 93
Views: 6724

Re: Showing images from a video stream

GTK is the priority, same application will be used on MSW but without cameras (only static image from file). I just noticed when drawing wxImage with wxGraphicsContext::DrawBitmap: MSW Direct2D: there are 2 conversions wxImage->wxBitmap and wxBitmap->wxGraphicsBitmap, both pixel-by-pixel copy. GTK+3...
by Big Muscle
Wed Jan 22, 2020 8:12 pm
Forum: C++ Development
Topic: Showing images from a video stream
Replies: 93
Views: 6724

Re: Showing images from a video stream

on Raspberry Pi 4 that needs to display images from the camera up to 60 Hz How the camera gets connected to RPi? With USB camera you most likely will not get 60 FPS. Method with background image grabbing and thread events looks fine for me. You could also use double-buffering in order to be able to...
by Big Muscle
Wed Jan 22, 2020 9:17 am
Forum: C++ Development
Topic: Showing images from a video stream
Replies: 93
Views: 6724

Re: Showing images from a video stream

What method would you prefer for optimum performance when you have application on Raspberry Pi 4 that needs to display images from the camera up to 60 Hz and the application needs to stay interactive? a) Camera thread grabs images from the camera as fast as possible (60 Hz) and memcpy's the image da...
by Big Muscle
Thu Jan 16, 2020 11:07 am
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 248

Re: How to use wxDCOverlay?

Thank you, it works! I just modified it a but not to recreate wxImage everytime, wxBitmap m_bmpCachedPlot replaced with wxImage m_imgCachedPlot: if (!m_imgCachedPlot.IsOk() || rc.GetSize() != m_imgCachedPlot.GetSize()) { m_imgCachedPlot.Create(rc.GetSize()); m_imgCachedPlot.InitAlpha(); } memset(m_i...
by Big Muscle
Wed Jan 15, 2020 8:10 pm
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 248

Re: How to use wxDCOverlay?

There is ClearRectangle function in wxGraphicsContext but its implementation is empty so it does nothing. DrawRectangle is not suitable because it will draw rectangle together with the existing content. My current multi-platform (GTK + MSW) solution that seems to be working is to re-create wxImage e...
by Big Muscle
Wed Jan 15, 2020 9:32 am
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 248

Re: How to use wxDCOverlay?

New Pagodi: yes, this seems the classical approach and I probably stay with it, it also allows me to cache separate bitmap for more plots and then just compose them when needed. Although the usage seems much more complicated, e.g. how to plot the lines into the transparent wxMemoryDC so I can compos...
by Big Muscle
Tue Jan 14, 2020 12:07 pm
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 248

How to use wxDCOverlay?

Our application has a canvas that draws some plots on X-Y axis. We would like to draw pointer that shows the measurement time in the plot. The current approach is to do everything in wxEVT_PAINT event, but it is not good because changing the time pointer redraws whole canvas that can be slow. Our id...
by Big Muscle
Mon Nov 25, 2019 5:33 pm
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

It is Raspbian, I have not change anything according to gcc.
by Big Muscle
Mon Nov 25, 2019 12:49 pm
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

I tested your function to generate the log on crash and the output is very similar. __default_sa_restorer is last line of the backtrace. I can now say that the issue is not WX-related. ./COurApp() [0x80acc] ./COurApp() [0x81cc4] ./COurApp() [0x400680] /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_...
by Big Muscle
Sun Nov 24, 2019 9:10 am
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

I see your frames 1 and 2 are empty, there is even no __default_sa_restorer. Is it Raspberry/ARM with g++ ?

Did you compile wxWidgets library on your own? If yes, what settings did you use during the building?
by Big Muscle
Fri Nov 22, 2019 8:07 am
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

I replaced AddAll() with these both two and now generated ZIP file contains two same XML files with same "bad" stack trace as before.

If I have time, I will look deeply into src/unix/stackwalk.cpp, maybe there is something that stops other frames to be written into exception log.
by Big Muscle
Thu Nov 21, 2019 11:04 am
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

After long experiments, I finally discovered the bug. You were probably right with the stack corruption. The bug was caused by memcpy copying data to invalid location, thus behaviour was unpredictable and it crashed randomly - probably when it overwrote some other important data on the stack. Now we...
by Big Muscle
Wed Nov 13, 2019 5:59 pm
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

if "Thermal" is not a main thread then.... never worked with cairo... bit this is some drawings library. and if it is called in some secondary thread -> then you are doing drawings from secondary thread... but wxWidgets drawing cannot be issued from secondary thread, only from main. do not call wxW...
by Big Muscle
Wed Nov 13, 2019 12:24 pm
Forum: General Development
Topic: Fatal exceptions logging
Replies: 20
Views: 1052

Re: Fatal exceptions logging

And currently we're hunting for one specific crash. When attaching GDB, it randomly and very rarely crashes with the following stack trace: Thread 1 "Thermal" received signal SIGSEGV, Segmentation fault. 0x7692c940 in ?? () from /usr/lib/arm-linux-gnueabihf/libcairo.so.2 (gdb) bt #0 0x7692c940 in ()...
by Big Muscle
Wed Nov 13, 2019 11:27 am
Forum: Platform Related Issues
Topic: How to react to a USB stick plugged? Or how to check if a file exists in /dev/?
Replies: 6
Views: 395

Re: How to react to a USB stick plugged? Or how to check if a file exists in /dev/?

We periodically check this and never had any problems with it:

Code: Select all

wxFindFirstFile("/dev/sd??")