Hi,

Dealing with your last question first. All GUI toolkits have "problems" and are prone to crashing when things go wrong internally. 

What version of Perl and Win32::GUI are you using? I couldn't see any leak with Tutorial_Part1_hello1.pl? Is your crash random? Or is it due to running out of memory? Does the application crash when you use the menu system, or shortly after?

How are you changing the colors on the controls? Are you using the change method? If so, this is the cause of the leak, see the tracker item:

http://sourceforge.net/tracker/?func=detail&aid=2864551&group_id=16572&atid=116572

I know it's a pain to do, but could you produce a minimal example that crashes and leaks? I'll take a look (feel free to email off list). 

Cheers,

jez.

> From: wb@sao.pl
> To: perl-win32-gui-users@lists.sourceforge.net
> Date: Tue, 11 May 2010 21:32:26 +0200
> Subject: [perl-win32-gui-users] Problem with graphic application
>
> Hello!
>
> I have a GUI application which from time to time crashes. Buttons, textfield
> and other object disappear, but not the all. It's very strange because the
> application can work persistent few hours without problem but sometimes the
> problem happens few times in one hour. This is an application which
> dynamically creates many windows with database data - about 20-40 in one
> session. The window contains only textfields, buttons and labels, but there can
> by many of them (100-200 tetxfields sometimes more). All the objects can also
> have dynamically determined colors which depend on values of the textfields.
> Additionally icons are stored inside the application by using the module:
>
> use Win32::GUI::BitmapInline();
>
> At last I should add that all the window is scaled along x and y axis
> independently. So many graphical operations...
>
>
> I wonder if it could be a leak memory which is similar to the "leak" which can
> be found in a demo application like Tutorial_Part1_hello1.pl demo. It can be
> seen when you open Task Manager and watch the amount of memory perl consumes.
> Even the simple mouse moving when the application is active shows that the
> memory rise up constantly. Is it problem with Win32::GUI?
>
> Another question is as follows. Has the small errors (warnings) meaning in the
> context of the crashes? I thing about for instance warning in counting the
> exprossion like substr($foo,3,4) when $foo has only length of 2. Usually I
> start the perl with the:
>
> #perl -W
> use warnings;
> use strict;
>
> Could it be proper to switch off the options?
>
> Ane comments and experience sharing is much appriciated. And is there similar
> problem in other GUI perl libraries?
>
> Waldemar
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> http://perl-win32-gui.sourceforge.net/


Get a free e-mail account with Hotmail. Sign-up now.