2015-05-22 08:44:24 (edited by Neurone 2015-05-22 09:08:17)

Hi,

I'm trying to get a physics engine working. Bullet was my first choice, but i was getting numerous frustrating memory out of bounds access violations that I had to drop it and switch to trying out Ode.

When stepping the world with dWorldStep and a step size of 1.0/50.0, it crashes, with the following error:
Unhandled exception at 0x00D68233 in game.exe: 0xC0000005: Access violation
reading location 0x00000004
and the debugger points me to line 76 in threading_base.h
return functions->alloc_mutex_group(impl, Mutex_count, Mutex_names_ptr);

I vaguely remember someone on these forums mentioning using Ode, so I'm hoping someone has an idea of what may be going on.

Edit: I've created a new vs2013 project with just ode to ensure that it wasn't something else causing the problem, and have tried disabling the multithreading support option in premake4.exe.Ode's premake4 script, all to no avail.

2015-05-22 20:32:11

Hi.
Remember that it might not be a line in your code whatsoever that is the problem. It might be in the functions->alloc_mutex_group(impl, Mutex_count, Mutex_names_ptr) function specifically. Also, remember that multithreading is a very difficult thing to do, so achieving it is one difficult thing to do.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2015-05-23 07:55:32

I guess i'll probably have to discard it as a possible choice. It seems to be abandoned, the last updates to their site was in 2007 or so. That now leaves me with box2d, though that won't grow with me if I have to make something 3d.