Hi,
I'm trying to use DOS library function TimedDosRequesterTags() to display error messages. I'm obviously doing something wrong because the function call causes Guru Meditation 80000003. I have no idea why that happens. Can anyone give a working example?
My call is as follows:
nDummy = IDOS->TimedDosRequesterTags ( TDR_TitleString, ( STRPTR ) MSG_REQ_TITLE, TDR_GadgetString, ( STRPTR ) MSG_REQ_OK, TDR_FormatString, ( STRPTR ) szMessage, TDR_ImageType, TDRIMAGE_ERROR, TAG_DONE );
This piece of code is far too short to tell anything.
Let's collect possible reasons:
- IDOS is not initialized
- MSG_REQ_TITLE, MSG_REG_OK or szMessage are not valid string pointers
- szMessage contains format specifiers but you don't supply an ArgArray
- someting else in an other part of your program
MSG_REQ_TITLE and MSG_REQ_OK are defines:
The TimedDosRequesterTags call is inside the following function:
In the main program I make a DisplayMessage function call which summons the Guru:
DisplayMessage ( "out of memory" );
If I ignore the Guru Meditation (DSI error) with Grim Reaper, the requester opens and it looks OK.
Are you sure is te requester is the cause of the DSI?
You can try to add -gstabs in link/compile and the see what line is causing the error.
Using hardcoded strings, make it DSI too?
Or if you change DisplayMessage() with a simple 'Printf("out of memory\n")'?
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
I found the bug!
There was one line left of the old code in the DisplayMessage function which was not commented away. It caused the DSI error. Once I commented the line, error was gone.
So, what was the line? :-)