Author Topic: wxsmith crashing after upgrade to Ubuntu 17.04  (Read 28367 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #15 on: June 02, 2017, 08:33:16 pm »
Libraries are fine. Just wx 3.0 had too many changes that have landed in a single batch and 16.01 and even trunk has not been fixed to reflect them.

I've seen the corrupted .h and .cpp files, but I'm not sure how to reproduce it.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #16 on: June 02, 2017, 10:22:13 pm »
Ok, I've got the crash and the file corruption using the steps. Now lets see if I can fix it...
(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 awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #17 on: June 02, 2017, 10:53:45 pm »
oBFusCATed, thanks so much. As a test, thinking perhaps one of the other programs that I have loaded had created problems with the libraries, I created a new virtual machine using VirtualBox and set it up with a brand new installation of Ubuntu 17.04. At this point, there were no libwx* libraries in /usr. I then loaded codeblocks and  codeblocks-contrib, and opened the sample project that I included above. Once again, wxsmith only loaded part of the widgets, never showed its toolbar, and C:B crashed when I closed it. Don't know if this helps, but one more data point ...

Offline awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #18 on: June 03, 2017, 01:10:35 am »
And an additional data point that may or may not be any help - I also set up a virtual machine with a fresh installation of Ubuntu 16.04. Did all updates; no libwx* libraries in /usr at this point. Installed codeblocks from the Ubuntu repositories - and had the same exact trouble. So ... not something specific about Ubuntu 17.04, since C:B was definitely working before on 16.04. :(

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #19 on: June 04, 2017, 02:27:40 pm »
The corruption of the files should be fixed in trunk.

I'm no longer able to reproduce the crash.
Can you try building from trunk and let me know if the crash is still present?
(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 awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #20 on: June 04, 2017, 06:03:42 pm »
I will try! My first feeble attempts to compile C:B were not successful. Are these still the most up-to-date instructions: http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux ? This advocates building against wxWidgets 2.8 - but I note that 16.01 has been built against wxWidgets 3.0 for some time. What is the current recommendation - build against 2.8? Build against 3.02? or 3.03? I presume it is premature to build against 3.1?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #21 on: June 04, 2017, 06:17:03 pm »
Use the latest version of wx3.0.x that is available as a package on your system.
If you build against wx2.8 the problem won't happen.
And for sure you don't want to build wx from scratch!
There should be a -dev or -devel package for wxGTK. Install it and you're good to go.
(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 awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #22 on: June 04, 2017, 11:51:25 pm »
oBFusCATed,

I feel like I am being terribly dense and troublesome - but why not build wx from scratch? That's what I normally have done for developing programs. Is it that wx has to be built a certain way ... ?

Again, thank you so much for all the trouble you have taken, and your patience with me -- I'm not a newbie with programming or with C:B, but this adventure has taken me into areas that I simply have never done before.

Offline awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #23 on: June 05, 2017, 01:12:54 am »
Okay, I compiled the trunk against the repository wxWidgets development environment - 3.02. Compiled fine. Started C:B and opened the project attached in an earlier thread - the one that sent me down this path in the first place. Once again, wxsmith is not showing the full contents of the frame, nor is it showing its toolbars. When I then close the project, C:B hangs with a blank dialog box.

Attached are the C:B project that I used (which used to work just fine in earlier versions), and a backtrace.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #24 on: June 05, 2017, 01:50:04 am »
You're hitting this problem: http://trac.wxwidgets.org/ticket/16636
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #25 on: June 05, 2017, 02:29:40 am »
Can you show me a screenshot of the broken rendering of the frame?
I don't get any crashes with your project. :(
(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 awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #26 on: June 05, 2017, 03:36:34 pm »
Here is a screen shot of the incomplete rendering of the frame - you can see in the explorer on the left that there ought to be radio buttons, spin control, etc. - but on the right, only the first set of in-most sizer boxes are rendering, a static sizer box with a list box that also contains a horizontal sizer with a couple of buttons.

The second screen shot shows what it looks like when it freezes on trying to close the project. Interestingly, it doesn't always freeze - the first time today, it let me close out the project, asking if I wanted to save changes. The second time, the empty dialog box as shown is the first and only thing that appears on trying to close the project.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #27 on: June 05, 2017, 05:17:05 pm »
For me everything renders fine. :(

Can someone with ubuntu try to reproduce the problem?
(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 awake

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #28 on: June 05, 2017, 06:18:11 pm »
Trying a couple of new things to see if they shed any light.

  • I set up a virtual machine on another computer, one that is using a 4th generation Core i5 rather than the 7th generation Core i5 that is in my laptop - just in case the difference in the CPU was affecting things. I installed Ubuntu 17.04, did all updates, and installed the repository version of C:B 16.01. I opened it and tried wxsmith on the project. Good news: I never got a freeze or a crash when closing the project, though only half-a-dozen tries - possible it would have frozen eventuall - ??. Bad news: wxsmith still did not render the frames correctly, did not show its toolbar, etc. When I tried building a new project, I was able to use wxsmith to create a frame ... up to a point. Once it got complex enough, again it starting acting wonky, and thereafter when I opened that project, again it showed only part of the frame, and did not show its toolbar. So ... does seem like there *could* be some issue related to the CPU, but overall the basic problem remains.
  • I tried building C:B against wxWidgets 2.8.12. I started by uninstalling and thoroughly cleaning up any traces of wxWidgets-3 development files. Then I downloaded the latest wxGTK-2.8 source and compiled it as a monolithic library. To do so I had to include CXXFLAGS='-Wno-error=narrowing'. After that, it compiled and I was able to install it.
    • Then I compiled the release version of C:B 16.01, downloaded as a .tar archive from www.codeblocks.org, using the new wx-2.8 monolithic library. I had to add CXXFLAGS='-I<codeblocks src/include directory>' to get some of the plugins to compile - this is perhaps because I was building from a subdirectory rather than directly in the codeblocks directory. This compiled fine, but when I ran it, it did not think ANY plugins were installed - even though I can see them in the /usr/local/lib/etc. directories.
    • So I uninstalled this version, again making sure all traces were cleaned up, and downloaded the trunk from svn. I bootstrapped, configured --with-contrib-plugins=all, make, make install. Clean make, AND THIS VERSION WORKS!!! Now it renders the frames of the existing projects successfully, and it doesn't seem to crash as complexity is added to the frames. Note that as I use it more, we will see if that crash-free status continues ...
So, at this point, I have a working version of C:B. I don't know if building it against wx-2.8 will have any limitations - ? But so glad to be able to get back to work on some projects!

oBFusCATed, thank you, thank you, thank you again for all of your help. I hope that the data I've provided will help narrow the focus to fix future versions of the Ubuntu version of C:B.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Reply #29 on: June 05, 2017, 07:44:20 pm »
The problem is not in the CPU, but I guess in the GPU drivers. Or it might be something that is happening only on ubuntu.

If you just open the attached project does it render correctly or it is always 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!]