Memory Problems? Program received signal: “0”. warning: check_safe_call: could not restore current frame
by Tiago Carita · in iTorque 2D · 10/19/2009 (7:47 am) · 17 replies
The game runs fine for about 5 then it crashes and on the gdb console appears:
Program received signal: “0”.
warning: check_safe_call: could not restore current frame
for the MACOS definitions of the preprocessor we have:
__MACOSX__
TORQUE_DISABLE_MEMORY_MANAGE
TORQUE_PLAYER
TORQUE_RELEASE
USE_COMPONENTS
for the target:
__IPHONE__
TORQUE_DISABLE_MEMORY_MANAGE
TORQUE_PLAYER
TORQUE_RELEASE
USE_COMPONENTS
I've tried to also use the PUAP_SCRIPT_CHANGE and the PUAP_OPTIMIZE macros, but it just gives the EXC_BAD_ACCESS error in the xcode console, but in the iTGB log it does't complain about nothing.
Any Help would be appreciated...
Program received signal: “0”.
warning: check_safe_call: could not restore current frame
for the MACOS definitions of the preprocessor we have:
__MACOSX__
TORQUE_DISABLE_MEMORY_MANAGE
TORQUE_PLAYER
TORQUE_RELEASE
USE_COMPONENTS
for the target:
__IPHONE__
TORQUE_DISABLE_MEMORY_MANAGE
TORQUE_PLAYER
TORQUE_RELEASE
USE_COMPONENTS
I've tried to also use the PUAP_SCRIPT_CHANGE and the PUAP_OPTIMIZE macros, but it just gives the EXC_BAD_ACCESS error in the xcode console, but in the iTGB log it does't complain about nothing.
Any Help would be appreciated...
About the author
#3
void popFrame()
{
mStartStackSize = mFrameOffsets[--mNumFrames];
-> mStart = mStartOffsets[mStartStackSize];
mLen = 0;
}
thanks in advance!
10/20/2009 (7:49 am)
it crashes on the garage games logo, the gdb gives "EXEC_BAD_ACCESS" and it stops in the file stringStack.h:void popFrame()
{
mStartStackSize = mFrameOffsets[--mNumFrames];
-> mStart = mStartOffsets[mStartStackSize];
mLen = 0;
}
thanks in advance!
#4
10/20/2009 (2:57 pm)
Recompile the desktop programs with similar flags and recompile the script files with those. Those script changes make the DSO format slightly different, and incompatible with what the stock desktop binaries create.
#5
We managed to get the game running again and we are checking for memory troubles :-) i will keep you guys posted
10/21/2009 (12:57 pm)
Hi Ronny thanks for your Help...We managed to get the game running again and we are checking for memory troubles :-) i will keep you guys posted
#6
10/21/2009 (2:52 pm)
Thats great news :) Be sure to let us know how it goes.
#7
The thing is that the game creates a new object if that object isn't already created:
if(!isObject($test)){
...
}
in mac it works (when it runs on itgb) but on the iPhone it just ignores the code that it was supose to do :S
10/23/2009 (7:58 am)
well, this is kind a strange question but is the function isObject()is somehow affected by the flags PUAP_SCRIPT_CHANGE and PUAP_SCRIPT_OPTIMIZE?The thing is that the game creates a new object if that object isn't already created:
if(!isObject($test)){
...
}
in mac it works (when it runs on itgb) but on the iPhone it just ignores the code that it was supose to do :S
#8
10/23/2009 (11:06 am)
Try sticking echo("Is this line working even"); just before the if( line. That way you can tell if the scripts are actually making it into your bundle. The isObject is not really influenced by the PUAP_ stuff from what i can tell (have not looked too closely though).
#9
what causes could change the game behavior from mac to iphone?
10/26/2009 (2:09 pm)
ok.. i'm printing values to a gui var in the functions that should be called, but that var isn't changing, so I suppose the functions aren't getting into the bundle :Swhat causes could change the game behavior from mac to iphone?
#10
If you dont have blue folders, you will need to make them blue first. Ask if you dont know how :)
10/26/2009 (2:59 pm)
Well the bundle needs the resources to exist inside them, before being deployed and before being code signed. The usual way is to right click on the blue folders in your project "Resources" tree and say "Compile" from the menu. This will copy them to the bundle, and then make a source code change (a silly one will do) and press build and go. This will relink, codesign and redploy the updated bundle.If you dont have blue folders, you will need to make them blue first. Ask if you dont know how :)
#11
$test = testingFunction();
the testingFunction() returns just true or false, I made it also change a var in the gui, just at the beggining, and it doesn't change also..
All the other functions in the same file are used without any problem.. and this just happens in the iphone :/
10/27/2009 (2:41 pm)
well.. this is really really strange, there is a function in a file, that simply isn't called when I do something like:$test = testingFunction();
the testingFunction() returns just true or false, I made it also change a var in the gui, just at the beggining, and it doesn't change also..
All the other functions in the same file are used without any problem.. and this just happens in the iphone :/
#12
And then in XCode go to the console and see if it prints the text?
10/27/2009 (2:49 pm)
That IS really weird. did you try with and without the GUI change? as well as try :function testingFunction()
{
echo("Testing function has succeeded");
}And then in XCode go to the console and see if it prints the text?
#13
10/27/2009 (2:50 pm)
the debugger console?
#14
10/27/2009 (6:39 pm)
cmd shift and R in XCode (when the app is running).
#15
The thing is that a function isn't working at the end of the file, but when I put it in the beggining it starts to work and other one stops doing what it was suppose to :S
This is happening because of what?
11/02/2009 (8:09 am)
ok, I've done a few tests, and the "conclusion" that I get is that somehow when the flags PUAP_SCRIPT_CHANGE and PUAP_SCRIPT_OPTIMIZE are "on", the order of the code does matter. Am I wrong?The thing is that a function isn't working at the end of the file, but when I put it in the beggining it starts to work and other one stops doing what it was suppose to :S
This is happening because of what?
#16
11/03/2009 (3:59 am)
the order of which code? It might be that a function needs to "exist" before you can call it with PUAP script changes in yes. I havent tested that explicitly but it makes sense that they namespace changes are a dictionary, if the item is not in the dictionary yet it might return that it doesnt exist yet!
#17
thanks a lot!
11/03/2009 (2:51 pm)
well, that was the reason! I reorder the code and the "exec's" of the scripts and by now, everything is working :Dthanks a lot!
Associate Sven Bergström
Luma Arcade
Make sure that it says MANAGER. Not manage.
Put the PUAP_SCRIPT_CHANGE and PUAP_SCRIPT_OPTIMIZE back in, and look in the debugger at WHY the crash is happening, and from where.
Post back with some more info and we can help you get this going :)