Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by KingSnail » Mon Jan 18, 2010 6:53 pm
For some reason Newton crashes when handling a compound collision, inside the dll.
I am beggining to think its because im using visual studio 2010 and windows 7 and using the lib and dll from
dll_vs9 x32 folder.
Can someone please tell me how to make a build of the lib and dll for visual studio 2010? Or maybe Julio you can make the build? Please
Working on an MMORPG powered by Newton Dynamics.
-
KingSnail
-
- Posts: 112
- Joined: Sat Jan 02, 2010 9:55 pm
by JernejL » Mon Jan 18, 2010 7:02 pm
Do you use serialised compound collisions? the format could have changed between last few betas.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by KingSnail » Mon Jan 18, 2010 7:14 pm
No I just use John Ratcliff's code to split mesh into vertices in an offline program then load them in my engine
then make convex hulls, then add those hulls to the compound collision. It all loads fine but then crashes shortly after the object
is spawned in the world.
Working on an MMORPG powered by Newton Dynamics.
-
KingSnail
-
- Posts: 112
- Joined: Sat Jan 02, 2010 9:55 pm
by Julio Jerez » Mon Jan 18, 2010 7:40 pm
no it sould no crash because you are using VS2010 I buidl teh engien wioth VS2010 and it work fine.
the bug I added were in version 2.15 bu th awas because I run the refactoring stuff that comes with VS2010 Premium.
since then I reverse them and version 2.16 workd fine with all version of VS startion with VS2002.
if you you are crashing it mnust be because somethon is wrong in teh setup, how are you doing teh setup?
In the demos I use compounds with sevaral tousand of convex shapess, in the order of 10 tousands and work fine, it should work for you too.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Tue Jan 19, 2010 5:04 am
KingSnail wrote:No I just use John Ratcliff's code to split mesh into vertices in an offline program then load them in my engine
then make convex hulls, then add those hulls to the compound collision. It all loads fine but then crashes shortly after the object
is spawned in the world.
I use the exact same thing (ratcliff's convex decompositor), and it works great, make sure you have the latest dll and produce a crash example.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by kallaspriit » Tue Jan 19, 2010 9:43 am
Can you share the decompositor code? Perhaps I could add it to OgreNewt
-
kallaspriit
-
- Posts: 216
- Joined: Sun Aug 14, 2005 6:31 pm
by KingSnail » Tue Jan 19, 2010 1:54 pm
- Code: Select all
First-chance exception at 0x00278c5f in Naginata.exe: 0xC0000005: Access violation reading location 0x00000040.
Unhandled exception at 0x00278c5f in Naginata.exe: 0xC0000005: Access violation reading location 0x00000040.
newton.dll!00278c5f() <---------Crashes here
[Frames below may be incorrect and/or missing, no symbols loaded for newton.dll]
> Naginata.exe!_unlock(int locknum=4) Line 375 C
Naginata.exe!_heap_alloc_dbg_impl(unsigned int nSize=32, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0a7ce2cc) Line 507 + 0x7 bytes C++
Naginata.exe!_heap_alloc_dbg_impl(unsigned int nSize=32, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0a7ce2cc) Line 504 + 0xc bytes C++
Naginata.exe!_nh_malloc_dbg_impl(unsigned int nSize=32, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int * errno_tmp=0x0a7ce2cc) Line 239 + 0x19 bytes C++
Naginata.exe!_nh_malloc_dbg(unsigned int nSize=32, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x00000000, int nLine=0) Line 302 + 0x1d bytes C++
Naginata.exe!malloc(unsigned int nSize=32) Line 56 + 0x15 bytes C++
Naginata.exe!operator new(unsigned int size=32) Line 59 + 0x9 bytes C++
Naginata.exe!std::_Allocate<char>(unsigned int _Count=24505632, char * __formal=0x00000000) Line 36 + 0xf bytes C++
I debugged everything many times, the collisions seem to all be created fine, as far as I can tell they all have valid adresses asigned (the array of hull's and compound collision)
I have the latest dll too, 2.16 newton, its just im on vs2010 not vs2008.
I have no idea how to solve this thing, I tried just adding 1 hull to the compound collision but it still crashes with same error and comes up with the page mlock.c in the IDE
Working on an MMORPG powered by Newton Dynamics.
-
KingSnail
-
- Posts: 112
- Joined: Sat Jan 02, 2010 9:55 pm
by JernejL » Tue Jan 19, 2010 2:05 pm
kallaspriit wrote:Can you share the decompositor code? Perhaps I could add it to OgreNewt
It's public.. just google for john ratcliff convex decompositor..
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Tue Jan 19, 2010 2:55 pm
KingSnail wrote:I have no idea how to solve this thing, I tried just adding 1 hull to the compound collision but it still crashes with same error and comes up with the page mlock.c in the IDE
if it crash even with one shape it man you are doing somethong incorrrect. (may you are realseng a shape ot something)
you can check the wiki or teh demos in eh SDK sample to see how it is set up propertly.
It is not possible that it work in the demos and you can no add even one convex to the shape, .
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by KingSnail » Tue Jan 19, 2010 3:15 pm
Ok I fixed it, the error was my fault not newtons, silly me, well I was doing some stupid things, which probably envolved vectors of pointers
going out of bounds but messing everything up somehow, weird because it seemed all correct on the debug, normaly it would say if a vector pointer was invalid. I moved the code around
and it worked.
Here is the result:
Working on an MMORPG powered by Newton Dynamics.
-
KingSnail
-
- Posts: 112
- Joined: Sat Jan 02, 2010 9:55 pm
by JernejL » Tue Jan 19, 2010 5:47 pm
Looking good, make sure you use it with serialization, ratcliff's code is only good as a pre-processing step (and watch out that serialization format also changes with version - make sure to design the converter around that fact to also keep generated pieces to be able to re-serialize it with new format versions ).
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Tue Jan 19, 2010 5:58 pm
with version 2.16 there will be a format that will save scene in xml format, so serialized can be revover eassilly
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Tue Jan 19, 2010 7:05 pm
Julio Jerez wrote:with version 2.16 there will be a format that will save scene in xml format, so serialized can be revover eassilly
I'm not a very big fan of XML, it's not "compatible with speed"
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Tue Jan 19, 2010 8:29 pm
tha's because, you are thinking teh way of the stablishment, this is not going to be a your everyday XML parcel,
the newton implementation inteface will be just as fast as saving or loading serialized data.
plus it will also have funtion for saving and loading binary,
if you remember, but newton 1.5 have a format called .dg which was very much binary version of the xml I kave in 2.0
But you are right all XMl SDK i see outhere are such crappy stuff that it scare the hell out of any developer, but it does not have to be that way
believe me will will have Collada support and it will be just as fast as Binary loading and saving.
The reason I decided on Collada is because it is the only format that is supportted by many modeling package and have many physics and graphics features,
so having a support library similat to the Customjoint that can import assets in ASCII XML (collada) and serialize to binary can be a win for many end users.
this way we can just let every one use the favory ToolChain and just export to Collada and voila, they can use Newton/plus the graphics engine as the end engine.
It took a while for peopel to figure out hwo serialization work in Netwon but once you get it you see how poweful it really is.
pulu the fact that it will be capable of serializing to ascii will means backward compatibility will not be a big issue anymore.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Wed Jan 20, 2010 5:13 am
Backwards compatibility is definetly a big plus, but i will probably still stick to binary serialized data, with a lot of objects it would likely still be faster.
Or i can use both - xml for backwards compatibility which regenerates the binary serialized files to the up to date versions.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 5 guests