VOGONS


First post, by cg_chas

User metadata
Rank Newbie
Rank
Newbie

This is a continuation of the thread at chessmaster 4000 turbo modem connectivity under windows 3.11, part of which is now more appropriate in this subforum.

The error is: Unhandled exception at 0x1029984f (msvcr90d.dll) in dosbox_debug.exe: 0xC0000005: Access violation reading location 0x00000002.

0x00000002 of course being a bad pointer.

According to the VC++ 2008 call stack, the offending code is the call to vsprint from this function:

#if SERIAL_DEBUG
void CSerial::log_ser(bool active, char const* format,...) {
if(active) {
// copied from DEBUG_SHOWMSG
char buf[512];
buf[0]=0;
sprintf(buf,"%12.3f [% 7u] ",PIC_FullIndex(), SDL_GetTicks());
va_list msg;
va_start(msg,format);
vsprintf(buf+strlen(buf),format,msg);
va_end(msg);
// Add newline if not present
Bitu len=strlen(buf);
if(buf[len-1]!='\n') strcat(buf,"\r\n");
fputs(buf,debugfp);
}
}
#endif

I just built DOSBox .73MB5 this morning so I have next to no familiary with it, but I will be looking into this debug log error in a little while so i can get a serial communcations log of the more significant issue- why my Chessmaster 4000 under Win3.11 under DosBox fails to work with the modem emulation or nullmodem emulation when other applications function in that environment.

Thanks in advance for any suggestions or full on assistance 😀

Chas

Reply 1 of 3, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Uh oh better don't post about unofficial builds here.

Does the capture subfolder exist? If not, it might print to an invalid handle, though I fixed this bug a few times already.

1+1=10

Reply 2 of 3, by cg_chas

User metadata
Rank Newbie
Rank
Newbie
h-a-l-9000 wrote:

Uh oh better don't post about unofficial builds here.

Im sorry for this. If it makes any difference, ultimately what I am seeking is the solution that specifically regards the official build. This is just an intermediate stopping point to that end. I am most willing to put in the time where needed to get to the bottom of this and I have some programming experience that should at least help facilitate following developer instructions where needed, if any should arise.

h-a-l-9000 wrote:

Does the capture subfolder exist? If not, it might print to an invalid handle, though I fixed this bug a few times already.

It does exist. i am getting empty (0 byte size) files such as: config_006.serlog.txt

Right now I am following through with some analysis of va_arg, va_end, va_start and some of Microsoft's notes regarding a potential exception error when using /clr:pure. I am not sure if this is related yet, though.

Reply 3 of 3, by cg_chas

User metadata
Rank Newbie
Rank
Newbie

Unhandled exception problem identified!

nullmodem.cpp, line 388

change:

log_ser(dbg_aux,"Nullmodem: A client (%s) has connected.", COMNUMBER,peeripbuf);

to:

log_ser(dbg_aux,"Nullmodem%d: A client (%s) has connected.", COMNUMBER,peeripbuf);

2 args requre 2 format modifers. I can't see how this ever got through unless no testing was done with a nullmodem connection after the logging feature was enabled.

Anyhow, I'll have some logs soon for you to look at when you get time 😀