Scummvm version: 1.5.0git1072-gcc81dfe (Dec 5 2011 12:38:40)
Game: AGI fanmade: Nick's Quest - In Pursuit of QuakeMovie (v2.1 Gold) (DOS/English)
Platform: Win32 on Windows 7
Upon lauching game, usual AGI hourglass mouse cursor appears, is movable for a moment, then freezes. Cannot do anything. Cannot quit ScummVM with Alt-X. Eventually Windows 7 askes if I would like to close the program. (I used the version of Nick's Quest that came with the bundle that used to be linked to the ScummVM news article announcing that fanmade AGI games were now supported. All other fanmade and official AGI games I've tested work; I've tried about a hundred of them.)
A similar thing is happening with 'Star Pilot: Bigger Fish (DOS/English)'.
captainjei: Thank you for this bug report. Have replicated and done some basic investigation.
Both games are triggering an infinite loop in the AGI engine. The AGI engine team will look at fixing this and addressing the underlying cause.
AGI engine devs: Ran with gdb, this shows that the infinite loop is in void AgiEngine::fixPosition(int n) in the engines/agi/checks.cpp file... The cultprit is the while loop with no shouldQuit() clause. Though adding this does not fix the engine quit hangup... and also this is not the underlying cause... Continuing to investigate, but hope this helps anyone else looking at this.
Found a fix for this... Attaching my patch with debug output for investigation as to whether this is "correct".
Fix, but with a bunch of debug as well...
Attaching the clean version of my patch, so you can cleanly see the fix to the logic...
Just the fix Patch
Fixed in beb1f5b. The game scripts incorrectly try to draw a sprite before loading a picture, thus no priority is set up, which leads to checkPriority() failing and fixPosition() looping forever as a result.
Btw, tdhs: your patch results in fixPosition() being always skipped (shouldQuit() returns false, thus the while loop is never processed). Thanks for your work nonetheless, as this helped in pinpointing the actual issue :)