|
|
what can make str_cmpi crash?
#252934
02/21/09 15:04
02/21/09 15:04
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
OP
Serious User
|
OP
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
hello, I am trying to read out strings from a file, check if they are a valid keywords and if so call a function or set a variable etc.. In most the cases the functions get called as expected, but sometimes the engine crashes in the function, which compares the strings. After some debugging i found out, that the engine crashes at the str_cmpii function. So I checked if the strings are valid by outputting them with diag(). Both strings were correct, but the engine still crashed at that function. As far as I could observe it, the crash isn't caused by a special string, but if the file size exceeds a limit. So my question is what factors can cause this crash else, if both passed strings are 'valid'? diag(string1); //give correct output
diag(string2); //works, too
if(str_cmpi(string1,string2)){//Crash!
[...]
}
|
|
|
Re: what can make str_cmpi crash?
[Re: Scorpion]
#252944
02/21/09 17:26
02/21/09 17:26
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
I think a had the same problem a while ago and it was fixed in an updated version of GS. If that's not the problem then maybe try adding a bool to it eg: if(str_cmpi(string1,string2) == 0)
From the manual These functions return TRUE if the strings are equal. This is different to C / C++ where similar functions return FALSE when the strings are equal.
Good luck.
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
|