Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 7th_zorro), 923 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
physX_load() in Debug-run #357679
02/08/11 08:53
02/08/11 08:53
Joined: Sep 2007
Posts: 62
Germany
B
bodden Offline OP
Junior Member
bodden  Offline OP
Junior Member
B

Joined: Sep 2007
Posts: 62
Germany
Just a small one:

I use physX_load() and physX_run() instead of physX_open().

When doing so, I think, in debug-run, the physik-engine is not been closed automatically. The first time, you run the script in debug-mode, everything is OK. But if you exit and run it again (in debug-mode), you got a "Script crash in SYS"-error. You have to close and reopen the whole editor to be able to run it again.

It's easy to solve by using "physX_close()" before leaving the script, but this is not mentioned in manual.

You can test it with a simple example:
Code:
function main()
{
	void* physikengine=physX_load();
	
	//physX_close();
	
}



As the problem only occurs in debug-mode, but not in "normal"-mode, I guess it's a bug.

Re: physX_load() in Debug-run [Re: bodden] #357699
02/08/11 12:26
02/08/11 12:26
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Its not a bug as in debug mode the engine is attached to the SED process. In normal mode the OS will clean the memory you have leaked and wipe your state on exit, but not in debug mode.

So I guess thats what they call intended behavior =/


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: physX_load() in Debug-run [Re: WretchedSid] #357709
02/08/11 13:26
02/08/11 13:26
Joined: Sep 2007
Posts: 62
Germany
B
bodden Offline OP
Junior Member
bodden  Offline OP
Junior Member
B

Joined: Sep 2007
Posts: 62
Germany
So, it's a feature, not a bug. OK, my fault laugh

Re: physX_load() in Debug-run [Re: bodden] #357710
02/08/11 13:34
02/08/11 13:34
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Not exactly a feature but yeah, your fault.


3333333333
Re: physX_load() in Debug-run [Re: Quad] #357711
02/08/11 13:43
02/08/11 13:43
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The physics engine is not closed automatically. It must be closed by calling physX_destroy().

http://manual.3dgamestudio.net/physX_destroy.htm

Normally this happens automatically in the on_exit event in ackphysx.h, but if you don't use it, you must take care that your script closes the physics engine on exit. When you debug your script and terminate it with the red abort button, there is no clean-up and all open interfaces, including the physics engine, stay open. You need then to close SED for releasing all interfaces.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1