Opened 13 years ago

Closed 13 years ago

#5916 closed defect (fixed)

AGI-FANMADE: Nick's Quest hangs ScummVM upon starting

Reported by: SF/captainjei Owned by: bluegr
Priority: normal Component: Engine: AGI
Version: Keywords: script
Cc: Game: AGI Fanmade

Description

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.)

Ticket imported from: #3451122. Ticket imported from: bugs/5916.

Attachments (2)

agi-fix-debug.patch (3.8 KB ) - added by digitall 13 years ago.
Fix, but with a bunch of debug as well…
agi-fix-clean.patch (900 bytes ) - added by digitall 13 years ago.
Just the fix Patch

Download all attachments as: .zip

Change History (9)

comment:1 by tsoliman, 13 years ago

Summary: Nick's Quest hangs ScummVM upon startingAGI-FANMADE: Nick's Quest hangs ScummVM upon starting

comment:2 by SF/captainjei, 13 years ago

A similar thing is happening with 'Star Pilot: Bigger Fish (DOS/English)'.

comment:3 by digitall, 13 years ago

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.

comment:4 by digitall, 13 years ago

Found a fix for this... Attaching my patch with debug output for investigation as to whether this is "correct".

by digitall, 13 years ago

Attachment: agi-fix-debug.patch added

Fix, but with a bunch of debug as well...

comment:5 by digitall, 13 years ago

Attaching the clean version of my patch, so you can cleanly see the fix to the logic...

by digitall, 13 years ago

Attachment: agi-fix-clean.patch added

Just the fix Patch

comment:6 by bluegr, 13 years ago

Keywords: script added
Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:7 by bluegr, 13 years ago

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 :)

Note: See TracTickets for help on using tickets.