New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patient getting stuck inside a room #1401

Open
ghost opened this Issue May 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented May 18, 2018

Patients get stuck in any room, this output is from trying to edit a Pharmacy with a stuck patient in it, the lua and the game get broken afterwards since clicking doesn't work anymore:

Created game with savegame version 122.
Warning: Trying to remove nonexistant room build callback (function: 30CDC040) from humanoid (table: 346426D0).
Warning: Trying to remove nonexistant room remove callback (function: 306AB218) from humanoid (table: 346426D0).
Warning: Trying to remove nonexistant room build callback (function: 34D24FD8) from humanoid (table: 34542068).
Warning: Trying to remove nonexistant room remove callback (function: 30C10C98) from humanoid (table: 34542068).
Warning: Trying to remove nonexistant room build callback (function: 349976D0) from humanoid (table: 2FDC3E30).
Warning: Trying to remove nonexistant room remove callback (function: 30C1D178) from humanoid (table: 2FDC3E30).
Warning: Trying to remove nonexistant room build callback (function: 34D1A340) from humanoid (table: 3465A920).
Warning: Trying to remove nonexistant room remove callback (function: 351EC5E8) from humanoid (table: 3465A920).
Warning: Trying to remove nonexistant room build callback (function: 351EDE60) from humanoid (table: 34795DD0).
Warning: Trying to remove nonexistant room remove callback (function: 351C2200) from humanoid (table: 34795DD0).
Warning: Trying to remove nonexistant room build callback (function: 351EFE50) from humanoid (table: 34FCFB18).
Warning: Trying to remove nonexistant room remove callback (function: 34AC3D58) from humanoid (table: 34FCFB18).
Warning: Trying to remove nonexistant room build callback (function: 351F45D8) from humanoid (table: 34778418).
Warning: Trying to remove nonexistant room remove callback (function: 30C52618) from humanoid (table: 34778418).
Warning: Trying to remove nonexistant room build callback (function: 34D26510) from humanoid (table: 346BBCF8).
Warning: Trying to remove nonexistant room remove callback (function: 30C219B8) from humanoid (table: 346BBCF8).
Warning: Trying to remove nonexistant room build callback (function: 30CEF4C0) from humanoid (table: 345437B0).
Warning: Trying to remove nonexistant room remove callback (function: 0EC6EE08) from humanoid (table: 345437B0).
Warning: Trying to remove nonexistant room build callback (function: 3635CE98) from humanoid (table: 35058F70).
Warning: Trying to remove nonexistant room remove callback (function: 35053570) from humanoid (table: 35058F70).
Warning: Trying to remove nonexistant room build callback (function: 34D26900) from humanoid (table: 34BDD198).
Warning: Trying to remove nonexistant room remove callback (function: 34A2A5B0) from humanoid (table: 34BDD198).
Warning: Trying to remove nonexistant room build callback (function: 3044FCD0) from humanoid (table: 3478D2C0).
Warning: Trying to remove nonexistant room remove callback (function: 375F4358) from humanoid (table: 3478D2C0).
Warning: Trying to remove nonexistant room build callback (function: 351F52F8) from humanoid (table: 3482EEE0).
Warning: Trying to remove nonexistant room remove callback (function: 30C29778) from humanoid (table: 3482EEE0).
Warning: Trying to remove nonexistant room build callback (function: 37A37860) from humanoid (table: 34707950).
Warning: Trying to remove nonexistant room remove callback (function: 37599898) from humanoid (table: 34707950).
Warning: Trying to remove nonexistant room build callback (function: 30CF0790) from humanoid (table: 35064EB0).
Warning: Trying to remove nonexistant room remove callback (function: 35868040) from humanoid (table: 35064EB0).
Warning: Trying to remove nonexistant room build callback (function: 3635D1E0) from humanoid (table: 34DE9300).
Warning: Trying to remove nonexistant room remove callback (function: 34A36070) from humanoid (table: 34DE9300).
Warning: Trying to remove nonexistant room build callback (function: 30CDF728) from humanoid (table: 345B6D50).
Warning: Trying to remove nonexistant room remove callback (function: 34ABF298) from humanoid (table: 345B6D50).
Warning: Trying to remove nonexistant room build callback (function: 351F4300) from humanoid (table: 371336A0).
Warning: Trying to remove nonexistant room remove callback (function: 35EB5F20) from humanoid (table: 371336A0).
Warning: Trying to remove nonexistant room build callback (function: 36350018) from humanoid (table: 34FD0B80).
Warning: Trying to remove nonexistant room remove callback (function: 35EBC980) from humanoid (table: 34FD0B80).
Warning: Trying to remove nonexistant room build callback (function: 36351BA8) from humanoid (table: 34CAFC98).
Warning: Trying to remove nonexistant room remove callback (function: 34ABAF58) from humanoid (table: 34CAFC98).
Warning: Trying to remove nonexistant room build callback (function: 351F2B28) from humanoid (table: 34B5CAA8).
Warning: Trying to remove nonexistant room remove callback (function: 0EC70B28) from humanoid (table: 34B5CAA8).
Warning: Trying to remove nonexistant room build callback (function: 34D215A8) from humanoid (table: 30412FA8).
Warning: Trying to remove nonexistant room remove callback (function: 342B6408) from humanoid (table: 30412FA8).
Warning: Trying to remove nonexistant room build callback (function: 34D21420) from humanoid (table: 3453E6C0).
Warning: Trying to remove nonexistant room remove callback (function: 375F6D38) from humanoid (table: 3453E6C0).
Warning: Trying to remove nonexistant room build callback (function: 351F3880) from humanoid (table: 30410708).
Warning: Trying to remove nonexistant room remove callback (function: 375F2978) from humanoid (table: 30410708).
Warning: Trying to remove nonexistant room build callback (function: 351EE5D0) from humanoid (table: 34670600).
Warning: Trying to remove nonexistant room remove callback (function: 34A30810) from humanoid (table: 34670600).
Warning: Trying to remove nonexistant room build callback (function: 30CDEF80) from humanoid (table: 34764638).
Warning: Trying to remove nonexistant room remove callback (function: 342B4108) from humanoid (table: 34764638).
Warning: Trying to remove nonexistant room build callback (function: 30CDEB90) from humanoid (table: 2FE3D7C0).
Warning: Trying to remove nonexistant room remove callback (function: 34A31870) from humanoid (table: 2FE3D7C0).
Warning: Trying to remove nonexistant room build callback (function: 34D259E8) from humanoid (table: 3753FE58).
Warning: Trying to remove nonexistant room remove callback (function: 375F4EB8) from humanoid (table: 3753FE58).
Warning: Trying to remove nonexistant room build callback (function: 3044C150) from humanoid (table: 34677E50).
Warning: Trying to remove nonexistant room remove callback (function: 35E89300) from humanoid (table: 34677E50).
Warning: Trying to remove nonexistant room build callback (function: 34D1A030) from humanoid (table: 345EB960).
Warning: Trying to remove nonexistant room remove callback (function: 35EB1B00) from humanoid (table: 345EB960).
Warning: Trying to remove nonexistant room build callback (function: 34D1CC28) from humanoid (table: 34708710).
Warning: Trying to remove nonexistant room remove callback (function: 35EB5020) from humanoid (table: 34708710).
Warning: Trying to remove nonexistant room build callback (function: 30A32190) from humanoid (table: 3464BBE0).
Warning: Trying to remove nonexistant room remove callback (function: 0EC78008) from humanoid (table: 3464BBE0).
Warning: Trying to remove nonexistant room build callback (function: 37A3AED8) from humanoid (table: 34521550).
Warning: Trying to remove nonexistant room remove callback (function: 34A2BC90) from humanoid (table: 34521550).
Warning: Trying to remove nonexistant room build callback (function: 36350130) from humanoid (table: 34553FF8).
Warning: Trying to remove nonexistant room remove callback (function: 30B571C8) from humanoid (table: 34553FF8).
Warning: Trying to remove nonexistant room build callback (function: 30A2AD68) from humanoid (table: 3040FE20).
Warning: Trying to remove nonexistant room remove callback (function: 37592A38) from humanoid (table: 3040FE20).
Warning: Trying to remove nonexistant room build callback (function: 34D1C918) from humanoid (table: 30C0CF48).
Warning: Trying to remove nonexistant room remove callback (function: 35E87B00) from humanoid (table: 30C0CF48).
Warning: Trying to remove nonexistant room build callback (function: 35E72A08) from humanoid (table: 346FF700).
Warning: Trying to remove nonexistant room remove callback (function: 34ABEF78) from humanoid (table: 346FF700).
Warning: Trying to remove nonexistant room build callback (function: 37A401C0) from humanoid (table: 34775088).
Warning: Trying to remove nonexistant room remove callback (function: 35ED94E0) from humanoid (table: 34775088).
Warning: Trying to remove nonexistant room build callback (function: 375FF6E0) from humanoid (table: 346D0628).
Warning: Trying to remove nonexistant room remove callback (function: 3759BAF8) from humanoid (table: 346D0628).
Warning: Trying to remove nonexistant room build callback (function: 30CDB240) from humanoid (table: 3464C258).
Warning: Trying to remove nonexistant room remove callback (function: 34AC4A58) from humanoid (table: 3464C258).
Warning: Trying to remove nonexistant room build callback (function: 30A2EE28) from humanoid (table: 347000D8).
Warning: Trying to remove nonexistant room remove callback (function: 34A283B0) from humanoid (table: 347000D8).
Warning: Trying to remove nonexistant room build callback (function: 30A33348) from humanoid (table: 347D1F50).
Warning: Trying to remove nonexistant room remove callback (function: 30B56588) from humanoid (table: 347D1F50).
Warning: Trying to remove nonexistant room build callback (function: 3760B220) from humanoid (table: 347CD400).
Warning: Trying to remove nonexistant room remove callback (function: 34AC2DD8) from humanoid (table: 347CD400).
Warning: goHome called when the patient is already going home
Savegame version is 122 (v0.61), originally it was 122 (v0.61)
Error in buttonup handler: 
D:\Games\CorsixTH\Lua\objects\litter.lua:97: attempt to index a nil value (local 'self')
stack traceback:
	D:\Games\CorsixTH\Lua\objects\litter.lua:97: in field 'remove'
	D:\Games\CorsixTH\Lua\dialogs\edit_room.lua:613: in method 'returnToDoorPhase'
	D:\Games\CorsixTH\Lua\dialogs\edit_room.lua:189: in local 'callback'
	D:\Games\CorsixTH\Lua\window.lua:682: in method 'handleClick'
	D:\Games\CorsixTH\Lua\window.lua:1478: in field 'onMouseUp'
	D:\Games\CorsixTH\Lua\dialogs\place_objects.lua:448: in function <D:\Games\CorsixTH\Lua\dialogs\place_objects.lua:447>
	(...tail calls...)
	D:\Games\CorsixTH\Lua\window.lua:1462: in field 'onMouseUp'
	D:\Games\CorsixTH\Lua\ui.lua:654: in function <D:\Games\CorsixTH\Lua\ui.lua:641>
	(...tail calls...)
	D:\Games\CorsixTH\Lua\app.lua:909: in function <D:\Games\CorsixTH\Lua\app.lua:904>

blaster.zip

My guess is the patient might be vomiting inside the room or something like that, because a handyman remains stuck outside the room trying to enter, even if there is no plant or machinery inside the room, but the litter might be removed from other parts of the code causing a bug where the targeted litter is now null, not sure. Of course, the patient can move around in the room, but he can't leave or die, compromising the room.

CorsixTH Version: 0.61

Operating System: Windows 7

Theme Hospital Version: Origin

@TheCycoONE

This comment has been minimized.

Show comment
Hide comment
@TheCycoONE

TheCycoONE May 18, 2018

Member

What version is this? Please fill out the issue template.

Member

TheCycoONE commented May 18, 2018

What version is this? Please fill out the issue template.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 2, 2018

Same or maybe another bug related to this issue: it seems that in some rare conditions a patient is invited to leave the room and requeue, like when a doctor or nurse is too tired and wants to go to the staff room, but the Room:createLeaveAction seems to be interruptible in some special cases, in walk.lua at line 64!

So a patient tries to leave the room, that action is somehow interrupted, and then the patient ends up trying to requeue while still inside the room, which is not covered by a case, therefore the patient gets stuck waiting for Christmas and getting the whole room stuck with them.

My quick fix for now is to comment out ":truncateOnHighPriority()" on line 89 in function Room:createLeaveAction found in the room.lua file. I don't see a reason why the leave action should be interruptible as it only invites to create hidden bugs, I think someone was overzelous about it.

ghost commented Jun 2, 2018

Same or maybe another bug related to this issue: it seems that in some rare conditions a patient is invited to leave the room and requeue, like when a doctor or nurse is too tired and wants to go to the staff room, but the Room:createLeaveAction seems to be interruptible in some special cases, in walk.lua at line 64!

So a patient tries to leave the room, that action is somehow interrupted, and then the patient ends up trying to requeue while still inside the room, which is not covered by a case, therefore the patient gets stuck waiting for Christmas and getting the whole room stuck with them.

My quick fix for now is to comment out ":truncateOnHighPriority()" on line 89 in function Room:createLeaveAction found in the room.lua file. I don't see a reason why the leave action should be interruptible as it only invites to create hidden bugs, I think someone was overzelous about it.

@mugmuggy

This comment has been minimized.

Show comment
Hide comment
@mugmuggy

mugmuggy Jul 24, 2018

Contributor

Just took a look at this one and it appears the same issue as #1081. A despawned patient has the lock on the door. then it would appear that the rest comes from the edit room attempt/leave action, leaving the nurse trying to go to staff room, patient trying to walk to the next nearest pharmacy etc.

And then there is litter somehow in the room at 68,30 which appears to come about due to some sequence of events that has allowed the patient to appear not in a room, ie Room:onHumanoidLeave called for the patient, but then unable to leave, maybe due to the truncate.

The reason the litter removal fails is due to a bug in the call to the remove method. Though I think litter in room (pee/poop too) would not be normal and the code that was changed was probably to support older releases where at the time, you just built over with no removal.

Contributor

mugmuggy commented Jul 24, 2018

Just took a look at this one and it appears the same issue as #1081. A despawned patient has the lock on the door. then it would appear that the rest comes from the edit room attempt/leave action, leaving the nurse trying to go to staff room, patient trying to walk to the next nearest pharmacy etc.

And then there is litter somehow in the room at 68,30 which appears to come about due to some sequence of events that has allowed the patient to appear not in a room, ie Room:onHumanoidLeave called for the patient, but then unable to leave, maybe due to the truncate.

The reason the litter removal fails is due to a bug in the call to the remove method. Though I think litter in room (pee/poop too) would not be normal and the code that was changed was probably to support older releases where at the time, you just built over with no removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment