MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002322VCMIMechanics - Battlespublic2015-11-01 01:342024-01-30 19:18
ReporterSXX 
Assigned To 
PrioritynormalSeveritycrashReproducibilityrandom
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version0.98d 
Target VersionFixed in Version 
Summary0002322: Crash after battle finished
DescriptionNew bug within current develop that I can't 100% reproduce yet. For sure it's looks like appear more often when magic was used in battle.

Current commit: 34cc9c78f7c6bfc7c3b61f84022bcd7e23db7504
Additional Information
0	__GI_raise	/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so	56	0x7ffff2acdcc9	
1	__GI_abort	/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so	89	0x7ffff2ad10d8	
2	__assert_fail_base	/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so	92	0x7ffff2ac6b86	
3	__GI___assert_fail	/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so	101	0x7ffff2ac6c32	
4	boost::condition_variable::~condition_variable	condition_variable_fwd.hpp	81	0x59ec71	
5	CondSh<BattleAction *>::~CondSh	CBattleInterface.h	32	0x599d03	
6	CBattleInterface::~CBattleInterface	CBattleInterface.cpp	436	0x57f212	
7	CBattleInterface::~CBattleInterface	CBattleInterface.cpp	405	0x57fbb9	
8	CGuiHandler::popInts	CGuiHandler.cpp	133	0x6078a0	
9	CBattleResultWindow::bExitf	CBattleInterfaceClasses.cpp	481	0x5d8441	
10	CBattleResultWindow::CBattleResultWindow(BattleResult const&, SDL_Rect const&, CPlayerInterface&)::$_6::operator()() 
const	CBattleInterfaceClasses.cpp	329	0x5db748	
11	std::_Function_handler<void (), CBattleResultWindow::CBattleResultWindow(BattleResult const&, 
SDL_Rect const&, CPlayerInterface&)::$_6>::_M_invoke(std::_Any_data const&)	functional	
2071	0x5db5bd	
12	std::function<void ()>::operator()() const	functional	2471	0x5a11ae	
13	CFunctionList<void ()>::operator()<>() const	FunctionList.h	62	0x5e3d9c	
14	CButton::onButtonClicked	Buttons.cpp	163	0x63d89c	
15	CButton::clickLeft	Buttons.cpp	188	0x63da57	
16	virtual thunk to CButton::clickLeft(boost::logic::tribool, bool)	Buttons.cpp	166	0x63daa7	
17	CGuiHandler::handleEvent	CGuiHandler.cpp	308	0x608d38	
18	CGuiHandler::handleEvents	CGuiHandler.cpp	182	0x607b77	
19	CPlayerInterface::update	CPlayerInterface.cpp	1621	0x97cb99	
20	non-virtual thunk to CPlayerInterface::update()	CPlayerInterface.cpp	1596	0x97cc69	
21	CGuiHandler::renderFrame	CGuiHandler.cpp	414	0x609659	
22	mainLoop	CMT.cpp	1099	0x92f8c7	
23	main	CMT.cpp	484	0x92b5b2	
TagsR1
Attached Filestxt file icon VCMI_Client_log.txt [^] (951,347 bytes) 2015-11-01 08:19 [Show Content]

- Relationships

-  Notes
(0006070)
AVS (administrator)
2015-11-01 07:22

Need trace log before crush, I think this depends on last actions in battle. Also this may be not "new" issue.
(0006362)
AVS (administrator)
2016-01-25 18:31

So it fails on assert in

        ~condition_variable()
        {
            int ret;
#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
            do {
              ret = pthread_mutex_destroy(&internal_mutex);
            } while (ret == EINTR);
            BOOST_ASSERT(!ret); //<<<<here
#endif
            do {
              ret = pthread_cond_destroy(&cond);
            } while (ret == EINTR);
            BOOST_ASSERT(!ret);
        }

I suspect that ret == EBUSY, because mutex is still locked by "activeStack" thread, (CPlayerInterface::activeStack CPlayerInterface.cpp 816).

IOW it is a race condition. CBattleInterface destructor should wait "activeStack" thread to finish.
(0008567)
Ivan (developer)
2023-04-12 17:06

Migrated to github, status will be tracked here:
https://github.com/vcmi/vcmi/issues/1219 [^]
(0008914)
Ivan (developer)
2024-01-30 19:18

Closing issues that were migrated to Github

- Issue History
Date Modified Username Field Change
2015-11-01 01:34 SXX New Issue
2015-11-01 07:22 AVS Note Added: 0006070
2015-11-01 08:19 SXX File Added: VCMI_Client_log.txt
2016-01-25 18:31 AVS Note Added: 0006362
2016-01-25 18:31 AVS Status new => acknowledged
2022-03-22 16:24 Povelitel Tag Attached: R1
2023-04-12 17:06 Ivan Status acknowledged => confirmed
2023-04-12 17:06 Ivan Note Added: 0008567
2024-01-30 19:18 Ivan Note Added: 0008914
2024-01-30 19:18 Ivan Status confirmed => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean