Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » AssertST problem in initialization when debugging on MSBT17x64
Re: AssertST problem in initialization when debugging on MSBT17x64 [message #50631 is a reply to message #50628] Wed, 28 November 2018 09:23 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Peter,

Sorry for being so unspecific.

First, it is my own program where this happens when running in debugger. Here's the backtrace:

DebugBreak()
Upp::AssertFailed(file=7ff6022e6700 "c:\\upp-12514\\upp.src\\uppsrc\\core\\Mt.h", line=116 't', cond=7ff6022e66e8 "Thread::IsST()") at c:\upp-12514\upp.src\uppsrc\core\util.cpp 167
Upp::AssertST() at c:\upp-12514\upp.src\uppsrc\core\mt.h 116
Upp::Value::Register(w=40 '(', c=7ff600fa7ea5, name=7ff6022d46ac "Font") at c:\upp-12514\upp.src\uppsrc\core\value.cpp 560
Upp::Value::Register<Upp::Font>(name=7ff6022d46ac "Font") at c:\upp-12514\upp.src\uppsrc\core\value.hpp 318
Upp::s__sF0_19_fn() at c:\upp-12514\upp.src\uppsrc\draw\font.cpp 21
Upp::Callinit::Callinit(fn=7ff6013188f0, cpp=7ff6022d4618 "C:\\upp-12514\\upp.src\\uppsrc\\Draw\\Font.cpp", line=19) at c:\upp-12514\upp.src\uppsrc\core\defs.h 176
Upp::`dynamic initializer for 's__sF0_19''() at c:\upp-12514\upp.src\uppsrc\draw\font.cpp 19
_initterm(first=7ff60225d000->0, last=7ff60225e180->0)
__scrt_common_main_seh()
__scrt_common_main()
WinMainCRTStartup()
BaseThreadInitThunk()
RtlUserThreadStart()


After digging a bit deeper, I found out that my own code contains a static instance of a class that starts a couple of threads in the background. These threads are already running when the above assertion happens and if I do not start those threads, the assertion does not happen. However, I do need those threads for my software to work properly.

I worked around this issue by switching from "static MyClass a;" to "One<MyClass> a;" and appropriate initialization code "a.Create();" that runs only in GUI_APP_MAIN after everything else is initialized within U++.

Thanks and best regards,

Tom
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error in DUMP_ declaration
Next Topic: About Serialization
Goto Forum:
  


Current Time: Wed May 01 23:26:58 CEST 2024

Total time taken to generate the page: 0.02790 seconds