>> On 15 Mar 2014, at 10:23, Werner Smekal <werner.sme...@miscdebris.net> wrote:
>> using wxWidgets on Windows I sometimes encountered a limit of GDI Objects. 
>> Everything you do in the GUI needs a GDI Object - but this is limited to 
>> 10000 per process. This could explain your behaviour (works a while and then 
>> crashes or freezes). E.g. see here:
>>
>> http://stackoverflow.com/questions/9723470/whats-the-upper-limit-on-gdi-objects-for-one-process-in-windows-7
>>
>> I don't know the wingcc driver to well, but maybe it uses always new GDI 
>> objects if you call plenv and if you do that hundred times....

On 2014-03-15 22:48-0000 John Duffy wrote:

> Hi Werner
>
> Thanks for your input, I will look into a limit on GDI objects being the 
> problem.
>

Hi John:

I doubt that limit is the entire issue.

I am completely unfamiliar with GDI'd, but if you read that
stackoverflow URL mentioned by Werner above, the situation does sound
analogous to normal memory leaks where because malloced memory areas
are not freed properly with use the heap grows indefinitely until it
exceeds the maximum memory allowed. Similarly, it sounds to me that if
GDI's are not freed properly with use, then the number used will grow
indefinitely until you exceed the GDI limit.  So increasing the GDI
limit to deal with such a GDI leak is analogous to buying more RAM to
deal with a memory leak, i.e., you may just be putting off the problem
until continued use consumes the resource.

So I think what you should be looking for is whether once wingcc is
done with a page, the GDI's created for that page are released
properly before moving to the next page.  This is the issue that
Werner refers to in the last line of the quote above since each plenv
call generates a new page.  Page cleanup is probably one of the more
difficult aspects of writing reliable PLplot device drivers so I would
not be surprised if somewhere in the plD_eop_wingcc, plD_tidy_wingcc,
and plD_bop_wingcc routines called indirectly by plenv, a GDI cleanup
issue was created.

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
__________________________

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to