Stratagus crash when gold mine is empty

Bug #730283 reported by Roman Held on 2011-03-06
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released

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

Roman Held (rheld) wrote :
Pali (pali) wrote :

Please check if this problem is in stable version too.

Roman Held (rheld) wrote :

Yes, I guess it is.. in, 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)..

Pali (pali) wrote :

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

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.

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) on 2011-04-13
Changed in stratagus:
status: New → Confirmed
importance: Undecided → High
Pali (pali) on 2011-04-29
summary: - Assertion and fatal IO error
+ Stratagus crash when gold mine is empty
Pali (pali) wrote :
Changed in stratagus:
assignee: nobody → Pali (pali)
status: Confirmed → Fix Committed
milestone: none → 2.2.6
Pali (pali) on 2011-12-26
Changed in stratagus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments