dbodysetposition() memory problem

View: New views
3 Messages — Rating Filter:   Alert me  

dbodysetposition() memory problem

by Mr_Oizo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

I've got a dBodyID body, and I would like to set its position, like this:

dBodySetPosition(body, x_Coord, y_Coord, 0.0);

but visual studio give me this error:
Unhandled exception at 0x0040f6f6 in traffix3D.exe: 0xC0000005: Access violation writing location 0xbaadf0a5.

0xbaadf0a5 is the memory address of body, but I don't understand, why I get this error.

Please help me!

Bye,

Zoli


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: dbodysetposition() memory problem

by wb4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Nov 7, 11:44 am, Barna Zoltán <zol.ba...@...> wrote:

> I've got a dBodyID body, and I would like to set its position, like this:
>
> dBodySetPosition(body, x_Coord, y_Coord, 0.0);
>
> but visual studio give me this error:
> Unhandled exception at 0x0040f6f6 in traffix3D.exe: 0xC0000005: Access
> violation writing location 0xbaadf0a5.
>
> 0xbaadf0a5 is the memory address of body, but I don't understand, why I get
> this error.

Did you initialize body with dBodyCreate() ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: dbodysetposition() memory problem

by Mr_Oizo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your answer. That was the problem. I forgot to initialize it.

2009/11/7 wb4 <wbrameld4@...>

On Nov 7, 11:44 am, Barna Zoltán <zol.ba...@...> wrote:
> I've got a dBodyID body, and I would like to set its position, like this:
>
> dBodySetPosition(body, x_Coord, y_Coord, 0.0);
>
> but visual studio give me this error:
> Unhandled exception at 0x0040f6f6 in traffix3D.exe: 0xC0000005: Access
> violation writing location 0xbaadf0a5.
>
> 0xbaadf0a5 is the memory address of body, but I don't understand, why I get
> this error.

Did you initialize body with dBodyCreate() ?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---