Hi Alan see my replies between your questions
> This certainly qualifies as a release-critical wxwidgets bug. And you > have certainly supplied enough information that Phil should find this > to be straightforward to reproduce. easy to reproduce on the PLplot code, but not immediatley obvious to find the root cause. My speculation is that it happens because this function located in \bindings\wxwidgets\wxPLplotwindow.h void wxPLplotwindow<WXWINDOW>::OnCreate( wxWindowCreateEvent &event ) { if ( !m_created ) is not automatically called in an wxwidgets event triggered by this code in wxPLplotDemo.cpp, the Create() call wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create( NULL, wxID_ANY, wxT( "wxPLplotDemo" ) ); this can be easily confirmed if you put a print statement here void wxPLplotwindow<WXWINDOW>::OnCreate( wxWindowCreateEvent &event ) { wxLogDebug("wxPLplotwindow<WXWINDOW>::OnCreate"); if ( !m_created ) so, my solution is simple, it's just to specifically call the code that is inside void wxPLplotwindow<WXWINDOW>::OnCreate I did this by doing a function that I called CreatePLplotstream(), that contains the stream initialization code that is in wxPLplotwindow<WXWINDOW>::OnCreate so, in the demo code the call is now wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create( NULL, wxID_ANY, wxT( "wxPLplotDemo" ) ); frame->CreatePLplotstream(); > Do you see any use of (presumably deprecated) wxwidgets-2.x calls > in our wxwidgets binding or device driver? If so, that might be > a good place to start to work on this issue. not sure, I'll check events are explained here http://docs.wxwidgets.org/3.1/overview_events.html I always do a static event table in my code. it's also possible to do a dynamic event (with ::Bind()) actually in the PLplot code this is done another way, that I am not sure about //We use connect instead of Bind for compatiblity with wxWidgets 2.8 //but should move to bind in the future. WXWINDOW::Connect( wxEVT_CREATE, wxWindowCreateEventHandler( wxPLplotwindow<WXWINDOW>::OnCreate ) ); -Pedro ----- Original Message ----- From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca> To: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "Pedro Vicente" <pedro.vice...@space-research.org> Cc: "PLplot development list" <plplot-devel@lists.sourceforge.net> Sent: Wednesday, December 14, 2016 7:16 PM Subject: Re: [Plplot-devel] wxPLplotDemo.cpp -- linux build error > On 2016-12-14 18:00-0500 Pedro Vicente wrote: > >> Hi Alan >> >>> What happens if you try a Ubuntu platform with a system version >>> of wxwidgets version = 3.0.x? Same question for a Ubuntu >>> platform with wxwidgets version = 3.1.x? >> >> I was actually just going to do that just now, so here it goes >> >> lsb_release -a >> Description: Ubuntu 14.04.5 LTS >> Release: 14.04 >> Codename: trusty >> >> >> sudo apt-get install libwxgtk3.0-dev >> git clone http://git.code.sf.net/p/plplot/plplot plplot-plplot >> cd plplot-plplot >> mkdir build >> cd build >> cmake .. -G "Unix Makefiles" >> -DCMAKE_INSTALL_PREFIX:PATH=/home/pvicente/plplot-install >> -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS:BOOL=OFF -DENABLE_f95:BOOL=OFF >> -DENABLE_tcl:BOOL=OFF -DENABLE_tk:BOOL=OFF -DBUILD_TEST=ON >& >> cmake.ubuntu.txt & >> make VERBOSE=1 test_wxPLplotDemo >& test_wxPLplotDemo.out.ubuntu.txt & > > So you have the same bad result for system version of everything on > Ubuntu trusty including wxwidgets-3.0.x (except for Qt5 which should not > matter here). > > This certainly qualifies as a release-critical wxwidgets bug. And you > have certainly supplied enough information that Phil should find this > to be straightforward to reproduce. So if I get a communication from > Phil that he is actively working on this, I will hold the PLplot > release past December 22 for this. However, if he is out of e-mail > contact, I won't hold the release, and we will just have to live with > the fact that the fundamental wxwidgets binding just plain does not > work on most Linux distros, ugh! > > Also, just in case any of those cmake options of yours were affecting the > result I > just tried here > > cmake -G "Unix > Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS:BOOL=OFF > -DENABLE_f95:BOOL=OFF > -DENABLE_tcl:BOOL=OFF -DENABLE_tk:BOOL=OFF -DBUILD_TEST=ON ../plplot.git > >& cmake.out > > and > > make test_wxPLplotDemo >& test_wxPLplotDemo.out > > with the same (good) results. > > N.B. I have attached those two files in compressed form so you can see > what is different between them and your results. (Say if you get > failure there even on Debian Jessie.) > >> By looking at cmake.ubuntu.txt it uses this GTK+ >> >> -- Checking for module 'gtk+-x11-2.0' >> -- Found gtk+-x11-2.0, version 2.24.27 >> >> so, exactly the same as my CentOS, if that matters > > The corresponding output here is > > -- Checking for module 'gtk+-x11-2.0' > -- Found gtk+-x11-2.0, version 2.24.25 > > So you are two patch-versions later with GTK+ which I doubt > matters much at all. > >> I also have another 16.04 ubuntu , I will try that next >> >> also, you mentioned that on Debian Jessie it's OK. >> so i'll try to install that or a recent Fedora on a VirtualBox to see > > That's a good idea to at least make sure you can reproduce my good > result on Debian Jessie. If you can do that, but get bad results for > every other distro, I would begin to wonder what magic and secret > elixir the Debian Jessie packagers applied to wxwidgets and GTK+ to > get them to work properly together? :-) > > Seriously, Phil's new wxwidgets binding and device driver first > started life as a wxwidgets-2.x software if I recall correctly. So it is > possible that > Debian Jessie has maintained better wxwidgets-2 compatibility in their > wxwidgets-3 libraries than other distros. In which case to solve this, > Phil would have to figure out how to modernize the wxwidgets binding > and device driver so it does not rely on any wxwidgets-2.x capability > at all. > > Do you see any use of (presumably deprecated) wxwidgets-2.x calls > in our wxwidgets binding or device driver? If so, that might be > a good place to start to work on this issue. > > Also, I obviously haven't been paying much attention to this thread > before, but I do recall you were advocating some one-line "fix" with > Phil for our wxwidgets-related software which I did not understand at > all and which he appeared noncommittal about. But if that is all you > need to get the test_wxPLplotDemo build to work on _all_ Linux distros > (including Debian Jessie here), I would accept your git-formatted > patch to make that one-line change you recommend as a fix for this > release critical issue. But that one-liner might also be a workaround > for some wxwidgets-2.x calls left in our code like I was speculating > about above or some other issue so Phil may want to reverse this "fix" > after the release and implement a more fundamental fix instead. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and > Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel