zzd10h: As I suggested to you previously, looking the error log above and comparing to the asm code generated, I think the error comes from the call to GetSysTime() in the my_launch() function run by the idler task. My assumption would be that the ITimer interface is still uninitialized at that time (and I'm not sure if it can be shared with the main task).
I suspected that the idler starts before receiving the signal from the main task, even if the code that synchronizes seems to be good.
Huum, looking again just now to the code, "me->tc_Launch = my_launch;" is executed before the wait for the timer initialization in the main task. So, if the idler task is descheduled just after "me->tc_Launch = my_launch;" and comes back before ITimer is initialized in the main task, my_launch() is called and ... boom!
This can happen even more probably that the priority of the idler task is decreased afterwards (and not at the task creation).
Instead of adding the Delay() call, you should inialize the timer interface before creating the idler task.
I suppose the error can be highlighted by changing the rythm (set a high debuglevel and activating munge option) and can have an effect only on some platforms (I failed to reproduce on the MicroAOne and the Sam440).
[SOLVED] OS freeze when using debug kernel with CPU Watcher
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 11:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: OS freeze when using debug kernel with CPU Watcher
THX.corto wrote:zzd10h: As I suggested to you previously, looking the error log above and comparing to the asm code generated, I think the error comes from the call to GetSysTime() in the my_launch() function run by the idler task. My assumption would be that the ITimer interface is still uninitialized at that time (and I'm not sure if it can be shared with the main task).
I suspected that the idler starts before receiving the signal from the main task, even if the code that synchronizes seems to be good.
Huum, looking again just now to the code, "me->tc_Launch = my_launch;" is executed before the wait for the timer initialization in the main task. So, if the idler task is descheduled just after "me->tc_Launch = my_launch;" and comes back before ITimer is
...
Did those changes in cpu.c, I post such new source here: http://forum.hyperion-entertainment.biz ... 504#p28504
Re: OS freeze when using debug kernel with CPU Watcher
It seems that did the trick. No crash to report here anymore (Sam460). Well done.
Re: OS freeze when using debug kernel with CPU Watcher
Changes from Javier in cpu.c implemented in CPUDock and no more freezes with kernel.debug and MUNGE.
Thank you all, very nice !!!
Thank you all, very nice !!!
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: [SOLVED] OS freeze when using debug kernel with CPU Watc
Thank you to all who contributed to the fix 
