tchegito / zildo

The Land of Alembrume
GNU Lesser General Public License v3.0
4 stars 1 forks source link

[2.41] NPE in script execution #128

Closed tchegito closed 6 years ago

tchegito commented 6 years ago

Only details we have is this: (from the google dev console)

java.lang.NullPointerException: 
  at java.lang.FloatingDecimal.readJavaFormatString (FloatingDecimal.java:1068)
  at java.lang.Float.parseFloat (Float.java:459)
  at zildo.fwk.script.logic.FloatVariable.evaluate (FloatVariable.java:85)
  at zildo.fwk.script.logic.FloatOperator.evaluate (FloatOperator.java:41)
  at zildo.fwk.script.logic.FloatExpression.evaluate (FloatExpression.java:153)
  at zildo.fwk.script.command.ActionExecutor.waitForEndAction (ActionExecutor.java:841)
  at zildo.fwk.script.command.ActionExecutor.render (ActionExecutor.java:131)
  at zildo.fwk.script.command.ScriptExecutor.renderAction (ScriptExecutor.java:235)
  at zildo.fwk.script.command.ScriptExecutor.renderElement (ScriptExecutor.java:257)
  at zildo.fwk.script.command.ScriptExecutor.render (ScriptExecutor.java:133)
  at zildo.server.state.ScriptManagement.render (ScriptManagement.java:130)
  at zildo.server.EngineZildo.renderFrame (EngineZildo.java:197)
  at zildo.client.stage.SinglePlayer.updateGame (SinglePlayer.java:172)
  at zildo.client.Client.mainLoop (Client.java:194)
  at com.alembrum.OpenGLRenderer.onDrawFrame (OpenGLRenderer.java:107)
  at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1562)
  at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1262)

It fails when evaluating an 'endCondition' from a 'loop'/'for' keyword. Apparently, it resolves to a local variable 'loc:...' but associated value seems to be NULL.

Candidates:

episode3: (loop keyword) ==>sacherTortue <loop when="loc:nobody=0"> ==>elemBehav <loop when="loc:found=1">

'for' keyword leads to 22 occurences in episode3. ==>makeCloudsDragon ==> fallRocks ==> lavaBubbles ==> starSparke ==> openNatureRoxy and so on ...

tchegito commented 6 years ago

It could be an executing script getting its variables removed by then ending process, but still running ? For example, when hero is leaving a map

tchegito commented 6 years ago

Duplicate of issue #115