MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000956VCMIMechanics - Adventure Mappublic2012-05-15 15:252014-05-30 17:41
ReporterIvan 
Assigned ToTow 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionfixed 
Platformx86_64OSUbuntu LinuxOS Version12.04 (precise)
Product Version 
Target VersionFixed in Version 
Summary0000956: Sometimes VCMI hangs on visiting objects by hero
DescriptionSometimes (~1 time per in-game month) on visiting adventure map object (so far had happened with water wheel, gold pile and creatures) game hangs:
- Interface won't response
- Music still playing
- Closing client will only print message to console "Sent closing signal to the server"

This is not reproducible after reloading game

Uploaded logs and stacktrace from both client and server.
TagsNo tags attached.
Attached Fileszip file icon vcmi-bug-visit-object.zip [^] (69,627 bytes) 2012-05-15 15:25

- Relationships

-  Notes
(0002443)
Ivan (developer)
2012-05-15 20:43
edited on: 2012-05-15 20:44

Got it once more. And I think I found source - deadlock, bit I still have no idea how to fix:

Thread A (GuiHandler::run) stuck here:
3 0x00000000005a19b0 in vstd::unlock_guard<boost::recursive_mutex, vstd::detail::unlock_policy<boost::recursive_mutex> >::~unlock_guard (
    this=0x7ff1ad731820, __in_chrg=<optimized out>)
    at /lib/UnlockGuard.h:72
4 0x0000000000776886 in CPlayerInterface::moveHero (this=0x7ff1a748e220, h=
    0x7ff1a54e8920, path=...)
    at /client/CPlayerInterface.cpp:1254

Thread B (CClient::run) stuck here:
4 0x00007ff1bf4eacb7 in boost::unique_lock<boost::shared_mutex>::unique_lock
    (this=0x7ff1aa971c80, m_=...) at /usr/include/boost/thread/locks.hpp:290
5 0x00007ff1bf4d47e5 in CApplyOnGS<HeroVisit>::applyOnGS (
    this=0x7ff1a5278520, gs=0x7ff1a5322ba0, pack=0x7ff1905859d0)
    at /home/ivan/src/vcmi/lib/CGameState.cpp:77

Any ideas how to fix?

(0002508)
Tow (developer)
2012-05-19 23:00

Fixed in r2698 by reordering locks. :/
Not very nice, it would be best if I had a lock that atomically locks two (heterogeneous) mutexes. Seems not effort-worthy for now.

- Issue History
Date Modified Username Field Change
2012-05-15 15:25 Ivan New Issue
2012-05-15 15:25 Ivan File Added: vcmi-bug-visit-object.zip
2012-05-15 20:43 Ivan Note Added: 0002443
2012-05-15 20:44 Ivan Note Edited: 0002443 View Revisions
2012-05-19 00:07 Tow Assigned To => Tow
2012-05-19 00:07 Tow Status new => assigned
2012-05-19 23:00 Tow Note Added: 0002508
2012-05-19 23:01 Tow Status assigned => resolved
2012-05-19 23:01 Tow Resolution open => fixed
2014-05-30 17:41 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean