[hatari-devel] Latest Hatari HG version gets stuck sometimes
Eero Tamminen
eerot at users.berlios.de
Fri Jul 17 20:37:37 CEST 2009
Hi,
On Friday 17 July 2009, npomarede at corp.free.fr wrote:
> >> While trying to fix another demo, I tried to restore a fresh snapshot
> >> and was lucky enough to get the reported crash problem when restoring
> >> it :)
I guess this snapshot wasn't from time before new video.c?
> >> This is with the latest head sources, so with the sequence :
> >>
> >> Video_ClearOnVBL();
> >>
> >> Video_StartInterrupts(PendingCyclesOver);
> >>
> >> ShortCut_ActKey();
> >>
> >> I get the same wrong value for LineCycle in ConvertPosition, but this
> >> is due to a wrong value of nHBL. My value is 53, but this is the
> >> first line of the VBL, it should be 0 !
> >>
> >> Adding
> >> fprintf ( stderr, "capt %d\n" , nHBL );
> >>
> >> at the end of Video_MemorySnapShot_Capture, I can see that the
> >> restored value for nHBL is indeed 53. So the problem is in the saved
> >> snapshot.
> >>
> >> Thomas, do you know how this is possible ? I thought snapshots were
> >> captured only during the VBL handler, which means nHBL should be 0
> >> and saved this way.
IKBD_InterruptHandler_AutoSend() calls Main_EventHandler() which can invoke
the options dialog too.
> > I don't know ... nHBL should always be cleared on Video_ClearOnVBL !?!
>
> > How did you create the snapshot (shortcut? GUI? Python-UI?)?
> > Can you somehow reproduce such faulty snapshots? Then you could add an
> > assert(nHBL == 0) to Video_MemorySnapShot_Capture to analyse the
> > problem with gdb.
Btw. I think it would be bit cleaner if you would set nHBL, nStartHBL &
nEndHBL as static in video.c and would provide helper function that
could provide a boolean value for this check in mfp.c:
if ( (nHBL >= nStartHBL ) && ( nHBL < nEndHBL ) /* ensure display is ON
and timer B can happen */
(And maybe the nHBL values in mfp.c LOG_PRINTs could use another
helper function.)
> Yes, it should be cleared by Video_ClearOnVBL.
> But perhaps the snapshot procedure can interrupt hatari at another place
> than in the VBL ? In my case, I used the gui, F12, then save snapshot.
>
> I wasn't able to reproduce, but I will add some debug traces to see if I
> can trigger it again.
The thing I described in the "Interrupt assert triggered by video.c"
mail was triggered by resolution switch in Falcon mode, not by memory
snapshort save or restore.
- Eero
More information about the hatari-devel
mailing list