Author Topic: bug in wxSmith  (Read 6682 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
bug in wxSmith
« 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]
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: bug in wxSmith
« Reply #1 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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: bug in wxSmith
« Reply #2 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...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: bug in wxSmith
« Reply #3 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]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: bug in wxSmith
« Reply #4 on: June 21, 2010, 05:03:30 pm »
I kindly ALWAYS include all information about my working environment in my signiture.
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: bug in wxSmith
« Reply #5 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: bug in wxSmith
« Reply #6 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]

stefanos_

  • Guest
Re: bug in wxSmith
« Reply #7 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