Error on EXE shutdown

48 views
Skip to first unread message

rkad

unread,
Apr 13, 2012, 2:51:28 PM4/13/12
to cava-p...@googlegroups.com
Hello,

I've been using Cava Packager to build Perl executable programs that are distributed to multiple users in my organization.  Awesome tool.

But I have recently encountered an issue.  On shutdown, I sometimes get an error.  See attached image.

The error seems pretty harmless.  When it happens, it happens after all the work has been done.  But it is a pretty unsightly error that is troubling a lot of people that use my applications. 

The I click on more information, I am told that there was an issue with tk.dll.

The application is built using Tk.  I know there are more modern GUI toolkits.  But this is a tool that has been in service for a long time and it would be too painful to try to convert it.  It works great as is.  If I could only fix this ominous looking shutdown bug I would be golden.

I am running on Windows.  I have Perl version 5.14 from ActiveState.  Note, Tk.pm is not part of the standard 5.14 package.  I download it from the Bribes repository. 

Has anyone ever seen anything like this before?

-Rodney
CavaError.png

Cava Support

unread,
Apr 13, 2012, 3:02:32 PM4/13/12
to cava-p...@googlegroups.com
Hi,

You might try checking the 'Use Safe PutEnv' option on the executable
tab. This solved a similar problem for a user combining Tk with Win32::OLE.

In addition you could try one of the following pre-release versions.

http://www.cavapackager.com/download/cava-packager-msw-x86-2-0-76.exe

(or 64 bit at)

http://www.cavapackager.com/download/cava-packager-msw-x64-2-0-76.exe

which fix a few issues that caused problems for other Tk users.

If you get the chance, let me know if one or both of these fixes your
problem.

Regards

Mark

> --
> You received this message because you are subscribed to the Google
> Groups "Cava Packager" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cava-packager/-/w8RLTN2eGbgJ.
> To post to this group, send email to cava-p...@googlegroups.com.
> To unsubscribe from this group, send email to
> cava-package...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cava-packager?hl=en.

--
User Support
Cava Development Tools
Package and Distribute Perl Applications
http://www.cavapackager.com/

rkad

unread,
Apr 16, 2012, 1:52:29 PM4/16/12
to cava-p...@googlegroups.com
Hello Mark,

Thank you for your helpful suggestions.  I have yet to try the pre-release software but I wanted to give you a little update ...

It's actually quite strange but is verified on my system and on a beta user system.  After enabling the "Use Save PutEnv" option and re-buiding the problem diminished but did not go away completely.  I still get the shutdown error the first time I run the application.  However, I do not get it on subsequent runs.  Sounds spooky to me.  And I'd blow it off completely if I didn't see the exact same thing occur on the beta user's system. Is there any logical reason that you know of that might cause this?

This is still a big improvement over what we were seeing.  I will try the pre-release software and see if it doesn't clear up the problem entirely.  But at the risk of it sounding like I don't know what I'm doing I did want to pass on this update to you. :)

Thanks again for your excellent contribution of Perl development. 

-Rodney

> cava-packager+unsubscribe@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/cava-packager?hl=en.

rkad

unread,
Apr 16, 2012, 2:14:41 PM4/16/12
to cava-p...@googlegroups.com
Hello again Mark.

I've done some more testing and I have encountered the error on subsequent runs.  It's was just very intermittent.  So I downloaded and installed the pre-release cava-packager-msw-x86-2-0-76.exe Cava software.  Things went from bad to worse when I did though.  Now the error occurs every time. I don't know what else to try.

-Rodney

Cava Support

unread,
Apr 16, 2012, 7:00:54 PM4/16/12
to cava-p...@googlegroups.com
Hi,

Thanks for the feed back. Looks like a definite problem I need to fix.

Could you let me know full details of the operating systems and Perl
where you build the application and where you see the problem.

For example, "Windows 2008 R2 64 bit with ActivePerl 1402 64 bit".

Surprisingly, when you first reported this I was immediately able to
repeat the issue with my own Tk test which makes me wonder how it hasn't
arisen before.

I suspect that the whole issue is a problem around GUI subsystem and
standard handles. If you built the application as a console app, I
suspect you would no longer see the issue - but you would have an
irritating console window.

Anyway, once you let me know your system details I'll set about
resolving this.

On 16/04/2012 19:14, rkad wrote:
> Hello again Mark.
>
> I've done some more testing and I have encountered the error on
> subsequent runs. It's was just very intermittent. So I downloaded and
> installed the pre-release cava-packager-msw-x86-2-0-76.exe

> <http://www.cavapackager.com/download/cava-packager-msw-x86-2-0-76.exe>

> <https://groups.google.com/d/msg/cava-packager/-/w8RLTN2eGbgJ>.


> > To post to this group, send email to
> cava-p...@googlegroups.com

> <mailto:cava-p...@googlegroups.com>.


> > To unsubscribe from this group, send email to

> > cava-package...@googlegroups.com
> <mailto:cava-packager%2Bunsu...@googlegroups.com>.


> > For more options, visit this group at
> > http://groups.google.com/group/cava-packager?hl=en

> <http://groups.google.com/group/cava-packager?hl=en>.


>
> --
> User Support
> Cava Development Tools
> Package and Distribute Perl Applications
> http://www.cavapackager.com/
>

> --
> You received this message because you are subscribed to the Google
> Groups "Cava Packager" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/cava-packager/-/IPfBJlzGqKQJ.


> To post to this group, send email to cava-p...@googlegroups.com.
> To unsubscribe from this group, send email to

> cava-package...@googlegroups.com.

rkad

unread,
Apr 18, 2012, 9:03:57 AM4/18/12
to cava-p...@googlegroups.com
Mark,

Here is my system and build configuration:

Windows 7 Enterprise 32-bit Service Pack 1.
Active Perl 5.14.2 built for MSWin32-x86-multi-thread. Binary build 1402 [295342].
PerlTk Version 804.029. Installed using Perl Package Manager.  Downloaded from the Bribes repository http://www.bribes.org/perl/ppm.

If you like, I can send you the source code for my project.  Let me know.

One other question.  As you know, ActiveState has parted ways with Perl-Tk.  It is a dying interface.  Beginning with my next project, I will migrate away from Perl-Tk.  I know you recommend wxPerl.  I have downloaded CitrusPerl and picked through the demo.  It certainly has an impressive array of utilities.  One thing I did not see is an equivalent for Tk::after.  You can use Tk::after to effectively generate a fork in your GUI.  I use this feature extensively to monitor the progress of background processes that do the heavy lifting of the utility.  This way my GUI doesn't "lock up" during a lengthy running process.  So does wxPerl have a comparable Tk::after feature?

Thanks in advance,

Rodney

>         <mailto:cava-packager@googlegroups.com>.


>          > To unsubscribe from this group, send email to

>          > cava-packager+unsubscribe@googlegroups.com


>         <mailto:cava-packager%2Bunsu...@googlegroups.com>.
>          > For more options, visit this group at
>          > http://groups.google.com/group/cava-packager?hl=en
>         <http://groups.google.com/group/cava-packager?hl=en>.
>
>         --
>         User Support
>         Cava Development Tools
>         Package and Distribute Perl Applications
>         http://www.cavapackager.com/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Cava Packager" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cava-packager/-/IPfBJlzGqKQJ.
> To post to this group, send email to cava-p...@googlegroups.com.
> To unsubscribe from this group, send email to

> cava-packager+unsubscribe@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/cava-packager?hl=en.

Cava Support

unread,
Apr 18, 2012, 12:16:55 PM4/18/12
to cava-p...@googlegroups.com, rkad
Hi,

On 18/04/2012 14:03, rkad wrote:

> If you like, I can send you the source code for my project. Let me know.

That would be great. I can use it to iron out these issues with Tk /
Tk::after and application exit once and for all.

If you could send it to mark.d...@cava.co.uk

>
> One other question. As you know, ActiveState has parted ways with
> Perl-Tk. It is a dying interface. Beginning with my next project, I will
> migrate away from Perl-Tk. I know you recommend wxPerl. I have
> downloaded CitrusPerl and picked through the demo. It certainly has an
> impressive array of utilities. One thing I did not see is an equivalent
> for Tk::after. You can use Tk::after to effectively generate a fork in
> your GUI. I use this feature extensively to monitor the progress of
> background processes that do the heavy lifting of the utility. This way
> my GUI doesn't "lock up" during a lengthy running process. So does
> wxPerl have a comparable Tk::after feature?
>

If you want to asynchronously execute an external process and receive
its exit code in an event, you would use Wx::Process and Wx::ExecuteCommand.

http://docs.wxwidgets.org/stable/wx_processfunctions.html#wxexecute

If you wanted to receive events as the external command produces output
on STDERR and STDOUT, there is a Perl wrapper Wx::Perl::ProcessStream
that assists in this

http://search.cpan.org/~mdootson/Wx-Perl-ProcessStream-0.32/lib/Wx/Perl/ProcessStream.pm

If you just want to have periodic events generated or a single event at
some future point, use Wx::Timer

http://docs.wxwidgets.org/stable/wx_wxtimer.html#wxtimer

The latest version of Citrus Perl from http://www.citrusperl.com that I
have not quite got around to announcing yet has a wxPerl based GUI for
creating distributions and dependent executables. In the vendor/lib
directory you will find CP::Wx::ProgressTask and Citrus::Dist::Create
that use all of the above. (the main app startup modules are
Citrus::Utils and Citrus::Utils::App )

Citrus also includes Tk-804.030 to help anyone wanting to migrate from
Tk to wxPerl.

One note about this - the CP::Wx:: classes are wrappers for the base Wx
classes with more Perlish constructors - which would be very confusing I
expect for a new user comparing their code with the documentation.

Hope it helps


Mark

Reply all
Reply to author
Forward
0 new messages