Monday, February 11, 2013

Maximum length of .net exe filename

Environment : Win 7
.Net version : 4.0 (File version of C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll is 4.0.30319.17929)
Technology : WPF

We had a situation where there is a WPF exe which contains more than 47 characters in file name .When we double click on the exe it simply shows 'not working'.

eg: The below file works
ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU.exe
But if we add one more character to the file name it stops working
ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV.exe

This happens even in case we place this file in c:\ which means this is not windows file limitation.

Console application

Obviously when we hit with this issue the first will be to try out the scenario in a console application. I tried that and there is no issue. We can have big file names.

Whats the error showing

There are no exception thrown in .net code. Simple shows stopped working. When we get the "Stopped working" dialog, if we select debug with new Visual Studio instance it shows some call stack in kernel

In the event log its logged as Application Error


Faulting application name: ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV.exe, version: 1.0.0.0, time stamp: 0x50e559e0
Faulting module name: igdumd32.dll, version: 8.15.10.1995, time stamp: 0x4af4b4e4
Exception code: 0xc0000409
Fault offset: 0x00014fe6
Faulting process id: 0x13c8
Faulting application start time: 0x01ce08d99c9f454b
Faulting application path: E:\ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV.exe
Faulting module path: C:\Windows\system32\igdumd32.dll
Report Id: dbba9063-74cc-11e2-bed6-005056c00008


Also there is another information entry


Fault bucket 50, type 5
Event Name: BEX
Response: Not available
Cab Id: 0

Problem signature:
P1: ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV.exe
P2: 1.0.0.0
P3: 50e559e0
P4: igdumd32.dll
P5: 8.15.10.1995
P6: 4af4b4e4
P7: 00014fe6
P8: c0000409
P9: 00000000
P10:

Attached files:
C:\Users\joyg\AppData\Local\Temp\WERDD06.tmp.WERInternalMetadata.xml

These files may be available here:
C:\Users\joyg\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_ABCEDFGHIJKLMNOP_934479f7c7ed9f73aa3ad0f14ce25746e867c84a_1f8bfff1

Analysis symbol:
Rechecking for solution: 0
Report Id: e98cb1b8-74cb-11e2-bed6-005056c00008
Report Status: 0


What to do

When googled we were left with no answers. Asked in Stackoverflow .For the time being we reduced the file length and continuing. Hopefully can get some answers using windbg.

1 comment:

Blogger said...

If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you must watch this video
right away...

(VIDEO) Text Your Ex Back?