The tutorial may crash when building roads preparing for warfare scenario

Bug #642897 reported by Hans Joachim Desserud
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

When preparing for the warfare part of the tutorial, the player is given some buildings (warehouse plus a fort and some other military buildings). After these buildings have been placed, roads are built between them. When the long road going south of the fort towards the eastern sentry had been built, this road curved and looked like the top of an S. So, when the script tried to continue this road and connect it too the flag just below the warehouse the only place the road could go was straight through the previous road. At this point the game crashed.
Unfortunately I did not have time to take a screenshot, nor do I have the log from the command line. I have attached a simple sketch, which I hope may make more sense than my explanation.
I assume the reason it crashed was trees taking up too much space, forcing the road to twist, and making it impossible to connect it the the road from the warehouse. While this is just a guess, it may be an idea to make sure the areas around the buildings are cleared, in order to build the roads.

Version: Widelands bzr rev 5518 on Ubuntu 10.04.

Tags: tutorial
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

See the attached sketch. The game crashed when it tried to build a road from flag A to flag B.

tags: added: tutorial
Revision history for this message
SirVer (sirver) wrote :

the problem is that trees are spreading into the location were the streets should be build. I'll investigate that.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → SirVer (sirver)
Revision history for this message
SirVer (sirver) wrote :

Fixed in r5519. Thanks for reporting!

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build16-rc1
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Reopening since it is still possible to crash the tutorial when the roads are built. While it seems the area is cleared for the first roads this does not seem to happen for the long road going below the fort.

While it can happen in normal games, the easiest way to reproduce this is to speed up the game for a while to let the trees spread out and cover the area.

The game will crash with the following error:
PANIC: unprotected error in call to Lua API ([string "map:init"]:131: attempt to index local 'panel' (a nil value))

Widelands bzr rev 5541.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

The attached savegame demonstrates the problem.
Instructions:
1. Load the game.
2. Connect the sentry to the HQ in order for it to get built.
3. Click through a few dialogs.

Changed in widelands:
status: Fix Committed → New
Revision history for this message
SirVer (sirver) wrote :

The tutorial did not crash for me with the attached savegame in bzr5542. Does it crash for you before the trainingsarea in the east is build or after this?

Changed in widelands:
status: New → Incomplete
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

"Does it crash for you before the trainingsarea in the east is build or after this?" When building the roads to connect the buildings.

I've written down a more in-depth description of what happens. Hope this helps:
I load the savegame.
I connect the sentry to the HQ, in order to build it.
When the sentry is finished this triggers the part with geologist/mines.
I click through the dialogs with the geologist.
When the geologist is finished marking resources; the tutorial shifts to soldiers and warfare and the view moves northeast.
The buildings are created. (Everything works fine)
The trees between the trainingcamp and the warehouse disappears and a road is built, connecting the two buildings. (Also fine)
A road is built from the western sentry to the road between the trainingcamp and warehouse. (Still fine)
The game tries to build a road from the western sentry, going below the fort to the eastern sentry. At this point the trees blocking is not removed and the game crashes.

Revision history for this message
SirVer (sirver) wrote :

I could reproduce this now and I made another attempt at this in r5545. Please test.

Changed in widelands:
status: Incomplete → Fix Committed
assignee: SirVer (sirver) → nobody
Revision history for this message
SirVer (sirver) wrote :

I forgot to add: the savegame will still show the wrong behaviour, you have to start a new tutorial game with the current build if you want to test the fix.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Tested a few times and the problem seem to be properly fixed now. Thanks :)

Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.