Problem solved, posting here in case someone else somewhere in the world got
this error.
Somewhere up the function stack I didn't allocate enough room when using
MemPtrNew(), and wrote beyond the buffer I allocated room for (this is
unrelated to the txt parameter in the code example).
This caused a heap corruption, and, eventually, the crash.
2007/11/17, Jonathan Carse <[EMAIL PROTECTED]>:
>
> Well, that settles it. I ran some more testing.
>
> Here's the code again:
>
>
> WriteToLog("Calling WinDrawChars()\n");
> WinDrawChars((Char*)txt,NameLen,bounds-> topLeft.x+nRightX-NameWidth,
> bounds->topLeft.y);
> WriteToLog("Called WinDrawChars()\n");
>
>
> WriteToLog() writes to a log file on a memory card using VFS.
> I run my program under debug - everything works fine. (The log file ends
> with "Called WinDrawChars()")
> I run my program regularly, the forms draws OK, and when it's time to draw
> the text - "Fatal exception".
> I take a look at the log file:
>
> Calling GetDirectoryDateTime()
> Called GetBackupDateTime()
> Calling DrawTextInList()
> Calling WinDrawChars()
>
> That's it. The log ends there.
> WinDrawChars() fails under regular execution, and not under debug.
> I'm completely stumped.
> Oh and, yes, I tried running without writing to the log file. Same
> outcome.
>
> Anyone, please?
>
>
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/