stinkingpig has asked for the wisdom of the Perl Monks concerning the following question:

I have a program written in Perl 5.8 which uses Win32::GUI to display a system tray icon with balloon tips to notify the user of its activity. It's compiled to an .exe using ActiveState PDK 7.3 and distributed to end users, who are mostly running it on Server 2003. I've gotten two crash reports and seen it crash once myself with "faulting module GUI.dll, version 1.6.0.0, fault address 0x0001c138". I have some reason to suspect that it's related to video, but few answers or hints for the right direction to look in troubleshooting. Can anyone give me any tips for where to look? Or should I just give users an option to disable the UI? thanks, ____ UPDATE So, it turned out to be permissions-related. If it's running interactively, no problems; if it's running as a scheduled task, it has trouble deciding what session to send output to. Eventually I will update it to figure out the Right Thing(TM) on its own, but in the meantime I just gave an option to turn off the UI.

Replies are listed 'Best First'.
Re: Win32::GUI crashes GUI.dll
by Anonymous Monk on Nov 26, 2008 at 02:57 UTC
    You need to find out where in perl the call occurs. You also need to rule out PDK as a factor. You could use Devel::Trace to help you, or sprinkle print statements in your code. You could also recompile Win32::GUI with debug flags turned on for additional hints... then write code to reproduce that error on demand, something you can send in bug report rt://Win32-GUI (or to PDK, if PDK helps cause error).
Re: Win32::GUI crashes GUI.dll
by lukeyboy1 (Beadle) on Nov 28, 2008 at 09:17 UTC
    I was having the same issues, finding that it crashed left, right and centre. In my perl script, I had to put in lines of the following form:
    #perl2exe_include utf8; #perl2exe_include "unicore/lib/gc_sc/Word.pl"; #perl2exe_include "unicore/lib/gc_sc/Digit.pl"; #perl2exe_include "unicore/lib/gc_sc/SpacePer.pl"; #perl2exe_include "unicore/To/Lower.pl";
    To sort this out. This of course depends on the modules that you're including. Hope this helps.....
      Note that, in all likelyhood, unless you're using UTF-8 encoding, then my lines won't work -- but it's likely to be along the same sort of lines.

      Also -- it's worth posting the exact line that you're using to build it. You may not be using -I and -L correctly, too, perhaps?

      Just thoughts, is all.....
Re: Win32::GUI crashes GUI.dll
by lukeyboy1 (Beadle) on Nov 28, 2008 at 14:59 UTC
    You might want to paste your program (or a distilled part of it), and we'd be happy to take a look, or even try it on our own perl2exe versions, if that'd help? It might help diagnose whether or not it's an issue with the code, or maybe just a slightly subtly broken perl build you've got!