Hi Scott,

I hadn't answered yet because I hoped somebody else would answer with
more insight than I have. While I'm technically maintaining Win32::Exe
along with the rest of the PAR helper modules, I haven't contributed to
that significantly and don't use nor understand Windows binaries much.

Scott Stanton wrote:
> I'm running into crashes on Windows trying to build a large wrapped app
> (>200MB, it's an installer).  The problem happens on the second call to
> Win32::Exe->new->update in Packer.pm (around line 1257).  I'm not sure
> why we need to set the icon and info for the exe both before and after
> the append_parl/generate_output calls.  It seems to work for me if I
> remove the second update call and just patch the copy of parl.exe before
> appending the par file.  

Intuitively, I would think it's safer to patch the exe after attaching
PAR and the .par. But if it works for you if you remove the second
updating, I'd say let's give it a try. svn blame says it was me who
added the first of the two updates when I implemented the on-the-fly
parl-regeneration. But for the life of me, I don't know why. I'll remove
it and we'll see the fallout eventually.

> I've also run into problems trying to use some .ico files (that work
> fine with other apps).  The resulting binary seems to be corrupted.  Has
> anyone else seen similar problems? 

Not personally, but there's been some mention of certain .ico's causing
trouble. IIRC, it was related to the icon size. I thought this was on
annocpan, but I was wrong. Maybe Google can help you?

> I traced into the update call to see what was causing the failure.  I
> think perl is running out of memory inside Parse::Binary->load_struct
> trying to make a copy of the whole program in memory.  This seems like
> an expensive way to update an icon.  I'm also suspicious that whatever
> is causing the problem with different .ico files could be corrupting the
> heap.  I wonder if the Win32::Exe module is not correctly handling some
> cases.

I wouldn't be surprised, but unfortunately, I have neither time nor
resources (like, Windows) to delve into Win32::Exe.

Best regards,
Steffen

Reply via email to