Interpreter hangs when running "continue processing events" command after "move event" command execution on parallel interpreter #344

Closed
fdelapena opened this Issue Nov 1, 2014 · 8 comments

Projects

None yet

5 participants

@fdelapena
Member

How to reproduce:

  1. Create a parallel event with a move event command.
  2. On the same map, create an automatic event with a continue processing events command.
  3. This command must be set after some behavior specific commands, like wait command or move event. Otherwise, after e.g. a show message will work fine (?).

Here is a test case to verify this weird race condition.

Verified affected games:

  • Desolate City (initial cutscene)
@fdelapena fdelapena added this to the 0.3 milestone Nov 1, 2014
@fdelapena fdelapena changed the title from Interpreter hangs when running continue processing events after move event command execution on parallel interpreter to Interpreter hangs when running "continue processing events" command after "move event" command execution on parallel interpreter Nov 19, 2014
@Zegeri
Member
Zegeri commented Dec 6, 2014

A note: the move event must have a frequency of 8.

@scurest
Contributor
scurest commented Feb 20, 2015

Has this one changed, maybe? I couldn't find Desolate City (link please? :) but I don't think I got the hang in Rainbow Treasure (you don't mean this one,
hang,
do you?).

RPG_RT will hang on the testcase if the movement command takes time to complete. Seems like it only goes through to the next message box if the movement route completes instantly, like a "Face Right" or an empty route or something.

@fdelapena
Member

Not sure if 8cb3d84 changed the behaviour of the test case but it is still hanging at least for Desolate City. Here is a link to the Desolate City game. The game is unreleased yet, but authors contribute with Player with bug reporting.

About the Rainbow Treasure image hang yes, the hang I was reporting is in this cutscene point, just after these "!" appear.

Is #421 somewhat related with this maybe?

@scurest
Contributor
scurest commented Feb 21, 2015

The hang with the ! is actually unrelated: it's caused like this

  1. a switch goes on
  2. the ! events' page condition is met, so they come into existence.
  3. all the characters except Nickel jump and land
  4. because Nickel is on top of the location of the bottom most !, the game won't let her land (in isLandable, the first loop that checks whether there's an event at the same location won't go through) so she gets stuck in the air.

ec7f07d let's you get past that spot in the cutscene.

Thanks for the link for Desolate City, I'll look at it later.

@fdelapena
Member

Wow, neat find, I was guessing it was the same issue because this operation was using the "continue processing events" too and when removing some commands was continuing.

About Desolate City: recently Zegeri said the game may have some relation with the mirror event.

@scurest
Contributor
scurest commented Feb 21, 2015

Confirmed it's the mirror event, just like in the testcase.

So I thought that maybe RPG_RT will run the whole movement event if it can before finishing the Move command, while EasyRPG only runs one move route command each frame.

So I made a quick test: run a move route like

<>Face Right
<>Face Up
<>Face Down
<>Face Left
... repeated a dozen or so times...

and in RPG_RT it completes in one frame so you don't see any movement, but in EasyRPG you see the event rapidly turning since only one command is run each frame.

So the solution I'm thinking of is to process move route commands in a loop like is done for event commands, and then then call this function from CommandMoveEvent. Then anything that completes instantly will come off the pending queue before the Move Event finishes.

@fdelapena fdelapena modified the milestone: 0.3.1, 0.3 Apr 29, 2015
@fdelapena fdelapena added Interpreter and removed Emulation labels May 19, 2015
@fdelapena fdelapena added Hang and removed Crash labels Jun 15, 2015
@Zegeri
Member
Zegeri commented Aug 17, 2015

f40d110 fixes this. Now let's check if it breaks other things.

@fdelapena fdelapena closed this in #542 Aug 25, 2015
@fdelapena
Member

After further testing since latest merges, this ProceedWithMovement bug issue regressed with current master 😢.

It looks like we should really consider to land the automated test system based on event tracer logs sooner.

@fdelapena fdelapena reopened this Feb 29, 2016
@fdelapena fdelapena modified the milestone: 0.4.1, 0.3.1 Feb 29, 2016
@Ghabry Ghabry closed this in e473a51 Mar 8, 2016
@carstene1ns carstene1ns added Events and removed Events Interpreter labels Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment