tchegito / zildo

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

[2.44] RuntimeException in script execution (pos need valid 'who' or 'what') #138

Closed tchegito closed 6 years ago

tchegito commented 6 years ago

map=prisonext (64x64) sprites=[Perso=Zildo Coords:(374.14307, 83.2925 0.0) info=ZILDO mvt=TOUCHE pv=0 weapon=[SWORD,0] name=nicolas lasthit=last hit by Perso=gardenord Coords:(324.19003, 61.559998 0.0) info=ENEMY mvt=null pv=4 on prisonext, 375.14307, 93.2925 (80 - bank 0), 691.0, 540.0 (83 - bank 0), 691.0, 540.0 (SHADOW), 319.3775, 57.002777 (102 - bank 0)] persos=[Perso=Zildo Coords:(374.14307, 83.2925 0.0) info=ZILDO mvt=TOUCHE pv=0 weapon=[SWORD,0] name=nicolas lasthit=last hit by Perso=gardenord Coords:(324.19003, 61.559998 0.0) info=ENEMY mvt=null pv=4 on prisonext] variables={nettleCount=-1, Carlo=[[MOON, 1], 800, 1], allowedDynamite=yes, Dizzie=[[DYNAMITE, 1], 15, 20], moneyStolen=224.0, BilelIgorVillage=[[EMPTY_BAG, 1], 100, 2], [[BLUEDROP, 1], 15, -1], [[DYNAMITE, 1], 100, 2]} scripts=2 scripts running {[fromActions[0 on [pos hector (2, 0) , wait 10 , pos hector (-2, 0) , wait 30 , pos hector (1, 0) , wait 5 , pos hector (-1, 0) ]],death[4 on [herospecial 1 , music ZildoMort , fadeOut 5 , remove , filter 3 , fadeIn , sound ZildoDying , script zildo VIDE , angle zildo , wait 5 , angle zildo 1 , wait 5 , angle zildo 2 , wait 5 , angle zildo 3 , wait 5 , angle zildo , wait 5 , angle zildo 1 , wait 5 , angle zildo 2 , wait 5 , angle zildo 3 , wait 5 , angle zildo , wait 3 , angle zildo 1 , wait 4 , angle zildo 2 , perso zildo addSpr=0.0 , script zildo MORT , if hero_princess:1,0, wait 59 , fadeOut , end 1 ]],} lastdialog=Lugdunia �Vieille femme�: C'est affreux ce qu'ils ont fait à notre Roi ! Que va-t-il nous arriver à présent ? �Petula�: Il parait que d'étranges créatures rôdent autour de l'île des pêcheurs. �Nicolas�: Entendu, je m'en occupe. Ne t'inquiète pas, c'est sans doute une erreur. �Petula�: Je ne sais pas, mais c'est grave ! �Nicolas�: Hein, comment ? Mais ... pourquoi ? �Petula�: Ton grand-père ! Ils l'ont emmené en prison ! �Nicolas�: ... Oui, que se passe-t-il ? �Petula�: Réveille toi nicolas ! �Nicolas�: Allez, il est temps de se coucher. Je suis épuisé. Château de Lugdunia �Nicolas�: Entendu mon roi. Je vous laisse. �Roi Trion�: Reviens me voir au château demain à la première heure, et je te donnerai des instructions précises. �Roi Trion�: Pour l'instant, rentre chez toi. Avant tout, il me faut réfléchir à un plan avec mon fidèle Hector. �Nicolas�: Je comprends, mon roi, et je ferai tout ce... �Roi Trion�: Sans lui, je crains le pire. La nature va s'affoler et les dégats seront imprévisibles. Tu ne peux pas imaginer la gravité de la situation, jeune nicolas ! �Roi Trion�: Peu de gens le savent, mais le sceptre n'est pas qu'un bijou de la famille royale. Il nous permet à tous de vivre paisiblement sur les Terres d'Alembrume. �Roi Trion�: Je vais demander à Maltus de tout faire pour retrouver ma fille, et je te donne ordre de retrouver le sceptre. �Roi Trion�: C'est affreux ce que tu m'as raconté, jeune nicolas. Les deux joyaux de notre royaume nous ont été enlevés, et il faut absolument les retrouver. �Roi Trion�: ...terrible ! Raconte moi tout ce qui s'est passé. �Roi Trion�: Mais ... c'est ... �Roi Trion�: Comment ?!? java.lang.RuntimeException: We need valid 'who' or 'what' attribute in action pos hector (2, 0) at zildo.fwk.script.command.ActionExecutor.render(ActionExecutor.java:164) at zildo.fwk.script.command.ScriptExecutor.renderAction(ScriptExecutor.java:240) at zildo.fwk.script.command.ScriptExecutor.renderElement(ScriptExecutor.java:262) at zildo.fwk.script.command.ScriptExecutor.render(ScriptExecutor.java:138) at zildo.server.state.ScriptManagement.render(ScriptManagement.java:135) at zildo.server.EngineZildo.renderFrame(EngineZildo.java:204) 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:1649) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1354)

tchegito commented 6 years ago

Tough one ! It happens when hero dies EXACTLY at the same time that a timer runs a sub process. So all characters are removed, and if the sub process acts on one of them, BANG ! Null Pointer.

So we have to remove all waiting script when hero dies. Running one were already removed, but not the one in the queue.

tchegito commented 6 years ago

[Fixed in 2.53]

e9eeea6b13c23dc51f06697406d5e439c9c7a6db