Author Topic: wxSmith crashes when adding bitmap button  (Read 21338 times)

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
wxSmith crashes when adding bitmap button
« on: March 19, 2012, 03:00:58 am »
Ubuntu 11.10 (oneiric) 64 bits, wxWidgets 2.8.12, code::blocks svn 7899

If I try to add a bitmap button to any container, the program crashes, opening a totally blank crash report window (nothing on it except the window system close button). If I close it the program closes and any changes are lost.

Any suggestions?

TIA,
Ken

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #1 on: March 19, 2012, 04:00:02 am »
Ubuntu 11.10 (oneiric) 64 bits, wxWidgets 2.8.12, code::blocks svn 7899

If I try to add a bitmap button to any container, the program crashes, opening a totally blank crash report window (nothing on it except the window system close button). If I close it the program closes and any changes are lost.

I managed to get one bug report, sending attached as a .zip file, in the hope this helps.

Again, thanks for any help,
Ken

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #2 on: March 26, 2012, 10:57:39 pm »
Ubuntu 11.10 (oneiric) 64 bits, wxWidgets 2.8.12, code::blocks svn 7899

If I try to add a bitmap button to any container, the program crashes, opening a totally blank crash report window (nothing on it except the window system close button). If I close it the program closes and any changes are lost.

I managed to get one bug report, sending attached as a .zip file, in the hope this helps.


Whatever it was, it's gone in the new nightlie.

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #3 on: July 14, 2012, 02:12:39 am »
Ubuntu 11.10 (oneiric) 64 bits, wxWidgets 2.8.12, code::blocks svn 7899

If I try to add a bitmap button to any container, the program crashes, opening a totally blank crash report window (nothing on it except the window system close button). If I close it the program closes and any changes are lost.

I managed to get one bug report, sending attached as a .zip file, in the hope this helps.


Whatever it was, it's gone in the new nightlie.

It's been back for a while. I've upgraded both Ubuntu and codeblocks, and the problem persists. Last time it generated a report in Ubuntu, the error seems to be trying to access an invalid memory area. Is there a default bitmap that is used? COuld the path to it be corrupted on an installation?

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #4 on: July 14, 2012, 03:23:45 am »
It's been back for a while. I've upgraded both Ubuntu and codeblocks, and the problem persists. Last time it generated a report in Ubuntu, the error seems to be trying to access an invalid memory area. Is there a default bitmap that is used? COuld the path to it be corrupted on an installation?

After updating: Ubuntu 12.04 (precise) 64 bits, wxWidgets 2.8.12, code::blocks svn 8059 (from pasgui; got the same with jen's)

Repeating the issue:

If I try to add a bitmap button to any container, the program crashes, opening a totally blank crash report window (nothing on it except the window system close button). If I close it the program closes and any changes are lost.

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #5 on: July 14, 2012, 04:06:50 am »
Examining my install, I found a local (under $HOME) directory called .codeblocks, under which there was a /share/codeblocks/scripts directory; it contained just one file, startup.script, which duplicated /usr/share/codeblocks/startup.script; i eliminated the version under the local dir and apparently the problem is solved. I wonder if the local directory should exist at all.

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #6 on: July 14, 2012, 05:10:30 am »
Nope, that was not it, happening again. If someone could please help me, I'd be immensely grateful, this is driving me nuts.

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxSmith crashes when adding bitmap button
« Reply #7 on: March 01, 2013, 09:27:55 am »
Nope, that was not it, happening again. If someone could please help me, I'd be immensely grateful, this is driving me nuts.
I get it too using the new code blocks with wxpack. I can use the old version nightly 8500 and I do not get a crash when adding a bitmap button. Is there any fix for this?

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #8 on: March 01, 2013, 12:46:41 pm »
Nope, that was not it, happening again. If someone could please help me, I'd be immensely grateful, this is driving me nuts.
I get it too using the new code blocks with wxpack. I can use the old version nightly 8500 and I do not get a crash when adding a bitmap button. Is there any fix for this?

I still get it. New machine, Ubuntu 12.10 64 bits, code::blocks 12.11. The workaround I found is that if you open the wxSmith layout file but change the tab on the management pane to something other than "Resources", you can add the wxBitmapButton without a crash, but you have to:
a) add the wxBitmapButton to the layout;
b) save everything;
c) close  the layout file;
d) re-open the layout file so that you can work on the element you just added. Not particularly convenient. 

Awareness

  • Guest
Re: wxSmith crashes when adding bitmap button
« Reply #9 on: March 04, 2013, 09:34:20 pm »
I am using Windows7 and wxWidgets(same version I think) and I have the same problem.If you add a bitmap button when the "Resources" tab is selected,or if you add the bitmap button and then select "Resources" tab, Codeblocks crashes...

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #10 on: March 04, 2013, 09:38:49 pm »
I am using Windows7 and wxWidgets(same version I think) and I have the same problem.If you add a bitmap button when the "Resources" tab is selected,or if you add the bitmap button and then select "Resources" tab, Codeblocks crashes...

At least now I know I'm not crazy. :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith crashes when adding bitmap button
« Reply #11 on: March 05, 2013, 12:49:01 am »
Works here, gentoo linux r8897.

Please describe the exact steps to reproduce the problem.
If you provide a sample project one step from the crash might help, too.

Edit: talked too early, I've made it crash, by placing the button inside a panel.
(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 kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #12 on: March 05, 2013, 01:02:14 am »
Works here, gentoo linux r8897.

Please describe the exact steps to reproduce the problem.
If you provide a sample project one step from the crash might help, too.

Edit: talked too early, I've made it crash, by placing the button inside a panel.

Steps:
- use the wizard to create a new dialog-based wxWidgets project;
- open the dialog layout for editing with wxSmith;
- add a wxBitmapButton to the dialog, anywhere;
- BOOM.

The project one step from crashing is the initial project created with Project|New.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith crashes when adding bitmap button
« Reply #13 on: March 05, 2013, 01:10:06 am »
This is a pretty strange issue :(

This is the bt from my installed version of C::B
Code
(gdb) bt
#0  0x00007ffff7a9f964 in wxBoolProperty::GetValueAsString(int) const () from /usr/lib64/libcodeblocks.so.0
#1  0x00007ffff7a7f8c0 in wxPGProperty::GetValueString(int) const () from /usr/lib64/libcodeblocks.so.0
#2  0x00007ffff7a801e1 in wxPGDefaultRenderer::Render(wxDC&, wxRect const&, wxPropertyGrid const*, wxPGProperty*, int, int, int) const () from /usr/lib64/libcodeblocks.so.0
#3  0x00007ffff7a911dd in wxPropertyGrid::DoDrawItems(wxDC&, wxPGProperty const*, wxPGProperty const*, wxRect const*, bool) const () from /usr/lib64/libcodeblocks.so.0
#4  0x00007ffff7a91bbc in wxPropertyGrid::DrawItems(wxDC&, unsigned int, unsigned int, wxRect const*) () from /usr/lib64/libcodeblocks.so.0
#5  0x00007ffff7a920a7 in wxPGCanvas::OnPaint(wxPaintEvent&) () from /usr/lib64/libcodeblocks.so.0
#6  0x00007ffff5da9e26 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#7  0x00007ffff5da9fab in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib64/libwx_baseu-2.8.so.0
#8  0x00007ffff5daa2e4 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#9  0x00007ffff6449c40 in wxWindow::GtkSendPaintEvents() () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#10 0x00007ffff644a108 in ?? () from /usr/lib64/libwx_gtk2u_core-2.8.so.0
#11 0x00007ffff57be618 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#12 0x00007ffff54414f3 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
This seems like a wxPropGrid issue...

I was not able to reproduce the crash, when I tried with C::B and wxSmith compiled inside C::B :(
Pretty strange.

Edit: Running optimized builds is enough to reproduce the crashes, still no clue where is the problem :(
« Last Edit: March 05, 2013, 01:43:25 am by oBFusCATed »
(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 kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxSmith crashes when adding bitmap button
« Reply #14 on: March 05, 2013, 02:02:16 am »
This is a pretty strange issue :(

(snip)

Edit: Running optimized builds is enough to reproduce the crashes, still no clue where is the problem :(

At least now other people are having the same trouble, for almost an year I was resigned to this being some sort of private curse... I can try to generate an error report again, the problem being that 9 times out of ten the report itself got wiped out.

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxSmith crashes when adding bitmap button
« Reply #15 on: March 12, 2013, 02:11:03 pm »
Is there anyway to fix this yet?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith crashes when adding bitmap button
« Reply #16 on: March 12, 2013, 09:47:18 pm »
I won't be able for the next two-three weeks... and this is really hard issue, because it is pretty random -> it might be anything that is broken.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxSmith crashes when adding bitmap button
« Reply #17 on: March 13, 2013, 01:02:47 am »
I can't reproduce the crash. I'm using Unofficial C::B release Unofficial Code::Blocks installer for Windows (svn 8896) under Windows XP.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith crashes when adding bitmap button
« Reply #18 on: March 13, 2013, 03:56:54 am »
ollydbg: debug or release build of C::B are you using? This happens only in release build, turn of optimizations and it is done.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxSmith crashes when adding bitmap button
« Reply #19 on: March 13, 2013, 04:15:20 am »
ollydbg: debug or release build of C::B are you using? This happens only in release build, turn of optimizations and it is done.
Typos in your post: of->off, done->gone.

I'm not sure, I should ask ptDev, BTW: I never build a "-O2" version of C::B myself. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: wxSmith crashes when adding bitmap button
« Reply #20 on: March 15, 2013, 01:52:30 pm »
I don't recall ever changing the default target or its settings in most plugin projects.
I certainly never did that with wxSmith, so it probably is indeed getting compiled without optimizations.

Post build, I do try to reduce the executables size by both removing their symbols and compressing them.

It goes without saying, if anyone does get a crash with my binaries, they should try to reproduce it with the nightly build instead. While I try to keep my local changes to a minimum, there are enough of them to warrant not using my build as a representation of the state of the trunk.

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: wxSmith crashes when adding bitmap button
« Reply #21 on: April 13, 2013, 06:02:38 pm »
I have the same problem with C::B 12.11 with MinGW. Everytime I try to add a bitmap button, codeblocks crashes. Hiding the resources tab helps at first but I can't do anything without the resources. As soon as I try to ad a bitmap it crashes again.

I switched back to version 10.05 so at least I could finish my work. Would be nice if there was a patch for this as the new C::B has a lot more features.

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxSmith crashes when adding bitmap button
« Reply #22 on: April 29, 2013, 11:08:02 pm »
Yes what he said above it happens in 12.11 and it happens when you add a bitmap button then change to another tab besides resources. You can add all your bitmap buttons while a different tab is on then save the project and close it then reopen it and as long as you dont add any more bitmap buttons it works fine.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith crashes when adding bitmap button
« Reply #23 on: May 01, 2013, 05:00:15 pm »
The cause for the issue seems to be an unitialised bool member-variable used with WXS_BOOL-macro.

It should be fixed in trunk (svn r9023).

Can anyone with this issue test it and give feedback ?

Sabesto

  • Guest
Re: wxSmith crashes when adding bitmap button
« Reply #24 on: May 24, 2013, 06:49:24 pm »
Can confirm that this works with rev 9114 (windows, built from svn)

This did not work for me with rev 8629