Sorry I have not been able to look at this today. I have had family things on.

Thanks for looking into that. I half suspected that might be the case. So after 
everything I said about contracts with the Show function, it seems it is 
already broken ☹

I suspect that actually this is a wxWidgets bug. But the documentation around 
Create is sparse. Probably we should generate a minimal example and report it 
to wxWidgets.

Sent from my Windows 10 phone

From: Pedro Vicente
Sent: 21 December 2016 22:06
To: Alan W. Irwin; Phil Rosenberg; PLplot development list
Subject: Re: [Plplot-devel] Infinite Yielding issue

@Phil

it seems the problem on the code in the current master is that the Yield(0 
is called before Show()

if I change to after Show(), like this, I get the result below


wxPLplotwindow<wxFrame> *frame = new wxPlDemoFrame();
    frame->Create( NULL, wxID_ANY, wxT( "wxPLplotDemo" ) );
    PLPLOT_wxLogDebug("frame->Create");
    frame->SetIcon( wxIcon( graph ) );
    frame->Show();

    //We must wait for the Create event to be processed and the
    //wxPLplotstream to be prepared
    while (!frame->IsReady())
    {
        PLPLOT_wxLogDebug("Plot() Yielding");
        wxGetApp().Yield();
    }

    //Now we can set up our frame and do the plotting
    Plot( frame );



16:27:38: Debug: frame->Create
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: wxPLplotwindow::OnCreate
16:27:39: Debug: plD_init_wxwidgets(): enter
16:27:39: Debug: wxPLDevice(): enter
16:27:39: Debug: wxPLDevice(): gc done
16:27:39: Debug: wxPLDevice(): m_interactiveTextGcdc done
16:27:39: Debug: wxPLDevice(): SetDC done
16:27:39: Debug: wxPLDevice(): leave
16:27:39: Debug: plD_init_wxwidgets(): leave
16:27:39: Debug: Plot()



----- Original Message ----- 
From: "Pedro Vicente" <pedro.vice...@space-research.org>
To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Tuesday, December 20, 2016 11:58 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> @Alan, Phil
>
> all works on the commit *before* current master, detailed results below
>
>
> @Phil
>
> Would you mind sending a few lines explaining how the Yield() function 
> works
> and its effect here?
> I get a few different results, and I would just like to understand what is
> happening here.
>
> Also, it would be really great if you could replicate my results.
>
> Maybe the VirtualBox on Windows?
> If you do,  a must is to install the GuestCD Additions that allows full
> screen and both ways copy and paste to host.
> Otherwise you get a tiny window with Linux running inside Windows.
> By the way on debian I could not install the GuestCD Additions.
>
> Or even an old machine that you have lying around, if you do a complete 
> new
> install of ubuntu.
>
> ubuntu 14.04
> ubuntu 16.04
>
> ok, but curiously we don't have a Yield() wait
>
> 65e7b3c Fix bug with plotting in wxPLplotDemo
>
> 23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
> 23:31:38: Debug: frame->Create
> 23:31:38: Debug: wxPLplotwindow::OnCreate
> 23:31:38: Debug: plD_init_wxwidgets(): enter
> 23:31:38: Debug: wxPLDevice(): enter
> 23:31:38: Debug: wxPLDevice(): gc done
> 23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
> 23:31:38: Debug: wxPLDevice(): SetDC done
> 23:31:38: Debug: wxPLDevice(): leave
> 23:31:38: Debug: plD_init_wxwidgets(): leave
> 23:31:38: Debug: Plot()
>
>
> debian 8.0
>
> also ok, but the result has one Yield()  call
> on CentOS I got many Yield()  calls
>
> 23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
> 23:31:38: Debug: frame->Create
> 23:31:38: Debug: Plot() Yielding
> 23:31:38: Debug: wxPLplotwindow::OnCreate
> 23:31:38: Debug: plD_init_wxwidgets(): enter
> 23:31:38: Debug: wxPLDevice(): enter
> 23:31:38: Debug: wxPLDevice(): gc done
> 23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
> 23:31:38: Debug: wxPLDevice(): SetDC done
> 23:31:38: Debug: wxPLDevice(): leave
> 23:31:38: Debug: plD_init_wxwidgets(): leave
> 23:31:38: Debug: Plot()
>
>
>
>
> ----- Original Message ----- 
> From: "Pedro Vicente" <pedro.vice...@space-research.org>
> To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>; "Phil Rosenberg"
> <p.d.rosenb...@gmail.com>; "PLplot development list"
> <plplot-devel@lists.sourceforge.net>
> Sent: Tuesday, December 20, 2016 11:27 PM
> Subject: Re: [Plplot-devel] Infinite Yielding issue
>
>
>> @Alan, Phil
>>
>> yes, my bad, sorry
>>
>> here are corrected results. *It works* on the commit before the current
>> master, for CentOS, I'll try others later
>>
>> git checkout master
>> git log --oneline -3
>>
>> 995e75e60 Made some items clearer in the wxWigdets Demo
>> 65e7b3c99 Fix bug with plotting in wxPLplotDemo
>> 67ef7be48 Added a function to check if the window is ready to accept plot
>> commands.
>>
>> on master, infinite loop
>>
>> make VERBOSE=1 test_wxPLplotDemo
>> 23:20:31: Debug: wxPLplotwindow::wxPLplotwindow
>> 23:20:31: Debug: frame->Create
>> 23:20:31: Debug: Plot() Yielding
>> 23:20:31: Debug: Plot() Yielding
>>
>> going back one , ok
>>
>> git checkout 65e7b3c99
>>
>> 65e7b3c99 Fix bug with plotting in wxPLplotDemo
>>
>>
>>
>> 23:23:09: Debug: wxPLplotwindow::wxPLplotwindow
>> 23:23:09: Debug: frame->Create
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: Plot() Yielding
>> 23:23:09: Debug: wxPLplotwindow::OnCreate
>> 23:23:09: Debug: plD_init_wxwidgets(): enter
>> 23:23:09: Debug: wxPLDevice(): enter
>> 23:23:09: Debug: wxPLDevice(): gc done
>> 23:23:09: Debug: wxPLDevice(): m_interactiveTextGcdc done
>> 23:23:09: Debug: wxPLDevice(): SetDC done
>> 23:23:09: Debug: wxPLDevice(): leave
>> 23:23:09: Debug: plD_init_wxwidgets(): leave
>> 23:23:09: Debug: Plot()
>>
>>
>>
>> ----- Original Message ----- 
>> From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
>> To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg"
>> <p.d.rosenb...@gmail.com>; "PLplot development list"
>> <plplot-devel@lists.sourceforge.net>
>> Sent: Tuesday, December 20, 2016 10:47 PM
>> Subject: Re: Infinite Yielding issue
>>
>>
>>> On 2016-12-20 21:23-0500 Pedro Vicente wrote:
>>>
>>>> @Alan
>>>>
>>>> yes, git is really good for these things, I forgot about that.
>>>>
>>>> I did
>>>>
>>>> git checkout 67ef7be48217c098ae49bb893df5e170c3eccc2c
>>>
>>> Hi Pedro:
>>>
>>> Note this summary of the last three commits (all from Phil) for the
>>> master branch.
>>>
>>> software@raven> git log --oneline -3
>>> 995e75e Made some items clearer in the wxWigdets Demo
>>> 65e7b3c Fix bug with plotting in wxPLplotDemo
>>> 67ef7be Added a function to check if the window is ready to accept plot
>>> commands.
>>>
>>> So master^^ = 67ef7be is the one you are testing which is simply
>>> a preparation for master^ = 65e7b3c.  I thought it was master^ that
>>> worked previously for you on one platform, and master = 995e75e that
>>> has been causing you trouble since. So I am surprised you are testing
>>> master^^ = 67ef7be rather than master^ = 65e7b3c.  But maybe I am not
>>> remembering the sequence of events and tests correctly.
>>>
>>> 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
>>> __________________________
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/intel
>> _______________________________________________
>> Plplot-devel mailing list
>> Plplot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>>
>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
> 


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to