Stratagus crash when gold mine is empty

Bug #730283 reported by Roman Held
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Stratagus
Fix Released
High
Pali

Bug Description

Plattform: Ubuntu Maverick (x86_64)
Stratagus: latest trunk revision (7939)
Gamedata: Warcraft 2

I've built stratagus as a debug-version with
$ ./configure --enable-debug

The game ends while playing after an assertion (see attachment). I guess the assertion is the result of an empty gold mine.. the problem is reproducable

Related branches

Revision history for this message
Roman Held (rheld) wrote :
Revision history for this message
Pali (pali) wrote :

Please check if this problem is in stable 2.2.5.5 version too.

Revision history for this message
Roman Held (rheld) wrote :

Yes, I guess it is.. in 2.2.5.5, the same assertion appears.

Just a note: after the assertion, the way how the game exits is sometimes different.. sometimes there is a libc " double free or corruption".. sometimes there is a "X Error of failed request: BadWindow (invalid Window parameter)"

I guess, there is something wrong in the multithreading-code (these kind of error are typical for multithreading-issues)..

Revision history for this message
Pali (pali) wrote :

Ok. It is problem only with debug version (you wrote that you compiled stratagus with --enable-debug)?

Revision history for this message
Roman Held (rheld) wrote :

No.. the release version crashes (seg fault) too.. the only reason for the debug version was the (better) feedback to you.

Revision history for this message
cybermind (iddqd-mail) wrote :

the reason of this bug:
in 7872 revision was deleted this piece of code in actions.cpp:
520 DropResource(unit);
and now when 2 workers enter the mine which have resources only for 1 worker, the game crashes
DropResource(unit) clears any information about resources from unit, also it deassigns it from mine which it was assigned before
so it's need to find a better way to drop worker's resources
maybe the crash happens because of going out of array bounds

Pali (pali)
Changed in stratagus:
status: New → Confirmed
importance: Undecided → High
Pali (pali)
summary: - Assertion and fatal IO error
+ Stratagus crash when gold mine is empty
Revision history for this message
Pali (pali) wrote :
Changed in stratagus:
assignee: nobody → Pali (pali)
status: Confirmed → Fix Committed
milestone: none → 2.2.6
Pali (pali)
Changed in stratagus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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