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 / [Dark Physics] Getting a WriteLock error, but I don't understand it.

Author
Message
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 11th Sep 2006 06:58 Edited at: 11th Sep 2006 07:22
Quote: "Dark Physics Runtime Error
PhysicsSDK: WriteLock is still aquired. Procedure call skipped to avoid a deadlock!"


Every now and then I get that error when I'm blowing a lot of stuff up at once. What does this error mean, why does it say "aquired", and can I just suppress it, or is it something worse?

Here is a video of a situation that often causes the error. It doesn't always, but often enough to be a serious problem.

http://forum.thegamecreators.com/xt/xt_apollo_download.php?i=997639


One thing that I'm doing is generating the explosion debris in a small radius, which forces them apart nicely.


Come see the WIP!

Attachments

Login to view attachments
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 12th Sep 2006 10:44
I'd like to know the nature of the error, then I'll squash it


Come see the WIP!
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Sep 2006 11:19 Edited at: 12th Sep 2006 11:20
I got this yesterday. I was running somebody elses code and I decided to see if it would run any faster using the "2 Donkey" method:

PHY UPDATE 1
PHY UPDATE 0
SYNC


Firstly, it crashed immediately with this message. So then I changed it...

PHY UPDATE 1
SYNC
PHY UPDATE 0


This time, it ran for a few seconds, but as soon as it came to an intensive part of the code, it crashed and died with the same error.

I imagine the important part of this is that I have a single core processor, and no PPU. My guess is that the physics calculations cannot be carried out fast enough, and the main thread assumes that whenever it gets called, the second thread will be complete



Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 12th Sep 2006 11:37 Edited at: 12th Sep 2006 11:46
That's what it seems like to me too. Like, it's trying to carry out another physics operation, but it's still locked from the last request. As there can be a lot going on at once, this error can just completely ruin gameplay.

I'd rather it just not carry out the new request, rather than crashing. I'd love to just suppress the error.

[Edit]
Thanks for the tip Batvink. I turned off asynchronous updates (the two part update) and it stopped crashing, now matter how wild things get. The physics aren't quite as smooth though, unfortunately. I guess I'll only use this mode for people with hardware. At least I know exactly what's going on now. Thanks!


Come see the WIP!
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Sep 2006 13:15
The problem now, though is this...how do you detect when someone has a dual core processor, because they can handle the multi-threading too, allegedly. You would want dual core processors to be taken advantage of.



Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 12th Sep 2006 13:54
This error can take place when code is updating or creating rigid bodies outside of the block of code where phy update 1 and phy update 0 is called. Do you have any code that uses rigid bodies outside of these 2 commands?
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 12th Sep 2006 14:33
I have function calls that create rigid bodies during the main loop. Those function calls are contained between the phy update 1 and phy update 0 commands. So, they're being created in the main loop, but technically the code is located outside of the main loop (in the functions). It doesn't seem like that should affect anything, but you never know.


Come see the WIP!

Login to post a reply

Server time is: 2024-03-28 18:05:13
Your offset time is: 2024-03-28 18:05:13