Perltray PopupMenu stops my code from running

Posted by t-koelman on 2010-10-22 03:06

When a user right-clicks the system tray icon of my perltray application, the application stops executing my code.

To reproduce:
compile the attached script:
perltray --icon c:\Perl\bin\perl.exe --dependent --force --nogui --exe testevent.exe testevent.pl

- Run the application.
- Wait till the console shows "Heartbeat [sleep 2]" for the first time.
- Right click the system tray icon.

What happens on my system is that "Heartbeat [sleep 3]" is never shown. It is almost 100% reliably reproducible.

It only seems to be reproducible in the first heartbeat. If I start the application and wait for the second time "Heartbeat [sleep 2]" is shown before right-clicking, "Heartbeat [sleep 3]" is shown.

If I right-click the icon before "Heartbeat [a]" is shown, I can't reproduce either.

Any ideas?

Regards,
Tom Koelman

AttachmentSize
testevent.pl_.txt288 bytes