Author Topic: [fixed]Crash with Lua scenario which does not appear in 3.9.1  (Read 783 times)

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
Commit: e5d2bbbf9e26da22dfc206542a838655810cc2b1 but i think works with older too.

I get a crash with a scenario i made.
In line 73 i tried to use {SCENARIOPATH} and scenarioDir() (both crashed) for the staticSound and i think there must be the problem. The game somehow cuts of some letters or even lines.
In 3.9.1 the scenario works fine but if i try with git i get:
(click to show/hide)
(click to show/hide)

How to reproduce:
just start this scenario (you need the map "lost river" from mod-center for this)

The download contains the scenario with {SCENARIOPATH}. Change the function dialog to this to get the other crash:
EDIT: Titi tried this too and he only crashes with {SCENARIOPATH}

Code: [Select]
function dialog (dialogname)
if dialogname=="start" then
setCameraPosition(unitPosition(VikingKing))
playStaticSound(scenarioDir()..'/speak.wav')
showMessage("s1","Narrator")
showMessage("s2","Viking")
end
if dialogname=="nofood" then
setCameraPosition(unitPosition(lastCreatedUnit()))
playStaticSound(scenarioDir()..'/worker.wav')
showMessage("w1","Farmer")
showMessage("w2","Viking")
showMessage("w3","Farmer")
showMessage("w4","Viking")
showMessage("w5","Ally")
end
if dialogname=="allyAttacked" then
setCameraPosition({startLocation(ally)[1]-10,startLocation(ally)[2]})
playStaticSound(scenarioDir()..'/speak2.wav')
showMessage("a1","Ally")
showMessage("a2","Viking")
end
if dialogname=="allySurvived" then
setCameraPosition(startLocation(you))
playStaticSound(scenarioDir()..'/speak2.wav')
showMessage("a3","Ally")
showMessage("a4","Viking")
showMessage("a5","Ally")
end
if dialogname=="ownFood" then
setCameraPosition(unitPosition(lastCreatedUnit()))
playStaticSound(scenarioDir()..'/worker.wav')
showMessage("f1","Farmer")
showMessage("f2","Viking")
end
if dialogname=="sowsCanKill" then
setCameraPosition(unitPosition(lastDeadUnit()))
playStaticSound(scenarioDir()..'/speak2.wav')
showMessage("sow1","Ally")
showMessage("sow2","Viking")
showMessage("sow3","Ally")
end
if dialogname=="endGame" then
setCameraPosition(unitPosition(lastDeadUnit()))
playStaticSound(scenarioDir()..'/speak2.wav')
showMessage("end1","Ally")
showMessage("end2","Viking")
showMessage("end3","Ally")
showMessage("end4","Viking")
end
togglePauseGame(1)
end

I am using Ubuntu 12.04.
« Last Edit: 23 September 2014, 23:19:14 by titi »
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
git  0f3d6c084f22a586339601a567a211efac94174d crashes too.  ( https://github.com/MegaGlest/megaglest-source/commit/0f3d6c084f22a586339601a567a211efac94174d )
I am trying earlier revisions now.

Update:
I think I found the related changes now the bug must have beenintroduced in either

https://github.com/MegaGlest/megaglest-source/commit/5a48eb0b8aee727bbcd750188e1234aea430f29a
or
https://github.com/MegaGlest/megaglest-source/commit/7cae2b53f1a26ad4fb13e4ede8afba68b25cf261

Those are two revisions which directly follow each other ( both  Commits on Jan 28, 2014  ). Before everything was fine, after those two changes it was broken.
« Last Edit: 9 August 2014, 23:34:39 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything