dreamstreat / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

had to set compiler flags to -O1 to get example java to not crash #174

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to build libkml-1.2.0 on gcc 4.1 using SWIG 2.0.4
2. Run either sample java program, CreatePlacemarks for example, I used jdk1.7.0
3. Observe crash in   coordinates.add_latlng(37.0, -122.0);
( likely not to be consistent)  

What is the expected output? What do you see instead?
After fixing, this seems right, 
<kml>
  <Placemark id="pm123">
    <name>my placemark</name>
    <Point id="pt0">
      <coordinates>
        -122,37,0
      </coordinates>
    </Point>
  </Placemark>
</kml>

With -O2 it crashed jre.

What version of the product are you using? On what operating system?
 java]$ cat /proc/sys/kernel/os*
2.6.18-238.9.1.el5
Linux

Did you run the unit test suite that comes with the project? Did all tests pass?
No, I was only interested in java and the make/make install went fine but I had 
to get latest SWIG.

Please provide any additional information below.

Original issue reported on code.google.com by nerdseek...@gmail.com on 3 Jan 2012 at 10:30