Mega Search
23.2 Million


Sign Up

Make a donation  
Debug info with manifest suddenly breaks application [Edit]  
News Group: embarcadero.public.delphi.ide

I'm using Delphi 2007 for a legacy application. I'm attaching a manifest via a post-build mt.exe run. 

It has been working fine for quite some time. Suddenly, on the "debug" build, I have started getting an error as soon as I run it (Windows 7, both 32-bit and 64-bit):

 is not a valid win32 application

Clues:
1) If I don't attach the manifest, it runs fine.
2) If I attach the manifest and remove debug information in the Linker options, it runs fine.
3) The "release" build runs fine in any case.

Is it that somehow the application exe size with debug info has gone beyond certain size allowed for manifested apps? The size in debug build is now 31,761 KB.

I can, of course, continue to debug with manifest removed so it's not a critical problem but I would like to fix it. Any ideas?

Thanks.

P.S. Running dependency walker does not reveal anything. Identical results on no error build and error build.

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2015, at 9:39 PM EST
From: Sanjay Kanade
 
Re: Debug info with manifest suddenly breaks application [Ed  
News Group: embarcadero.public.delphi.ide
I changed to the resource file as you suggested and it started working again.

So it seems, the bug might be in that version of mt.exe which somehow corrupts the file when it grows beyond a certain size.

Many thanks,
Sanjay

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 8-Jan-2015, at 12:40 AM EST
From: Sanjay Kanade
 
Re: Debug info with manifest suddenly breaks application [Ed  
News Group: embarcadero.public.delphi.ide
Sanjay wrote:

> I'm using Delphi 2007 for a legacy application. I'm attaching
> a manifest via a post-build mt.exe run.

You don't need to use mt.exe to add a manifest to your app.  Just create 
a .manifest file with your desired XML, then include it in your app's resources 
using a .rc file.

--
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 8-Jan-2015, at 12:13 AM EST
From: Remy Lebeau (TeamB)