Finally I think that's may be interesting for you the other bug in my code.
In wxPlplotDemo.cpp you have to replace constructor with this new 
constructor ond plplot crash :

//! Constructor of our custom frame, where the Menu is created and a
//  a wxPLplotwindow is inserted into the frame. We plot some easy functions
//  just to show how it works. wxPLplotwindow takes care of all the setup
//  for the use of PLplot library.
//
MyFrame::MyFrame( const wxString& title ) : wxFrame( NULL, wxID_ANY, title )
{
     bgcolor = false;

     // add menu
     wxMenu *fileMenu = new wxMenu;
     fileMenu->Append( wxPLplotDemo_BGColor, _T( "&Change background 
color...\tAlt-C" ), _T( "Change background color" ) );
     fileMenu->Append( wxPLplotDemo_About, _T( "&About...\tF1" ), _T( 
"Show about dialog" ) );
     fileMenu->Append( wxPLplotDemo_Quit, _T( "E&xit\tAlt-X" ), _T( 
"Quit this program" ) );

     wxMenuBar *menuBar = new wxMenuBar();
     menuBar->Append( fileMenu, _T( "&File" ) );
     SetMenuBar( menuBar );
     SetIcon( wxIcon( graph ) );

     // add the wxPLplot
     wxPanel   * panel = new wxPanel( this );
     wxBoxSizer* box   = new wxBoxSizer( wxVERTICAL );
     plotwindow = new MyPlotwindow( this, panel, -1, wxDefaultPosition, 
wxDefaultSize, wxWANTS_CHARS,
#if wxUSE_GRAPHICS_CONTEXT
         wxPLPLOT_BACKEND_GC | wxPLPLOT_DRAW_TEXT );
#else
         wxPLPLOT_BACKEND_AGG | wxPLPLOT_DRAW_TEXT );
#endif
      wxPLplotstream* pls=plotwindow->GetStream();

static int          locate_mode=1;
static int          test_xor;
static int          fontset;
static char         *f_name;
static const char   *notes[] = { "Make sure you get it right!", "" };
static PLOptionTable options[] = {
     {
         "locate",               /* Turns on test of API locate function */
         NULL,
         NULL,
         &locate_mode,
         PL_OPT_BOOL,
         "-locate",
         "Turns on test of API locate function"
     },
     {
         "xor",                  /* Turns on test of xor function */
         NULL,
         NULL,
         &test_xor,
         PL_OPT_BOOL,
         "-xor",
         "Turns on test of XOR"
     },
     {
         "font",                 /* For switching between font set 1 & 2 */
         NULL,
         NULL,
         &fontset,
         PL_OPT_INT,
         "-font number",
         "Selects stroke font set (0 or 1, def:1)"
     },
     {
         "save",                 /* For saving in postscript */
         NULL,
         NULL,
         &f_name,
         PL_OPT_STRING,
         "-save filename",
         "Save plot in color postscript `file'"
     },
     {
         NULL,                   /* option */
         NULL,                   /* handler */
         NULL,                   /* client data */
         NULL,                   /* address of variable to set */
         0,                      /* mode flag */
         NULL,                   /* short syntax */
         NULL
     }                           /* long syntax */
     };
         pls->MergeOpts( options, "x01c options", notes);


     plotwindow->Connect( wxEVT_CHAR, wxKeyEventHandler( 
MyPlotwindow::OnChar ) );
     box->Add( plotwindow, 1, wxALL | wxEXPAND, 0 );
     panel->SetSizer( box );
     SetSize( 640, 500 );      // set frame size
     SetSizeHints( 220, 150 ); // set minimum frame size

     wxString m_title = title;
     switch ( plotwindow->getBackend() )
     {
     case wxPLPLOT_BACKEND_DC:
         m_title += wxT( " (basic)" );
         break;
     case wxPLPLOT_BACKEND_GC:
         m_title += wxT( " (wxGC)" );
         break;
     case wxPLPLOT_BACKEND_AGG:
         m_title += wxT( " (AGG)" );
         break;
     default:
         break;
     }
     SetTitle( m_title );

     Plot();
}


Le 14/02/2015 15:57, laurent Berger a écrit :
> Hi phil,
>
> Sorry I make a mistake about PL_MAX_OPT_TABLES there is no problem it
> was in my code. About PL_NSTREAMS limits it's a problem.
> you can reproduce problem with PL_NSTREAMS changing some lines codes in
> wxPlplotDemo.cpp :
> original :
> MyFrame *frame = new MyFrame( _T( "wxPLplot demo" ) );
> frame->Show( true );
>
> modified code
> for (int i=0;i<99;i++)
> {
> MyFrame *frame = new MyFrame( _T( "wxPLplot demo" ) );
> frame->Show( true );
> }
> wxMessageBox("100 wxplplot windows opened");
> wxMessageBox("and one more");
> MyFrame *frame = new MyFrame( _T( "wxPLplot demo" ) );
> frame->Show( true );
>
>
>
> and sorry for my mistake.
> Le 14/02/2015 15:40, Phil Rosenberg a écrit :
>> Hello Laurent
>> Yes I agree that if such a limit does exist on the number of plplot
>> windows which you have in an application then this needs addressing.
>> I will try to look at this as soon as I can. You could speed up the
>> process by sending a minimal example which displays the problem. From
>> your description I imagine this will be something like a wxMyApp which
>> creates 11 wxFrames, each with a plot?
>> Thanks for the report and as I said I will look into this asap.
>>
>> Phil
>> ------------------------------------------------------------------------
>> From: laurent Berger <mailto:laurent.ber...@univ-lemans.fr>
>> Sent: ‎14/‎02/‎2015 10:16
>> To: plplot-devel@lists.sourceforge.net
>> <mailto:plplot-devel@lists.sourceforge.net>
>> Subject: Re: [Plplot-devel] PL_MAX_OPT_TABLES PL_NSTREAMS wxWidgets Driver
>>
>> I think that my previous thread was wrong.
>>
>> Finally I'm not sure that my code uses in a rigth way plplot( sorry for
>> my bad english)
>> In my program I open many windows with images. If I open 10 windows
>> there is no problem but with 11 windows my program crash
>> For each image I open a panel which include 6 windows like :"class
>> FenetreCourbe : public wxPLplotwindow"
>> I think first PL_NSTREAMS limits was a problem but now I think it is
>> PL_MAX_OPT_TABLES. My program crash :
>> plplotd.dll!ParseOpt(int * p_myargc, const char * * * p_argv, int
>> * p_argc, const char * * * p_argsave, PLOptionTable * option_table)
>> Ligne 1017 C
>> plplotd.dll!c_plparseopts(int * p_argc, const char * * argv, int
>> mode) Ligne 908 C
>> plplotd.dll!c_plsetopt(const char * opt, const char * opt_arg)
>> Ligne 758 C
>> plplotcxxd.dll!plstream::setopt(const char * opt, const char *
>> optarg) Ligne 2593 C++
>> plplotwxwidgetsd.dll!wxPLplotstream::Create(wxDC * dc, int width,
>> int height, int style) Ligne 85 C++
>> plplotwxwidgetsd.dll!wxPLplotstream::wxPLplotstream(wxDC * dc, int
>> width, int height, int style) Ligne 37 C++
>> plplotwxwidgetsd.dll!wxPLplotwindow::wxPLplotwindow(wxWindow *
>> parent, int id, const wxPoint & pos, const wxSize & size, long style,
>> int pl_style) Ligne 62 C++
>> wxOpenCVMain.exe!FenetreCourbe::FenetreCourbe(wxFrame * frame,
>> wxWindow * parent, int id, const wxPoint & pos, const wxSize & size,
>> long style, int pl_style) Ligne 25 C++
>>
>> In plplparseopts(int * p_argc, const char * * argv, int mode) Ligne 908
>> variables tables is equal to 11 . i think that is a problem because
>> PL_MAX_OPT_TABLES is limited to 10.
>> My questions is how can I open eleven windows?
>>
>> thanks for yours answers.
>>
>> PS
>> ploptions_info is
>> - ploption_info 0x000007fee792c750
>> {{options=0x000007fee792cf00 {plplotd.dll!PLOptionTable
>> ploption_table[47]} {opt=...} ...}, ...} PLOptionInfo[10]
>> - [0] {options=0x000007fee792cf00 {plplotd.dll!PLOptionTable
>> ploption_table[47]} {opt=0x000007fee792cef8 "showall" ...} ...}
>> PLOptionInfo
>> + options 0x000007fee792cf00 {plplotd.dll!PLOptionTable
>> ploption_table[47]} {opt=0x000007fee792cef8 "showall" ...} PLOptionTable *
>> + name 0x000007fee792c840 "PLplot options" const char *
>> + notes 0x000007fee792c658 {plplotd.dll!const char
>> *plplot_notes[3]} {0x000007fee792c670 "All parameters must be
>> white-space delimited. Some options are driver"} const char * *
>> - [1] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [2] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [3] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [4] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [5] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [6] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [7] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [8] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>> - [9] {options=0x000000013f768700
>> {wxOpenCVMain.exe!PLOptionTable options[5]} {opt=0x000000013f6c1224
>> "locate" ...} ...} PLOptionInfo
>> + options 0x000000013f768700 {wxOpenCVMain.exe!PLOptionTable
>> options[5]} {opt=0x000000013f6c1224 "locate" handler=...} PLOptionTable *
>> + name 0x000000013f6c1370 "x01c options" const char *
>> + notes 0x000000013f7686e8 {wxOpenCVMain.exe!const char
>> *notes[2]} {0x000000013f6c1230 "Make sure you get it right!"} const
>> char * *
>>
>>
>> Le 13/02/2015 23:58, Jim Dishaw a écrit :
>>> There should be no problem if you increased that number. I have to
>> ask if you need more than 100 simultaneous plots. You can use pladv()
>> or the plbop()/pleop() functions to advance to a new page. If you
>> really want a fresh state you can do a plend1() call and then start over.
>>> A better solution would be to make the number of plot streams
>> dynamic, which is a pretty easy fix. That way a library user doesn't
>> have to worry about a fixed limit.
>>>
>>>
>>>> On Feb 13, 2015, at 4:00 PM, laurent Berger
>> <laurent.ber...@univ-lemans.fr> wrote:
>>>> Hi,
>>>>
>>>> I am using plplot for image processing with many plplot windows more
>>>> than 100. In source plplot streams seems limited to 100 (#define
>>>> PL_NSTREAMS 100 // Max number of concurrent streams. plplotP.h line
>> 289).
>>>> Is it possible to increase this values?
>>>> Thanks for yours answers
>>>>
>>>>
>>>>
>>>>
>> ------------------------------------------------------------------------------
>>>> Dive into the World of Parallel Programming. The Go Parallel Website,
>>>> sponsored by Intel and developed in partnership with Slashdot
>> Media, is your
>>>> hub for all things parallel software development, from weekly thought
>>>> leadership blogs to news, videos, case studies, tutorials and more.
>> Take a
>>>> look and join the conversation now. http://goparallel.sourceforge.net/
>>>> _______________________________________________
>>>> Plplot-devel mailing list
>>>> Plplot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming. The Go Parallel Website,
>>> sponsored by Intel and developed in partnership with Slashdot Media,
>> is your
>>> hub for all things parallel software development, from weekly thought
>>> leadership blogs to news, videos, case studies, tutorials and more.
>> Take a
>>> look and join the conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Plplot-devel mailing list
>>> Plplot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media,
>> is your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Plplot-devel mailing list
>> Plplot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>>
>>
>> _______________________________________________
>> Plplot-devel mailing list
>> Plplot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to