Opened 5 years ago

Closed 4 years ago

#87 closed defect (fixed)

Cascading trap on exit

Reported by: Gregg Young Owned by: Gregg Young
Priority: major Milestone: Release_1.1
Component: eFTEPM Version: Release_1.0
Keywords: Cc:

Description

This happens randomly and not very frequently. Initial analysis from Steven which matches mine:
Based on the .trp file I think this is the first dispatch of the exception
handle:

00D49A58 1FFC9E69 DOSCALL1 0002:00009E69 between

DOS32R3EXCEPTIONDISPATCHER + 151 and _xcptR3ExceptionDispatcher - 23

and this is the return from the routine that trapped:

00D49A68 00070053 EFTEPM 0002:00050053 between NewCommand_CurPos +

28D3 and ProcessConfigFile - 31D

My build differs from yours, so you need to do the map using your .obj and
..map files.

From the trap, the offset in the map to NewCommand_CurPos should be:

NewCommand_CurPos = 00070053 - 28D3 = 6d780 - 20000 = 2:4d780

You need to verify this.

The offset in the map to the address found on the stack is:

map offset = 70053 - 20000 = 2:50053

My map out of sync with your .trp file, but yours should look like:

0002:0004d780 NewCommand_CurPos
0002:00050370 ProcessConfigFile (maybe)

On my cfte.lst from wdis -l -s cfte.obj, I have

0E10 int near NewCommand( _CurPos near &, char const near * ):

Adding the offset from the .trp file, we get

wdis offset = E10 + 28D3 = 36e3

Searching for this offset in cfte.lst, I find:

3640 int near PreprocessConfigFile( _CurPos near & ):

and

36DD E8 00 00 00 00 call strncmp_
36E2 85 C0 test eax,eax
36E4 0F 85 6A 00 00 00 jne L$453

which does not match exactly, but implies that the strncmp in
PreprocessConfigFile call might have trapped.

This is most likely:

cfte.cpp:1909

if (cp.c + 8 < cp.z && strncmp(cp.c, "%define(", 8) == 0) {

If this is what triggered the trap, then cp.c is borked.

Let me know what you find using your .map and wdis.

FWIW, I'm somewhat expected there to be 2 trap reports in the .trp file,
but this did not happen.

Note the trp file and the dumps I have don't match up very well. I have 13 dump files from this event.

Attachments (1)

051A_02.TRP (27.0 KB ) - added by Gregg Young 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Gregg Young, 5 years ago

ProcessConfigFile is part of the code that loads the configuration so it seems odd it is running on exit. cp.c is probably going away because of the exit. However if (cp.c + 8 < cp.z && strncmp(cp.c, "%define(", 8) == 0) is in a switch statement switching on *cp.c.

This may not be new:
while (gui->doLoop) fixme? GKY 23 Oct 11 I trapped on close once again on 1 Jan 12 (g_pm.cpp ~2756)

by Gregg Young, 5 years ago

Attachment: 051A_02.TRP added

comment:2 by Gregg Young, 5 years ago

Component: eFTE coreeFTEPM
Priority: minormajor

comment:3 by Gregg Young, 5 years ago

Owner: set to Gregg Young
Status: newaccepted

comment:4 by Gregg Young, 4 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.