Physics behavior crashes if overused

For questions about using Classic.

Post » Fri Jul 13, 2012 6:31 pm

For some reason, if at any time I have over 255 objects using the physics behavior on screen, my application immediately crashes saying:
"An unexpected error has occurred and the application was terminated
You may be able to find out more info about the crash by debugging and attempting to reproduce the bug", and once i close the window it says "Temp.exe has stopped working"

When I try to use the debugger, it automatically closes and and just says "Temp.exe has stopped working"

Does this only happen on my computer or is it a known bug? Why does this happen?
B
6
S
1
G
1
Posts: 69
Reputation: 1,019

Post » Fri Jul 13, 2012 8:10 pm

I can get it to crash like that if I set them all to the same position. I can get a lot more objects onscreen if they aren't all overlapping. Perhaps it crashes when a physics object is colliding with more than 255 physics objects?
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Fri Jul 13, 2012 9:13 pm

That's not the solution in my case. None of the physics object overlap when it crashes on my pc.
I was wrong in the first post. I can get exactly 256, not 255 objects on screen at the same time.
Also, I'm able to get 256 physics objects to overlap without any lag at all. Why would I be unable to do so with 257+ objects?
Here's a simple cap: https://dl.dropbox.com/u/52670878/Physics%20crash.cap
Please let me know if it works on your computer.
B
6
S
1
G
1
Posts: 69
Reputation: 1,019

Post » Fri Jul 13, 2012 9:39 pm

It crashes here.
I think the issue is you can only create 255 physics objects per frame. So if you want to create more than 255 you need to do it over several frames.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Fri Jul 13, 2012 9:54 pm

Yeah, that fixed it. Strange bug though...
Thanks a lot R0J0hound.
B
6
S
1
G
1
Posts: 69
Reputation: 1,019


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests