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

walk.lua:30: Invalid value for parameter 'x' #1394

Closed
AlexUrbanAc opened this Issue May 1, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@AlexUrbanAc

AlexUrbanAc commented May 1, 2018

CorsixTH Version: 0.61

Operating System: Windows 10
Theme Hospital Version: GOG.com

Describe the issue

Evacuation of the hospital due to uncontained epidemic caused an assert error.

Gamelog.txt

Savegame version is 122 (v0.61), originally it was 122 (v0.61)
Warning: goHome called when the patient is already going home
Warning: goHome called when the patient is already going home
Warning: Trying to remove nonexistant room build callback (function: 38EA7C00) from humanoid (table: 3C9AFC58).
Warning: Trying to remove nonexistant room remove callback (function: 3DE1A2F0) from humanoid (table: 3C9AFC58).
Warning: goHome called when the patient is already going home
Warning: goHome called when the patient is already going home
Error in timer handler:
D:\CorsixTH\Lua\humanoid_actions\walk.lua:30: Invalid value for parameter 'x'
stack traceback:
[C]: in function 'assert'
D:\CorsixTH\Lua\humanoid_actions\walk.lua:30: in local 'constructor'
D:\CorsixTH\Lua\class.lua:74: in global 'WalkAction'
D:\CorsixTH\Lua\entities\humanoid.lua:727: in method 'walkTo'
D:\CorsixTH\Lua\rooms\psych.lua:108: in method 'loop_callback'
D:\CorsixTH\Lua\humanoid_actions\use_object.lua:324: in local 'timer_function'
D:\CorsixTH\Lua\entity.lua:216: in field 'tick'
D:\CorsixTH\Lua\entities\staff.lua:149: in method 'tick'
D:\CorsixTH\Lua\world.lua:1051: in method 'onTick'
D:\CorsixTH\Lua\app.lua:1008: in function <D:\CorsixTH\Lua\app.lua:1005>
(...tail calls...)
D:\CorsixTH\Lua\app.lua:909: in function <D:\CorsixTH\Lua\app.lua:904>

@sadger

This comment has been minimized.

Show comment
Hide comment
@sadger

sadger May 23, 2018

Contributor

Do you have a save before this occurred by any chance?

Contributor

sadger commented May 23, 2018

Do you have a save before this occurred by any chance?

@AlexUrbanAc

This comment has been minimized.

Show comment
Hide comment
@AlexUrbanAc

AlexUrbanAc May 24, 2018

Yes, must have forgotten to upload it.
Ulti XT.zip

AlexUrbanAc commented May 24, 2018

Yes, must have forgotten to upload it.
Ulti XT.zip

@TheCycoONE

This comment has been minimized.

Show comment
Hide comment
@TheCycoONE

TheCycoONE May 24, 2018

Member

Did you do anything with the screen in the psych room?

This error would happen if there was no screen in the room, if it was inaccessible, or possibly if it was in a corrupt state.

(Note: I have not yet looked at your save)

Member

TheCycoONE commented May 24, 2018

Did you do anything with the screen in the psych room?

This error would happen if there was no screen in the room, if it was inaccessible, or possibly if it was in a corrupt state.

(Note: I have not yet looked at your save)

@AlexUrbanAc

This comment has been minimized.

Show comment
Hide comment
@AlexUrbanAc

AlexUrbanAc May 24, 2018

I think all eight psych rooms worked before the evacuation, and I didn't touch anything during the evacuation. I wanted to wait until the hospital is empty before doing anything, but the game crashes before the evacuation is completed.

AlexUrbanAc commented May 24, 2018

I think all eight psych rooms worked before the evacuation, and I didn't touch anything during the evacuation. I wanted to wait until the hospital is empty before doing anything, but the game crashes before the evacuation is completed.

@mugmuggy

This comment has been minimized.

Show comment
Hide comment
@mugmuggy

mugmuggy Jul 25, 2018

Contributor

I wrote a function to call the same code as Epidemic:evacuate. In doing so I was able to replicate the issues without having an active Epidemic.

The loop_callback in PsychRoom:commandEnteringPatient is executing endlessly, as the patient had kings_complex, the walkTo and UseScreen actions are added to the end of the action queue - repeatedly, so as the patient leaves the room, the walkTo is again being called but this time no object could be found.

Changing just

if duration <= 0 then
to an equality check will prevent the repeatedness and fixes the issue.

However will leave the doctor in processing the callback until another patient arrives.

Contributor

mugmuggy commented Jul 25, 2018

I wrote a function to call the same code as Epidemic:evacuate. In doing so I was able to replicate the issues without having an active Epidemic.

The loop_callback in PsychRoom:commandEnteringPatient is executing endlessly, as the patient had kings_complex, the walkTo and UseScreen actions are added to the end of the action queue - repeatedly, so as the patient leaves the room, the walkTo is again being called but this time no object could be found.

Changing just

if duration <= 0 then
to an equality check will prevent the repeatedness and fixes the issue.

However will leave the doctor in processing the callback until another patient arrives.

mugmuggy added a commit to mugmuggy/CorsixTH that referenced this issue Oct 4, 2018

CorsixTH#1394 Kings complex patient in psych when forced to leave wil…
…l not requeue the walkTo/UseScreen upon navigating the door

Staff will also get a MeanderAction if patient no longer in the room.

@TheCycoONE TheCycoONE closed this Oct 8, 2018

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