The fabulous application The Gun (from MASM 8) has started crashing for me after I've switched to Win XP. It worked great in Win 2K. I gathered some debugging info for you to look at:

004013B9 jne 00401374
004013BB pop edi
004013BC pop esi
004013BD mov eax,dword ptr
004013C0 leave
004013C1 ret
004013C2 push ebp
004013C3 mov ebp,esp
004013C5 add esp,0FFFFFFDCh
004013C8 push esi
004013C9 xor esi,esi
004013CB mov eax,dword ptr
004013CE jmp dword ptr <- crashes here with access violation
004013D5 cmp dword ptr ,3E8h
004013DC jne 00401436
004013DE push dword ptr ds:[405058h]
004013E4 call 004017CF
004013E9 cmp eax,6
004013EC jne 004013F5
004013EE call 00401FF0
004013F3 jmp 00401400
004013F5 cmp eax,2
004013F8 jne 00401400
004013FA xor eax,eax
004013FC leave
004013FD ret 10h

Here are the registry contents:
eax 49446
ecx 0
edx 6180
ebx 0
ebp 1244720
esp 1244680
esi 0
edi 1244836

The crashes occur a big randomly. Sometimes they happend when I open a text file. Sometimes it happends while The Gun is out of focus. This code look like a message handler to me but I'm not sure. It's at least some kind of callback since it's called from User32.dll. Does anyone know what the problem is?

EDIT: Maybe this should be in the MASM forum.
Posted on 2003-10-18 07:57:29 by gliptic
ony a assumption: Stack
Posted on 2003-10-18 15:34:21 by Bubu-Boy
Hi, gliptic.

Indeed, the problem is in the message handler. It's a GPF caused by an array of pointers for the message dispatcher. Unexpected messages (above WM_USER) cause TheGun to try to read beyond the array.

If this is the error (and it seems to be), it's been corrected quite some time ago. Just go to Hutch's Forum and get the latest version. :)

If the new version still fails, try posting on that forum (you'll have greater chances to catch Hutch's attention there).


Posted on 2003-10-18 15:49:07 by QvasiModo

Sorry I did not see your post earlier. Qvasimodo identified the problem some time ago which was the dispatcher I used with the current version not trapping messages about 1024 and as a few of the standard apps in later Windows versions use private messages, it will crash if one of those apps is started up.

The current version is on my site at and it seems to have got around the problem it had running on later versions of Windows.

Posted on 2003-10-19 09:24:23 by hutch--
Oh, no problem.
Nice that the error has been corrected then. I downloaded the updated version and it does seem to work. I'll post on the MASM forum if I find any problems with the new version though.
Posted on 2003-10-22 15:33:44 by gliptic