Issue 702 in corsix-th: Patient Stuck

23 views
Skip to first unread message

cors...@googlecode.com

unread,
Jan 25, 2011, 4:28:24 PM1/25/11
to corsix-t...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 702 by mrapsout...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

What steps will reproduce the problem?
Not Sure see below

What version of CorsixTH are you using (e.g. "Beta 2", "SVN r123")?
Beta 4

What operating system / compile settings are you using?
Win7

What level was this on (e.g. "Demo level", "Full game level 12")?
See attached

Please provide any additional information below.
This has happened to me before on different levels and with different rooms.

In this case look at the inflation clinic.

Attachments:
Alex.sav 278 KB

cors...@googlecode.com

unread,
Jan 25, 2011, 4:40:12 PM1/25/11
to corsix-t...@googlegroups.com

Comment #1 on issue 702 by edvin.li...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Beta 4 is quite old. Could you try out Beta 5 or even better the latest
trunk version to see if it still happens as often?

http://th.corsix.org/corsix-th-latest.html

cors...@googlecode.com

unread,
Feb 21, 2011, 4:23:24 AM2/21/11
to corsix-t...@googlegroups.com

Comment #2 on issue 702 by ladysere...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Version: Beta 5
After a day of constant investigation on this issue, I have resolved the
issue of patients getting stuck seemingly at random. What clued me in was
a constant cycle of:
+ Diagnosed patient goes to GP
+ Then comes out and needs a drink
+ Then uses the restroom and goes back to GP
+ repeat

gp.lua was written so a diagnosed patient would leave the GP with meander
and idle, then nothing afterward. This fix targets that specific case in
two parts.

Attachments:
idle.lua 2.6 KB
gp.lua 7.7 KB

cors...@googlecode.com

unread,
Feb 21, 2011, 8:42:22 AM2/21/11
to corsix-t...@googlegroups.com

Comment #3 on issue 702 by oliver.f...@googlemail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

First off, the files are somewhat outdated (Jan 17th), so i guess updating
to the latest version and testing if the problem is present at all, is
necessary.

I don't think that modifing the idle action with behaviour which belongs to
other objects would be a good idea. It scatters responsibility. (For the
same reason action queues don't get "autofilled" with an idle or
anwser_call action if they are empty.)

This just shows us, that somewhere in the code base some seek_room action
isn't assigned properly or even removed.

The modifications made to the GP might fix this problem, but i'm not sure
if it introduces other problems; due to the fact, that the if-then-else
clause in question should never call the else-part if it behaves properly,
which brings up the question why is "else" there in the first place and why
does it get called at all.

Queueing another seek_room action in onHumanoidLeaveAction is undesirable,
as it will definetly add two seek_room actions to the patient once
diagnosis is successful.

Also, having a look at room.lua might help, as some code is duplicated
there. Maybe the whole problem is a copy-paste-issue from the
room-baseclass to the gp-subclass, when additional behaviour was added
later on.

From my point of view this needs further investigation, but i think we are
close.


cors...@googlecode.com

unread,
Feb 21, 2011, 2:04:51 PM2/21/11
to corsix-t...@googlegroups.com

Comment #4 on issue 702 by ladysere...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

The issue is the else-part is triggered when a patient goes back into the
GP after they already have their diagnosis flag set to True. I played an
entire game and not a single one of these patients had more than one
seek_room actions in their action queue. This is not a real fix for the
issue, its just a band-aid for having stuck patients. The main thing is
now there aren't any stuck patients. As for why the else-block in question
ever gets called ... needs investigation and a real fix.

cors...@googlecode.com

unread,
Feb 21, 2011, 2:50:07 PM2/21/11
to corsix-t...@googlegroups.com
Updates:
Status: Accepted

Comment #5 on issue 702 by jorge...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

To be completely honest, I think one problem with implementing a workaround
is that there no longer is any motivation to fix the problem.

cors...@googlecode.com

unread,
Feb 21, 2011, 3:06:13 PM2/21/11
to corsix-t...@googlegroups.com

Comment #6 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I don't know if I am reading GP.lua correctly, but it looks to me as though
if you diagnose someone before the policy stop_procedure then the
else
patient:queueAction{name = "meander", count = 2}
patient:queueAction{name = "idle"}
is called
I could be completley wrong about this, as I am still picking this coding
stuff up...

cors...@googlecode.com

unread,
Sep 4, 2011, 9:10:45 AM9/4/11
to corsix-t...@googlegroups.com

Comment #7 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Is this still happening?

cors...@googlecode.com

unread,
Sep 4, 2011, 9:44:51 AM9/4/11
to corsix-t...@googlegroups.com

Comment #8 on issue 702 by mrapsout...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I dont know, I have not managed to play the latest release recently.

cors...@googlecode.com

unread,
Oct 24, 2011, 7:29:04 PM10/24/11
to corsix-t...@googlegroups.com
Updates:
Status: Input

Comment #9 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

(No comment was entered for this change.)

cors...@googlecode.com

unread,
Nov 23, 2011, 5:41:34 PM11/23/11
to corsix-t...@googlegroups.com

Comment #10 on issue 702 by puddisei...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

It is still happening with Beta8. See the scanner room to the left of the
main entrance.

Doctors also seem to be affected. There are a few doctors standing around
near the training room. I've tried to fire them in order to get rid of
them, but they won't disappear. Can't pick them up either. They can be
located inside and outside of rooms. I think I've observed the same
behaviour for patients.

Attachments:
Autosave12.sav 438 KB

cors...@googlecode.com

unread,
Nov 23, 2011, 7:57:36 PM11/23/11
to corsix-t...@googlegroups.com

Comment #11 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

When loading your save on the newest version of the game, I get an error
after a few seconds that freezes the game completely (no error inside the
game), but the log gives this:

A stack trace is included below, and the handler has been disconnected.
C:\Games\CorsixTH\Lua\hospital.lua:575: attempt to index field '?' (a nil
value)

stack traceback:
C:\Games\CorsixTH\Lua\hospital.lua:575: in function 'checkFacilites'
C:\Games\CorsixTH\Lua\hospital.lua:768: in function 'onEndDay'
C:\Games\CorsixTH\Lua\world.lua:756: in function 'onTick'
C:\Games\CorsixTH\Lua\app.lua:681: in function 'dispatch'
C:\Games\CorsixTH\Lua\app.lua:583: in function
<C:\Games\CorsixTH\Lua\ap
p.lua:578>

Warning: No event handler for timer

cors...@googlecode.com

unread,
Feb 22, 2012, 3:57:18 PM2/22/12
to corsix-t...@googlegroups.com

Comment #12 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

@ 11
I think your error comes about when there are stuck kicked patients in the
hospital at the time patients are being counted for the seating messages.
If you don't have stuck patients you don't get the error.
I did do a fix for this before Christmas, but I can't find it.
If no one fixes it before, I will attempt it again at the weekend

cors...@googlecode.com

unread,
Feb 22, 2012, 5:14:03 PM2/22/12
to corsix-t...@googlegroups.com

Comment #13 on issue 702 by Grimdoc: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Hm. It can also be your fix already is in the game too?

Or didn't you upload it?

cors...@googlecode.com

unread,
Feb 23, 2012, 3:45:19 AM2/23/12
to corsix-t...@googlegroups.com

Comment #14 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I can't remember if I uploaded it or not. I can remember seeing this issue
and your comment and error and realising what it was down to and doing the
fix before Christmas, then my wife took really ill, so I may have never got
around to posting it here.
I know what is needed, its whether I can remember how I did it! I tried
something last night, but it still crashed on this save, but then again
this save may be beyond help.....
I think that it needs a check to make sure that the patient is still
attached to the hospital before the counting of standing and seated
patients is carried out.

cors...@googlecode.com

unread,
Mar 17, 2012, 10:31:22 AM3/17/12
to corsix-t...@googlegroups.com

Comment #15 on issue 702 by baban...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Hello,
I have a similar issue when a patient got stuck inside the general
diagnostic room.
I'm attaching a file that shows that: the patient in the general diagnostic
room couldn't leave because the door was blocked by a VP person. Please
allow 1 min of play to see that effect.

Attachments:
My2.sav 278 KB

cors...@googlecode.com

unread,
Mar 17, 2012, 11:43:36 AM3/17/12
to corsix-t...@googlegroups.com

Comment #16 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I think that the reason he got stuck has already been fixed in the
development snapshot - here is a link for it
http://th.corsix.org/corsix-th-latest.html or wait a week and there will be
an update on beta 8.
Most likely cause may have been yawning, hard to tell for sure as the error
does not happen now.

cors...@googlecode.com

unread,
Oct 29, 2012, 4:09:56 PM10/29/12
to corsix-t...@googlegroups.com
Updates:
Status: Accepted

Comment #17 on issue 702 by Grimdoc: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

The save from #10 still causes this error, but I have never seen it when
playing for myself:


A stack trace is included below, and the handler has been disconnected.
C:\Games\CorsixTH\Lua\hospital.lua:615: attempt to index field '?' (a nil
value)

stack traceback:
C:\Games\CorsixTH\Lua\hospital.lua:615: in function 'checkFacilites'
C:\Games\CorsixTH\Lua\hospital.lua:826: in function 'onEndDay'
C:\Games\CorsixTH\Lua\world.lua:916: in function 'onTick'
C:\Games\CorsixTH\Lua\app.lua:734: in function
<C:\Games\CorsixTH\Lua\ap
p.lua:732>
(tail call): ?
C:\Games\CorsixTH\Lua\app.lua:636: in function
<C:\Games\CorsixTH\Lua\ap
p.lua:631>

cors...@googlecode.com

unread,
Oct 29, 2012, 4:35:52 PM10/29/12
to corsix-t...@googlegroups.com

Comment #18 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

@ Grimdoc see issue 1155 - which I closed last month.
I think it relates to this save in comment 10


cors...@googlecode.com

unread,
Oct 29, 2012, 4:55:46 PM10/29/12
to corsix-t...@googlegroups.com

Comment #19 on issue 702 by Grimdoc: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Ah, so this is actually fixed then?

cors...@googlecode.com

unread,
Oct 29, 2012, 5:03:02 PM10/29/12
to corsix-t...@googlegroups.com

Comment #20 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I don't think so.

cors...@googlecode.com

unread,
Dec 2, 2012, 8:03:40 AM12/2/12
to corsix-t...@googlegroups.com
Updates:
Labels: Milestone-0.20

Comment #21 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

cors...@googlecode.com

unread,
Jan 23, 2013, 10:53:21 PM1/23/13
to corsix-t...@googlegroups.com

Comment #22 on issue 702 by azrina...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Apperently, by not building toilets and drink machines, this bug will
significantly reduced. Instead, the doctors and janitors will sometimes can
stuck eventhough it is rare.

cors...@googlecode.com

unread,
Mar 12, 2013, 4:14:37 PM3/12/13
to corsix-t...@googlegroups.com
Updates:
Labels: -Milestone-0.20 Milestone-0.30

Comment #23 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Doctors and janitors getting stuck is another issue, I believe.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

cors...@googlecode.com

unread,
May 12, 2013, 8:49:17 AM5/12/13
to corsix-t...@googlegroups.com
Updates:
Cc: edvin.li...@gmail.com
Labels: -Priority-Medium Priority-High

Comment #24 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

(No comment was entered for this change.)

cors...@googlecode.com

unread,
Aug 6, 2013, 9:15:56 AM8/6/13
to corsix-t...@googlegroups.com

Comment #25 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Is anyone still experiencing this? I haven't seen it in a long time!

cors...@googlecode.com

unread,
Aug 6, 2013, 10:47:04 AM8/6/13
to corsix-t...@googlegroups.com

Comment #26 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I opened a save last night that had the same error, but it could be the
save is a few months old. Not too old though as I cleared all my old saves
on release of 0.20

cors...@googlecode.com

unread,
Aug 6, 2013, 4:52:49 PM8/6/13
to corsix-t...@googlegroups.com

Comment #27 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Okay.

cors...@googlecode.com

unread,
Aug 25, 2013, 2:47:15 PM8/25/13
to corsix-t...@googlegroups.com

Comment #28 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Load the save from comment 10 and you soon get an error

Patch it with the attached and load the save again and you won't get the
same error.
Run the game for a bit longer you will get an unrelated error from a Dr in
the staffroom, but if you look around the hospital there are staff stuck
all over the place so I think it is unrelated.

Attachments:
Issue 702.patch 583 bytes

cors...@googlecode.com

unread,
Aug 25, 2013, 4:07:39 PM8/25/13
to corsix-t...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Patch

Comment #29 on issue 702 by maartenp...@hotmail.nl: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

(No comment was entered for this change.)

cors...@googlecode.com

unread,
Aug 27, 2013, 11:05:58 AM8/27/13
to corsix-t...@googlegroups.com

Comment #30 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Yes. This fixes this particular error.
I didn't get any error in save from #15 either.

Added this in r2450.

Should this be kept open for testing feedback?

cors...@googlecode.com

unread,
Aug 27, 2013, 2:20:11 PM8/27/13
to corsix-t...@googlegroups.com
Updates:
Status: Investigating
Cc: -edvin.li...@gmail.com
Labels: -Type-Patch -Priority-High Type-Defect Priority-Medium

Comment #31 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

I have only tried to fix the cause of checkFacilites, not the original
issue, so yes let us keep this open for a while.

cors...@googlecode.com

unread,
Nov 25, 2013, 8:31:40 PM11/25/13
to corsix-t...@googlegroups.com

Comment #32 on issue 702 by sheefn...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702

Hi, I'm also having problems with this bug. I can't finish this level. I've
attached a saved game and framed the two rooms with the same problem. I
think it might have something to do with the excess people standing around.
That being said I cleared them out once and it made no difference. Anyways
here's the file.


Attachments:
10-2_patientsStuckInRooms.sav 394 KB

cors...@googlecode.com

unread,
Dec 24, 2014, 12:43:07 PM12/24/14
to corsix-t...@googlegroups.com
Updates:
Status: Done

Comment #33 on issue 702 by mark.l1...@hotmail.co.uk: Patient Stuck
https://code.google.com/p/corsix-th/issues/detail?id=702

Transferred to our github account end of 2014

https://github.com/CorsixTH/CorsixTH
Reply all
Reply to author
Forward
0 new messages