Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: frithjofh on June 20, 2010, 07:30:32 pm

Title: bug in wxSmith
Post by: frithjofh on June 20, 2010, 07:30:32 pm
hello everybody,

I think I just found a bug in wxSmith and a behavior which is not exactly a bug, but annoying. the bug is reproduceable on my machine:
a) open a dialog in the wxSmith editor
b) change a setting like a property ( for instance change from wxSUNKEN_BORDER to something else)
c) close the wxs file without saving
result: c::b crashes

the annoying behavior is that whenever you mark a new object in the wxSmith editor the properties dialog switches to the event tab. you switch back to the properties tab, select another item and it switches back to events tab. shouldn't be that way and wasn't before ...

I attach the crash report

regards

frithjof

[attachment deleted by admin]
Title: Re: bug in wxSmith
Post by: oBFusCATed on June 20, 2010, 09:43:35 pm
I think I just found a bug in wxSmith and a behavior which is not exactly a bug, but annoying. the bug is reproduceable on my machine:
a) open a dialog in the wxSmith editor
b) change a setting like a property ( for instance change from wxSUNKEN_BORDER to something else)
c) close the wxs file without saving
result: c::b crashes
Confirmed on gentoo linux 64bit, the debuggers branch

the annoying behavior is that whenever you mark a new object in the wxSmith editor the properties dialog switches to the event tab. you switch back to the properties tab, select another item and it switches back to events tab. shouldn't be that way and wasn't before ...
Agreed, it is extremely annoying...
Title: Re: bug in wxSmith
Post by: MortenMacFly on June 21, 2010, 08:12:56 am
Unconfirmed on Windows. For me it works like expected. Is this a Linux issue, probably? Please ALWAYS state the platform you are using...
Title: Re: bug in wxSmith
Post by: Jenna on June 21, 2010, 09:33:32 am
The first (crash) does not happen for all properties, but at least for style wxSunkenBorder in a wxDialog.

The second (always show event-tab) is there since the newer version of wxPropGrid in the debugger-branch and is now in trunk also.
Might also be related to the move of wxPropGrid into sdk, but I do not think, that that is the cause.

What's more if the properties tab gets opened the first time, the left part (with the properties names) is very small and has to be resized to be usable, but remembers the size until C::B is closed.

Happens for me on linux (debian 64-bit) and windows (xp sp3) in the exact same way.

The crash is in propgrid.cpp line 7441.
If I try to step into OnMeasureImage it crashes.
m_wndEditor is 0 (would lead to an assert in debug-mode), but p seems to be valid (at least not null or some other typical value.
A breakpoint in OnMeasureImage is not reached if the crash appears.

Crash report attached.

[attachment deleted by admin]
Title: Re: bug in wxSmith
Post by: frithjofh on June 21, 2010, 05:03:30 pm
I kindly ALWAYS include all information about my working environment in my signiture.
Title: Re: bug in wxSmith
Post by: oBFusCATed on June 21, 2010, 05:31:31 pm
Probably this is not a good practice, because signatures change over time, but the posts stay the same.
Title: Re: bug in wxSmith
Post by: Jenna on June 21, 2010, 11:51:35 pm
A possible patch (against trunk) for the crash is attached, that hopefully does not break anything.
It's not well tested (not at all on windows), but seems to work.


[attachment deleted by admin]
Title: Re: bug in wxSmith
Post by: stefanos_ on July 06, 2010, 09:35:16 am
Crashing regards to wxSUNKEN_BORDER is reproducible under Windows XP SP3 with the latest revision (6384).

I have also tested it on 6379 and the crashing remains the same. I have also applied the patch and nothing new is happening; the bug remains the same.

Specs:

OS:                  Windows XP Professional SP3
Compiler:           TDM's GCC 4.5.0
wxWidgets:        wxMSW-2.8.10