Page 1 of 1

Debug output bug

Posted: Wed Oct 16, 2013 8:44 pm
by xenic
Dumping the debugbuffer is no longer working properly. If a program sends debug output with IExec-DebugPrintF after an AmigaOS reboot (warm reboot) the debug output is not displayed by DumpDebugBuffer. After a system reset (cold boot), DumpDebugBuffer starts working again and program debug output will be displayed. This is not the way DumpDebugBuffer worked previously.

To reproduce:
Turn on or reset the computer.
Run a program that produces DebugPrintF output.
Enter "DumpDebugBuffer CLEAR" in a shell and the debug output is displayed.
Perform an AmigaOS reboot (warm reboot i.e. Ctrl-Amiga-Amiga).
Run a program that produces DebugPrintF output.
Enter "DumpDebugBuffer" in a shell and nothing is displayed.

EDIT: Previously, dumping debug output after AmigaOS reboots worked.

Re: Debug output bug

Posted: Thu Oct 17, 2013 9:14 pm
by Raziel
Im not using it that much, but isnt "DumpDebugBuffer" meant to display the buffer and the "CLEAR" opion used to actually clear the buffer after display?
Would at least explain why the buffer is empty for yu on reboot?

Re: Debug output bug

Posted: Fri Oct 18, 2013 12:44 am
by xenic
@Raziel
Maybe I didn't make myself clear. I just use CLEAR to avoid the initial system debug stuff from being display every time you enter dumpdebugbuffer. What I'm saying is that after an Amiga (soft) reboot, you can't read any new stuff (with dumpdebugbuffer) that is written to the debug output after the reboot. If you don't use the CLEAR argument with dumpdebugbuffer you will see the same contents every time you enter dumpdebugbuffer.

Re: Debug output bug

Posted: Fri Oct 18, 2013 10:48 pm
by nbache
It would probably make sense to have a ClearDebugBuffer command (and let DumpDebugBuffer continue to always dump the buffer - with or without also clearing it).

Best regards,

Niels

Re: Debug output bug

Posted: Sun Oct 20, 2013 7:14 pm
by xenic
@nbache
The clearing of the buffer has nothing to do with the problem I'm reporting. I just used the DumpDebugBuffer "CLEAR" argument so that anyone testing the debug output would not be confused by the debug output produced by the system when you first turn on your computer and it boots. I already have a command that just clears the debug buffer; I have an alias for "DumpDebugBugger CLEAR" in my shell startup (i.e. Alias Dump "DumpDebugBuffer CLEAR").

The bug I'm reporting is that after you have done a warm reboot (Ctrl-Amiga-Amiga) debug output from a program cannot be recovered from the debug buffer (in memory) by entering DumpDebugBuffer. That was not the case until recent system changes obtained AmiUpdate. To help demonstrate the problem I will attach a small utility named "debug" that sends one line of serial debug output. Using that utility try this:

Boot your system normally.
In a shell enter "debug" and then enter "DumpDebugBuffer" in the same shell.
At the bottom of all the system debug output in the shell you will see the debug output from my "debug" utility.
The default serial output from my "debug" utility is "Debug output test!!".

Perform an Amiga reboot (Ctrl-Amiga-Amiga).
In a shell enter "debug" and then enter "DumpDebugBuffer" in the same shell.
You will not see the second debug output from my "debug" utility (only the first).
No matter how many times you run my "debug" utility you won't see any new debug
output when your run DumpDebugBuffer after a soft (Amiga) reboot.
Before the latest OS4 changes you would see the new debug output.

What it all means is that if a programmer has beta testers that are testing a program after they have performed a soft reboot (Ctrl-Amiga-Amiga), they will not be able to recover any debug output by entering DumpDebugBuffer.
debug.lha
Debug testing
(3.43 KiB) Downloaded 235 times

Re: Debug output bug

Posted: Mon Oct 21, 2013 12:16 am
by nbache
Ah, sorry, I misunderstood what this was about. I thought it was a request for making DumpDebugbuffer clear the buffer "silently".

I understand it now. I'll try to recreate and get back.

Best regards,

Niels

Re: Debug output bug

Posted: Mon Oct 21, 2013 9:37 pm
by nbache
Confirmed. Basically, after a full reset/cold start you can add what you want to the debugbuffer and retrieve it again with dumpdebugbuffer. When you do a warm reset, you can still retrieve what was already in the buffer from before the reset (which is of course the most important purpose of the debug buffer), but new stuff you add is not saved (or at least not displayed with dumpdebugbuffer), whether or not you clear the buffer in between.

And whats more, it works the same in my beta system. The thing is, for beta testing I (and probably most OS4 beta testers and developers) normally use a serial cable to another computer and not the debug buffer, because that means we can also catch the output during a hard crash/lockup. In other words, we have our os4_commandline set to serial.

Not an excuse, but maybe an explanation why this rather obvious problem wasn't found before.

I'll get it logged in Bugzilla ASAP. (Edit: Done.)

Thanks for the report!

Best regards,

Niels

Re: Debug output bug

Posted: Tue Oct 22, 2013 8:59 pm
by xenic
@nbache
Thanks for getting the problem into the BugZilla. I know the OS4 betatesters are using a serial cable but a lot of OS4 users who test 3rd party programs don't have a serial cable setup and rely on dumping the debug buffer to get the debug statements. Unless a user is aware of the new problem, they will probably just think that there was no debug output when nothing new shows up when they enter DumpDebugBuffer.

Thanks again.