Search found 10 matches

by Telemotive
Wed Sep 27, 2017 9:17 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

You said you got an increase of GDI handles when you opened end closed the settings window. Shouldn't the change be visible immediately ? Yea, that is true, but that was just a test to check if there is a leak somewhere in general. Our guess is that there might be a leak in the progress panel or ou...
by Telemotive
Tue Sep 26, 2017 2:13 pm
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

Hey, again. Thanks for your suggestions doublemax and eranon (especially for the Dr. Memory testing). First your questions: Do you have any class that derives from wxNotebook? yes, but there are too many to show them all here Have you ever tried to compile your project under wx 3.1.x? Or did you jus...
by Telemotive
Mon Sep 18, 2017 4:10 pm
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

Did you try to do a dynamic code analysis through tools like BoundsChecker, Dr. Memory, Purify... https://en.wikipedia.org/wiki/Dynamic_program_analysis ? Hey, we already use Dr. Memory and I have also checked the reported leaks, but I am not able to identify the source. Maybe you can help me: This...
by Telemotive
Mon Sep 18, 2017 10:12 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

PB wrote:GDI handles can also leak outside obvious painting code, e.g. allocating wxFont, wxBitmap, wxIcon etc. to pass it to a control....
Thanks, but I already checked our usages of wxFont, wxBitmap, wxIcon etc. and did not find any issues.
by Telemotive
Mon Sep 18, 2017 10:11 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

I think it's safe to say that there is no memory leak in that paint event code. Also, the number of handles seems almost constant after the window has been shown once. Just to be sure: How is the paint event handler connected? What do you mean with connected? We just overwrote the wxPanel onPaint()...
by Telemotive
Thu Sep 14, 2017 7:07 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

Here the Code void SettingsGridPanel::onPaint(wxPaintEvent& event) { wxPaintDC panelDC(this); if(d_currentBitmap != NULL) { //aufpassen dassmer nicht zu weit scrollen wxSize clientSize = GetClientSize(); long horizontalCorrection = d_scrollPosition.GetWidth()*SCROLLBAR_STEPSIZE; if((d_currentBitmap-...
by Telemotive
Tue Sep 12, 2017 10:24 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

I am writing a test software where you can do the same test sequence for n times. You can set the count of cycles and some more settings in a settings page. I opened and closed the settings page multiple times to check if the GDI objects and User objects increase. When reaching the 10000 the program...
by Telemotive
Tue Sep 12, 2017 8:10 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

Yes. Check the use of wxPen, wxBrush, wxBitmap etc. in the paint event handler and make sure they are all destroyed properly. BTW: How many GDI objects are there initially when the program starts? The number of GDI objects is about 160 after the program start, User-Objects are about 190. I checked ...
by Telemotive
Fri Sep 08, 2017 7:00 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

Re: SetBackground UnRef causing exception

Hard to tell with this little information. As the crash happens at destruction of a wxBrush, my best guess is that you have a GDI handle leak somewhere. Open the taskmanager and enable display for the columns "user objects" and "GDI objects". If one of these increase over time the application shoul...
by Telemotive
Thu Sep 07, 2017 8:46 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 27
Views: 4097

SetBackground UnRef causing exception

Hey guys, I am having a simmilar issue as described here https://forums.wxwidgets.org/viewtopic.php?t=36096 . It sometimes happens after a few hours, sometimes after a few weeks. Maybe someone knows the issue and can help me. I am using wxWidgets 2.8.11 statically linked under Windows. Code: void Se...