[ODE] gcc 3.2 compiles fine OPCODE but errors at runtime. The solution here...

Frederic Marmond fmarmond at eprocess.fr
Sun Jul 6 23:54:02 2003


This is a multi-part message in MIME format.
--------------020404000603010206040506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi all,

I found a bug in gcc 3.2.1 when compiling OPCODE (worked on this some 
mounth ago).
What we found (with W.P. van Paassen, the guy who ported OPCODE 1.2 for 
linux) is that when applying the 2th level of optimisation on gcc (-O2) 
it has strange results at *run-time*, but it still compile fine (no 
error, no warning).
What you'll have to do is to use "-O1" for OPC_TreeCollider.
That's all!

I didn't have time to check with the OPCODE integration in ODE, but I 
think it will be the same!
Perhapse the 3.3 serie (or 3.2.2, 3.2.3, ...) solve this problem too...

For those who have time to test, or want to test their config, I've made 
a little prog to demonstrate the problem.
-> 2 cubes that can rotate keyboard controled
    when OPCODE is compiled with a good gcc version (or with -O1 with 
gcc 3.2), all detection is well detected
    but when OPCODE is compiled with a a gcc3.x with -O2, collision is 
somtime detected, sometime not!
For example, with mesh1, y=45°, x and z varying, no collision detected 
but 2 cubes collide!

I hope it will help people with strange problems at runtime!

Fred

--------------020404000603010206040506
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Hi all,<br>
<br>
I found a bug in gcc 3.2.1 when compiling OPCODE (worked on this some
mounth ago).<br>
What we found (with W.P. van Paassen, the guy who ported OPCODE 1.2 for
linux) is that when applying the 2th level of optimisation on gcc (-O2)
it has strange results at <b>run-time</b>, but it still compile fine
(no error, no warning).<br>
What you'll have to do is to use "-O1" for OPC_TreeCollider.<br>
That's all!<br>
<br>
I didn't have time to check with the OPCODE integration in ODE, but I
think it will be the same!<br>
Perhapse the 3.3 serie (or 3.2.2, 3.2.3, ...) solve this problem too...<br>
<br>
For those who have time to test, or want to test their config, I've
made a little prog to demonstrate the problem.<br>
-&gt; 2 cubes that can rotate keyboard controled<br>
&nbsp;&nbsp;&nbsp; when OPCODE is compiled with a good gcc version (or with -O1 with
gcc 3.2), all detection is well detected<br>
&nbsp;&nbsp;&nbsp; but when OPCODE is compiled with a a gcc3.x with -O2, collision is
somtime detected, sometime not!<br>
For example, with mesh1, y=45&deg;, x and z varying, no collision detected
but 2 cubes collide!<br>
<br>
I hope it will help people with strange problems at runtime!<br>
<br>
Fred<br>
</body>
</html>

--------------020404000603010206040506--