Opened 13 years ago
Closed 11 years ago
#5705 closed defect (fixed)
SCI: PQ1VGA - Crash at the gun locker
Reported by: | SF/kuroshiro | Owned by: | m-kiewitz |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | original | |
Cc: | Game: | Police Quest 1 |
Description
Police Quest I: In Pursuit of the Death Angel (VGA Remake/DOS/English) ScummVM 1.4.0git441-g16a0d8e Windows 7 x64
At the jail, when you put your gun in the sidearms locker, if you quickly click a second time after placing the gun in, the game will crash with the error: ERROR: lookupSelector(): Attempt to send to non-object or invalid script. Address was 0000:0000.
It's not a huge problem, as it can be avoided easily enough by simply not clicking a second time.
Ticket imported from: #3303802. Ticket imported from: bugs/5705.
Attachments (1)
Change History (15)
by , 13 years ago
Attachment: | pq1sci.004 added |
---|
comment:1 by , 13 years ago
Owner: | set to |
---|
comment:2 by , 13 years ago
This bug report is a duplicate of bug #3036933 : "PQ1VGA : Engine Abort When Putting Away Gun at Jail" https://sourceforge.net/tracker/?func=detail&aid=3036933&group_id=37116&atid=418820
This was closed without being fixed as a minor bug to be dealt with later.
thebluegr: Could you take a look again at this one?
comment:4 by , 13 years ago
Keywords: | script added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 13 years ago
Resolution: | fixed → duplicate |
---|
comment:6 by , 13 years ago
This is a rather bad fix, as it can cause heisenbugs in just about all other SCI games. Moreover, it potentially "taints" all savegames made with this revision. Please revert!
comment:7 by , 13 years ago
Status: | closed → new |
---|
comment:9 by , 13 years ago
Resolution: | duplicate |
---|
comment:10 by , 13 years ago
A slight update on this:
The crash happens in script 937, as mentioned, inside IconBar::handleEvent. Here's part of the script function in question:
code_0701: push1
pTos curIcon
callk IsObject, $2 <----- check the current icon
bnt code_0733
pushi $1f ; 31, type
push1
pushi $1f ; 31, type
push0
pToa curIcon
send $4
push
pushi $25 ; 37, '%', message
push1
pTos curIcon
pToa useIconItem
eq?
bnt code_0727
pushi $25 ; 37, '%', message
push0
pToa curInvIcon <-------- crash!
send $4
jmp code_072e
This is fairly standard code in many SCI games. The crash occurs because the inventory object is destroyed with the first click, so when clicking the second time, the code will attempt to check it again and crash.
This is a racing condition: after clicking the first time to place the weapon, the locker screen should close, however it remains functional for some seconds, which is why the crash occurs.
IMHO, the correct way to resolve this would be to either remove the delay after the gun is placed, and close the locker screen immediately, or disable any actions on the locker after the gun is placed.
comment:11 by , 11 years ago
Summary: | SCI: PQ1VGA - Crash at the jail → SCI: PQ1VGA - Crash at the gun locker |
---|
comment:12 by , 11 years ago
Keywords: | original added; script removed |
---|---|
Owner: | changed from | to
Resolution: | → fixed |
comment:14 by , 11 years ago
Status: | new → closed |
---|
save at the sidearms locker