Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Mysterious error that I can't recreate so I can't debug it

Author
Message
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 27th Jan 2011 20:31
As some of you may know I'm making a game called World Off Road that uses DarkPhysics as the main basis for all the ingame events.

The game basically operates by giving the player a box and attaching 4 capsules to it with revolute joints as wheels. The player can drive this box around and another one with 4 similar wheels and 4 similar joints is created for splitscreen multiplayer.

So far I've had no major problems using DarkPhysics; each time the game is started and a car and map are chosen, the game sets up all the physics correctly. Then when it's time to stop driving, the user presses escape and the application closes.

The game is nearing release and it's now time to start thinking about adding in proper menu control and all that so I started implementing the cleanup code to remove all the currently in use ingame entities and reset all the variables so the game can be restated with a different car on a different map.

This is all working correctly as far as I'm aware and I've done this many times on other projects so I have no reason to doubt that part of the code.

However, as soon as I try anything like phy end, phy clear, phy delete rigid body, some strange things start happening.

This is regardless of whether I have phy start at the start of the application and no phy end - or if I call a phy start and phy end each time a map is loaded and unloaded, respectively.

The strange thing that happens under these new circumstances (clearing up the game world) is that every so often it will just crash and offer up the old send error report/don't send error report window. This gives me absolutely nothing to go on.

The other strange aspect of that is that if you recreate exactly what caused the error last time, it may not do it again, or it may do it again. - It's like the bug has a mind of its own and just pops up every so often to annoy me.

So there it is. I have a bug, which I can't recreate, can't debug and don't know anything about and can't seem to solve.

I've tried using phy update and phy clear before after in between and in other funny places for things like loading and unloading the game scenes but all that achieved was it telling me some object was illegal on the command phy update and in a different instance I got that it was object 9 on phy update. (Object 9 is 1 of a handful of rigid bodies being used ingame and is not the first to be removed or added to the game (it's usually second).)

So yeah, I'm stumped... and I can't find anything pointing me in the right direction, someone help please. WOR can't be completed if I can't fix this, it's pretty much integral to the design that the user can go back to the main menu and choose another race.

C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 10:55 Edited at: 28th Jan 2011 10:55
Yeah I don't even know what's causing it now...

It must be some kind of memory leak or overflow or something.

I raced on one map, pressed escape to go and choose another race, it got through that fine but then randomly half way round the next race it decided to crash again.

I wasn't doing anything out of the ordinary, just driving. xD

Anyone know what could be causing these random errors?


Attachments

Login to view attachments
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 11:06 Edited at: 28th Jan 2011 11:07
Here's another error I managed to receive after investigating a possible recreation moment:


It originally seemed I could recreate the error report message box by driving on Happy2 with Blade then quitting and choosing Alpine2 with Monster. - At roughly the same point round the race it would crash without fail so I decided to try seeing what it would do if I raced on Alpine2 with Monster first. - Nothing unusually occurred so I went back to the main menu and chose Alpine2 with Monster again, to see if the first map had any affect on the second map's crashing and this time it came up with a completely different error referencing an object number I'm not using and the command on line 3291 which is phy update.

I'm so confused... Why is it doing this for me, how am I supposed to make a game using DarkPhysics if as soon as you try cleaning up a level it breaks the whole application.

Attachments

Login to view attachments
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 11:40 Edited at: 28th Jan 2011 12:53
Aha!!!

It isn't just WOR that's experiencing this problem.

There's an example that comes with DarkPhysics called Landeroid or Landeroidaxian (for some reason) which seems to be doing the same thing.

I attempted the level about 3 times, each time restarting it successfully but after that, I crashed my ship again, it tried to restart and gave me this error:


Is this a bug with DBP or bug with DarkPhysics?
Do other people get this bug if they play Landeroid for a while?




I have updated DarkPhysics, I have updated my graphics card drivers which updated the PhysX drivers and I have updated DarkBasicPro to v1.76, the error occurs in any state, including with everything fully updated. (I tried updating DirectX but that was up to date.)


Attachments

Login to view attachments
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 28th Jan 2011 12:34
Click the "click here" text and see what DLL caused the crash. It would probably not tell you much because you already know it is DarkPhysics, but I like checking so I can have a general idea of what caused the crash.

C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 12:45 Edited at: 28th Jan 2011 13:22
I tried looking through the error report but it's all just memory references, I don't know what I'm looking at or where to find what .dll caused it. :S

EDIT:
Ok I just tried clicking here and got this at the top:

AppName: world off road.exe AppVer: 1.0.0.0 ModName: d3d9.dll
ModVer: 5.3.2600.5512 Offset: 0004e75f


EDIT2:
Ok I've now established it will bring up 1 of these 2 errors at any random point after using DarkPhysics cleanup commands (phy delete rigid body, phy clear).


I can't determine what makes it bring 1 up over the other or why either come up in the first place. But they will only occur after the program has run a DarkPhysics cleanup command.

EDIT3:
Aha!

I'm now able to reproduce the error consistently and it's giving me this feedback now:
AppName: world off road.exe AppVer: 1.0.0.0 ModName: darkphysics.dll
ModVer: 0.0.0.0 Offset: 00013a28


I changed the program so that instead of deleting objects and deleting rigid bodies, it called one phy clear and then deleted all the objects (there is now no call to delete an individual rigid body after seeing this thread: http://forum.thegamecreators.com/?m=forum_view&t=132520&b=30)

So yeah, now I've actually got it narrowed down, it seems phy clear is broken because it crashes whenever it calls it after the first try.
(The menu calls it when it closes then the game calls it when the user presses escape to go back to the menu. It crashes when the user presses escape.)

C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 13:32
Right...

Well if what I'm seeing from other threads is true, I've just wasted 6 months on a project I can't finish because the phy clear and phy delete rigid body commands don't work.

Thanks a lot TGC, thanks for wasting my money and time.



Now what the hell am I supposed to do... -.-

Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 28th Jan 2011 19:41 Edited at: 28th Jan 2011 19:44
Quote: "Thanks a lot TGC, thanks for wasting my money and time.
Now what the hell am I supposed to do... -.-
"

3 choices:
1: Demand a refund as the product is not fit for the purpose is was sold for.

2: Rewrite the game without using darkphysics

3: Try using another programming language, 3DRad (free) or BlitzBasic.

I tried your game on my Vista laptop last night and it crashed on the spinning thing after you have chosen your track, it closed down and a web browser opened to look for updated graphics drivers so it was definatley a graphics driver problem.
I didnt bother updating the driver as I couldnt be bothered searching the laptop makers website for an update.

C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 28th Jan 2011 21:01 Edited at: 29th Jan 2011 09:21
Yeah I thought about these options after moping around for an hour not knowing what to do:

Option 1 would be useless because WOR would still be unfinished.

Option 2 is where we'll be going with this (I received a mysterious offer from the developer of another PhysX wrapper so we'll be looking into that.)

Option 3 would be a complete waste of time, WOR's basically finished, I just want to get on with the rest of my life (and other projects), not learn another language and rewrite the game. xD



Yeah that version you downloaded is the last stable build we released, the currently broken one is still sat here on my PC. But loads of people had the same problem with WOR when I first made the WIP, sjust because you need the latest PhysX drivers and they come with whatever graphics drivers you need to update.

So yeah, that's not actually the problem but produces a similar result.

Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 1st Feb 2011 17:33 Edited at: 1st Feb 2011 17:37
Phy Clear is bugged. Only way to restart the engine is with "Phy Stop/Phy Start" but... Any Phy items, especially joints have to be deleted (edit: manually deleted, "phy delete joint" and so on) before "Phy Stop" happens, or else... intermittent crash.

Phy Stop will however not clear the memoryleaks that plagues the DP engine when creating shapes, you will eventually run out of memory any ways from all leftover collision meshes.

Also beware especially of infinity or NAN results in floats. Way back DP seems to have some dialogs that displayed when such values where injected to a Phy command, not nowadays though, it just crashes. Some info on detecting those here:
http://forum.thegamecreators.com/?m=forum_view&t=88889&b=1


Regards
Duke
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 1st Feb 2011 20:09
Yeah I've already moved on to another PhysX engine because DarkPhysics just won't do.

Snice for a quick example of some game physics but in an actual real life application of such it will collapse.

Login to post a reply

Server time is: 2024-04-19 05:04:25
Your offset time is: 2024-04-19 05:04:25