I am using Cocos2D 3.1 with SpriteBuilder and I am simply trying to get things working. I have set up my SpriteBuilder ccb with a physicsNode and put my physics objects within it.
In my app I then try to call this:
[_sprite.physicsBody applyImpulse:ccp(-95.0f, 2800.0f)];
All of a sudden, there is a SIGABRT and it crashes on this line in cpSpaceComponent.c:
cpAssertHard(cpBodyGetType(body) == CP_BODY_TYPE_DYNAMIC, "Internal error: Attempting to deactivate a non-dynamic body.");
Aborting due to Chipmunk error: Internal error: Attempting to
deactivate a non-dynamic body. Failed condition: cpBodyGetType(body)
== CP_BODY_TYPE_DYNAMIC
I have looked around and there is no documentation on this type of crash. I am not even sure where to begin to try to fix this. Does anyone know what I should do to fix this crash?
Fixed it. Turns out my CCPhysicsNode had a sleep time threshold of 0, once I set it to the normal .5, everything works fine.
Related
15:49:30.355 - BackgroundImage is not a valid member of Frame
15:49:30.356 - Stack Begin
15:49:30.357 - Script 'Players.Crusade_Commander.PlayerScripts.ChatScript.ChatMain.ChannelsTab', Line 212 - method AnimGuiObjects
15:49:30.357 - Script 'Players.Crusade_Commander.PlayerScripts.ChatScript.ChatMain.ChannelsTab', Line 262 - method Update
15:49:30.358 - Script 'Players.Crusade_Commander.PlayerScripts.ChatScript.ChatMain.ChannelsBar', Line 352 - method Update
15:49:30.358 - Script 'Players.Crusade_Commander.PlayerScripts.ChatScript.ChatMain.ChatWindow', Line 634 - method Update
15:49:30.358 - Script 'Players.Crusade_Commander.PlayerScripts.ChatScript.ChatMain', Line 171
15:49:30.359 - Stack End
This above was the error I have received
After the error hits, almost all the running scripts freeze and stop working. The script that runs when this occurs is a simple camera manipulation with lerp() and by what I can tell, it only occurs when this script is running, but the thing isI have made a new world, and put everything in there, still didnt work, checked for viruses, not the case, removed all frames in all the GUIs in my game, and it still remains like this.
The line in the chat script thats causing this is:
self.SelectedFrame.BackgroundImage.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
And I cant simply change it because it only appears in game, or when you press play in studio, so you cant just change it.
This error isn't anything to do with your code. The ChatScript is a script that Roblox has written and provides for free. It looks like they shipped a bug. If you want to disable in-game chat for testing and development try this.
Create a LocalScript in StarterPlayer > StarterPlayerScripts. Add this line :
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
This should prevent the ChatScript from being added to the player when they spawn. Roblox will have to fix this bug.
I'm using AKRhodesPiano() and AkTubularBells(). Both work alone. When I try to initialize both, I get the following error.
AKRhodesPiano.swift:init(frequency:amplitude:):88:Parameter Tree Failed
Notably, if I change the order of initialization, the error occurs for the last one of the two instantiated.
Adding the following line to the AKTubularBells playground right under the initialization of AKTubularBells is enough to trigger the error.
let tubularBells = AKTubularBells()
let temp = AKRhodesPiano() /// <- Add this line.
I saw in another post AKRhodesPiano error (crush) on AudioKit v4.2 that there was a recent error in the STK Physical models, so perhaps this is part of that. Any insight appreciated as always.
Thanks for noticing this, it only occurred when using those two nodes simultaneously, but it was basically just a cut-and-paste job gone bad. I fixed it on develop, so if you can rebuild the framework you'll be fine or else wait for the next release which should be soon.
Here's the fix:
https://github.com/AudioKit/AudioKit/commit/05651ff97a7ea7815a27de6a53eee0b5f7998920
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at CompangleComplete_fla::MainTimeline/loop()[CompangleComplete_fla.MainTimeline::frame119:205]
I got this error.
When the player touch the "black rectangle", supposed to move to the next scene.
I try to check where is the problem, then I try this
if(endpoint==false){
if(player.hitTestObject(back.other)){
endpoint==true;
trace("next scene");}
the code run without error.
But then I try this,
if(endpoint==false){
if(player.hitTestObject(back.other)){
endpoint==true;
gotoAndPlay(2, "Scene 9");}
I got error like above.
The code for my gotoAndPlay(2, "Scene 9") is wrong. How I should change it?
There appears to be a method loop() being executed repeatedly. My guess is that Scene 9 does not contain one of the objects referenced in that loop. You can pinpoint the specific line of code by debugging the movie within Flash (ctrl + shift + enter).
Without more code it is hard to determine exactly what you are doing, but if you must change scenes I recommend stopping any loops/ENTER_FRAME listeners first, then starting them again in the new scene.
Have a system build using C++ Builder 2010 that after running for about 20 hours it starts firing of assertion failures.
Assertion failed: xdrPtr && xdrPtr == *xdrLPP, file xx.cpp, line 2349
Tried google on it like crazy but not much info. Some people seem to refer a bunch of different assertions in xx.cpp to shortcomings in the exception handling in C++ Builder. But I haven't found anything referencing this particular line in the file.
We have integrated madExcept and it seems like somewhere along the way this catches an out of memory exception, but not sure if it's connected. No matter what an assertion triggering doesn't seem correct.
Edit:
I found an instance of a if-statement that as part of it's statement used a function that could throw an exception. I wonder if this could be the culprit somehow messing up the flow of the exception handling or something?
Consider
if(foo() == 0) {
...
}
wrapped in a try catch block.
If an exception is thrown from within foo() so that no int is returned here how will the if statement react? I'm thinking it still might try to finish executing that line and this performing the if check on the return of the function which will barf since no int was returned. Is this well defined or is this undefined behaviour?
Wouldn't
int fooStatus = foo();
if(fooStatus == 0) {
...
}
be better (or should I say safer)?
Edit 2:
I just managed to get the assertion on my dev machine (the application just standing idle) without any exception about memory popping up and the app only consuming around 100 mb. So they were probably not connected.
Will try to see if I can catch it again and see around where it barfs.
Edit 3:
Managed to catch it. First comes an assertion failure notice like explained. Then the debugger shows me this exception notification.
If I break it takes me here in the code
It actually highlights the first code line after
pConnection->Open();
But it seems I can change this to anything and that line is still highlighted. So my guess is that the error is in the code above it somehow. I have seen more reports about people getting this type of assertion failure when working with databases in RAD Studio... hmmmm.
Update:
I found a thread that recursively called it's own Execute function if it wasn't able to reach the DB server. I think this is at least part of the issue. This will just keep on trying and as more and more worker threads spawn and also keep trying it can only end in disaster.
If madExcept is hinting that you have an out of memory condition, the assert could fail if the pointers are NULL (i.e. the allocation failed). What are the values of xdrPtr and xdrLPP when the assert occurs? Can you trace back to where they are allocated?
I would start looking for memory leaks.
I have an app I'm making where I would like to change a vector I'm creating from float to short. My code is in a header file like this:
vector<float> vertices;
and it works fine, but if I switch it to this:
vector<short> vertices;
and compile, it crashes with the following error:
malloc: *** error for object 0x1035804: incorrect checksum for freed object
- object was probably modified after being freed. *** set a breakpoint in
malloc_error_break to debug
I have no idea what's going on. If it helps, this is an OpenGL application I'm developing for the iPad.
I still don't know why my app wouldn't run when I changed my vector from float to short, but I solved the problem by creating a new vector object of shorts and using that instead. No more problems and works as expected.