First of all I'm using a french version of windows and what follows is probably partially linked to this because it seems to be a float value replacement of the '.' letter with a "," (lots of software like excel do this replacement). The problem occurs with both 1.7.3 and 1.8 versions of irrlicht.
My problem is that when I perform an operation in my programm that implies the opening of an open dialog box, all my gui elements try to transform their '.' with ','. The problem is that spinboxes use the text value to increment or decrement the value when pressing up or down button and if the displayed value has a ',' instad of a '.' the float value is truncated and causes the decrement operation going bad (exiting the range value for exemple) and simply making the spin box malfunction.
I tried to reproduce this bug outside my project but I can't find what cause this.
In another hand I tried to debug what transform my '.' into ',' but I'm stuck because I have no symboles for irrlicht.dll. The only things I can tell by tracking the modification of the string value of my spinbox is that this change occurs (after doing my reproduction steps into my code) each time I press the down or up button of my spinbox. And since this is the only break I suppose that this correspond to the code that update the value with the step given to the spin box.
With this assumption I also tried to test all the code that update the value with the step to try to find which part of the code could have change my '.' but I haven't been able to find anything : the code works fine to convert the string into float and then test the ranges... And here I am completely lost with this bug.
What I can do is providing you a dump of my soft with the stack corresponding to the change of a correct string value (with a '.') by a bad value (with a ',') just after pressing the up button of my spin box. The stack only contains elements from the engine and none from my code so you shouldn't have to check my code.
I'm sorry to not being able to give you a correct reproduction of the bug.
edit : additionnal test done by me after the triggering of the bug
Code: Select all
m_DialogSpeedSpinBox->getEditBox()->setText(L"1.00000");// the bug is triggered and the value if fucked "1,10000" : I reset it manually with a correct value and write manually the content of an increment by the step value
f32 val = m_DialogSpeedSpinBox->getValue();// I get the previous value that is correct here (1.00000)
val += 0.1f;
wchar_t str[100];
core::stringw FormatString = "%.";
FormatString += 5;
FormatString += "f";
// content of setValue()
swprintf(str, 99, FormatString.c_str(), val);
m_DialogSpeedSpinBox->getEditBox()->setText(str);
// call of verifyValueRange();
val = m_DialogSpeedSpinBox->getValue();
if ( val+core::ROUNDING_ERROR_f32 < m_DialogSpeedSpinBox->getMin() )
val = m_DialogSpeedSpinBox->getMin();
else if ( val-core::ROUNDING_ERROR_f32 > m_DialogSpeedSpinBox->getMax() )
val = m_DialogSpeedSpinBox->getMax();
// all is ok here with this code : the value is 1.10000
// But if I call the original setValue here with my previous float value 1.10000, the value get fucked
//m_DialogSpeedSpinBox->setValue(val);