Home » U++ Library support » U++ MT-multithreading and servers » MT assertion failed in IsST()
MT assertion failed in IsST() [message #9899] |
Thu, 07 June 2007 11:08 |
mezise
Messages: 54 Registered: April 2006
|
Member |
|
|
I have a problem solving this issue
ASSERT FAILED: Assertion failed in d:/upp705dev3/uppsrc/Core/Mt.h, line 53
Thread::IsST()
Could someone check my Thread implementation in an enclosed test package, please?
The test app downloads a text file through http and shows it in a DocEdit.
To reproduce the issue run the app in MINGW Debug, click on START button, then on STOP button always before download ends, then again on START, again on STOP and so on until error shows.
[My environment: Windows XP Professional SP2 x32, upp-mingw-705-dev3]
Michal
[Updated on: Fri, 08 June 2007 22:42] Report message to a moderator
|
|
|
Re: MT assertion failed in IsST() [message #9906 is a reply to message #9899] |
Fri, 08 June 2007 09:29 |
|
mirek
Messages: 13976 Registered: November 2005
|
Ultimate Member |
|
|
A *nasty* bug in U++ ("Format" function, called in httpcli, initialized formatters, which can be done in ST mode only).
Now fixed.
Quick patch:
Core/Format.cpp 808:
static void sRegisterFormatters()
{
ONCELOCK {
IntDoubleRegister(BOOL_V);
IntDoubleRegister(INT_V);
IntDoubleRegister(INT64_V);
IntDoubleRegister(DOUBLE_V);
RegisterStringFormatter("s", &StringFormatter);
RegisterNullFormatter("", &DateFormatter);
RegisterFormatter(DATE_V, "", &DateFormatter);
RegisterFormatter(TIME_V, "", &TimeFormatter);
RegisterNumberFormatter("n", &RealFormatter);
RegisterNumberFormatter("ne", &RealFormatter);
RegisterNumberFormatter("nf", &RealFormatter);
RegisterNumberFormatter("nl", &RealFormatter);
RegisterNumberFormatter("nle", &RealFormatter);
RegisterNumberFormatter("nlf", &RealFormatter);
RegisterNumberFormatter("v", &RealFormatter);
RegisterNumberFormatter("ve", &RealFormatter);
RegisterNumberFormatter("vf", &RealFormatter);
RegisterNumberFormatter("vl", &RealFormatter);
RegisterNumberFormatter("vle", &RealFormatter);
RegisterNumberFormatter("vlf", &RealFormatter);
// real number formats (n = fixed decimals, v = valid decimals)
// ne, ve - force exponential notation; nf, vf - force fixed notation; nl, vl - language-based formatting
// Options: [+][[-]<digits>][!][^[+]<expdig>]
// + .. always prepend sign
// [-]<digits> .. number of decimals to print (negative = left of decimal point, default = 6)
// ! .. keep insignificant zeros
// ^ .. exponent options:
// + .. always prepend sign to exponent
// <expdig> exponent padding width
RegisterNumberFormatter("a", &IntLowerAlphaFormatter);
RegisterNumberFormatter("A", &IntUpperAlphaFormatter);
RegisterNumberFormatter("r", &IntLowerRomanFormatter);
RegisterNumberFormatter("R", &IntUpperRomanFormatter);
RegisterValueFormatter("vt", &StdFormatFormatter);
RegisterValueFormatter("", &StdFormatFormatter);
}
}
INITBLOCK {
sRegisterFormatters();
}
String NFormat(int language, const char *s, const Vector<Value>& v)
{
sRegisterFormatters();
Formatting f;
f.language = language;
String result;
int pos = 0;
const char *b;
Mirek
|
|
|
Re: MT assertion failed in IsST() [message #9915 is a reply to message #9899] |
Fri, 08 June 2007 13:58 |
mezise
Messages: 54 Registered: April 2006
|
Member |
|
|
Thanks! Patch applied and issue solved but I encountered another 2 failed assertions. Unfortunately did not found a way to reproduce them (just various clicks between START and STOP buttons).
I do not know if it has something to do with MT.
Twise occured:
ASSERT FAILED: Assertion failed in d:/upp705dev3/uppsrc/Core/Vcont.h, line 17
i >= 0 && i < items
Once occured:
ASSERT FAILED: Assertion failed in d:\upp705dev3\uppsrc\CtrlLib\DocEdit.cpp, line 19
this->line.GetCount() == para.GetCount()
Michal
[Updated on: Fri, 08 June 2007 14:01] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sat May 11 15:11:10 CEST 2024
Total time taken to generate the page: 0.03108 seconds
|