2025-07-20 21:36 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001625Spring engineGeneralpublic2009-10-03 10:46
Reporterhughperkins 
Assigned Tohoijui 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target Version0.81.0.0Fixed in Version0.80.4.0+git 
Summary0001625: Java interface v0.1: CreateLineFigureDrawerAICommand causes Spring to segfault
DescriptionJava interface v0.1: CreateLineFigureDrawerAICommand causes Spring to segfault

To reproduce, run the following function in a Java AI, using Java Interface v0.1

// This will crash spring, at least with Java interface 0.1,
   // running against Spring 0.80.02 :
   void drawlineTests2() {
      CSAI csai = playerObjects.getCSAI();
      csai.handleEngineCommand(
            new CreateLineFigureDrawerAICommand(
                  new AIFloat3( 0,100,0 ),
                  new AIFloat3( 100, 100 , 0 ),
                  1,
                  false,
                  200,
                  0,
                  0 ) );
     }
Additional Informationtested with Spring 0.80.02, Java interface v0.1
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon GDB_output_096cb26fede865aecb5798a0f1b452d50e373490.txt (41,808 bytes) 2009-09-11 13:31 -
    GNU DDD 3.3.12 (i686-pc-linux-gnu), by Dorothea L(gdb) run
    Starting program: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/spring 
    [Thread debugging using libthread_db enabled]
    warning: Lowest section in /usr/lib/libicudata.so.38 is .hash at 000000d4
    using default configuration source "/home/user/.springrc"
    [CMyMath::Init] CPU SSE mask: 120, flags:
    	SSE 1.0:  1,  SSE 2.0:  1
    	SSE 3.0:  1, SSSE 3.0:  0
    	SSE 4.1:  0,  SSE 4.2:  0
    	SSE 4.0A: 0,  SSE 5.0A: 0
    	using streflop SSE FP-math mode, CPU supports SSE instructions
    OS: Linux
    OS: 32bit native mode
    Adding /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug to directories
    Adding /home/user/.spring to directories
    Adding /home/user/.spring to directories
    Adding /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug to directories
    Adding /. to directories
    LogOutput initialized.
    Spring 0.80+.0.0
    Available log subsystems: mapinfo, CollisionVolume, unit, ArchiveScanner, VFS-detail, VFS, Sound
    Enabled log subsystems: Sound
    Enable or disable log subsystems using the LogSubsystems configuration key
      or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
    Using read-write data directory: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/
    Using read-only  data directory: /home/user/.spring/
    Using read-only  data directory: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/
    Using read-only  data directory: /./
    Scanning: /./maps
    Scanning: /./base
    Scanning: /./mods
    Scanning: /./packages
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/maps
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/base
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/mods
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/packages
    Scanning: /home/user/.spring/maps
    Error opening /home/user/.spring/maps/AavikkoV2.sd7: Unexpected end of file (truncated?)
    Error opening /home/user/.spring/maps/Intercontinental32x32.sd7: Unexpected end of file (truncated?)
    Error opening /home/user/.spring/maps/2_Continents_Remake.sd7: Unexpected end of file (truncated?)
    Scanning: /home/user/.spring/base
    Scanning: /home/user/.spring/mods
    Error opening /home/user/.spring/mods/NanoBlobs065.sdz
    Scanning: /home/user/.spring/packages
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/maps
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/base
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/mods
    Scanning: /home/user/svn_work/user/Development/Projects/Others/spring/installs/cmake/master/linux32/debug/packages
    [New Thread 0xb640f710 (LWP 18372)]
    [New Thread 0xb62e4b90 (LWP 18375)]
    Video mode set to  800 x 600 / 32 bit
    SpringApp::InitWindow(): 1462020104 ms
    SDL:  1.2.13
    GL:   1.3 Mesa 7.4
    GL:   DRI R300 Project
    GL:   Mesa DRI R300 20060815 x86/MMX/SSE2 TCL
    GLEW: 1.5.0
    Joysticks found: 0
    Joystick 0 not found
    Connecting to local server
    [New Thread 0xa16e9b90 (LWP 18376)]
    [New Thread 0xa0ee8b90 (LWP 18377)]
    Sound: OpenAL info:
    Sound:   Vendor:     OpenAL Community
    Sound:   Version:    1.1
    Sound:   Renderer:   OpenAL Soft
    Sound:   AL Extensions: AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_LOKI_quadriphonic
    Sound:   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_EFX
    Sound:   Device:     ALSA Software on default
    Sound:   Available Devices:  
    Sound:                       ALSA Software on default
    Sound:                       ALSA Software on HDA Intel
    Sound:                       OSS Software
    Sound:                       Wave File Writer
    [New Thread 0xa06e7b90 (LWP 18378)]
    CPreGame(): 220 ms
    Server started on port 8452
    [New Thread 0x9fcffb90 (LWP 18379)]
    Connection attempt from unnamed
     -> Version: 0.80+.0.0
     -> Address: shared memory
     -> connection established (given id 0)
    Starting demo recording
    Using map Brazillian_Battlefield.smf
    Recording demo demos/local_20090911_132714_Brazillian_Battlefield_0.80+.0.sdf
    Using script Skirmish AI test: NullOOJavaAI 0.1
    Using mod Balanced Annihilation V7.01
    Using mod archive BA701.sd7
    Became player 0 (team 0, allyteam 0)
    [New Thread 0x99856b90 (LWP 18380)]
    Loading console: 0 ms
    Sound: CSound(): Successfully parsed 4 SoundItems from gamedata/sounds.lua
    Loading sounds: 4 ms
    Camera and mouse: 201 ms
    Parsing unit icons
    Parsing definitions
    Loading all definitions:  1.587000
    Loading defs: 1670 ms
    shadows disabled or required OpenGL extension missing
    Loading map informations
    Opening map file
    Loading Map
    Loading detail textures
    Creating overhead texture
    Creating ground shading
    Loading tile file
    Reading tiles
    Reading tile map
    Creating projectile texture
    Number of damage types: 40
    Loading weapon definitions
    Loading unit definitions
    Loading feature definitions
    Creating unit textures
    Initializing map features
    Reading estimate path costs
    Pathing data checksum: ba7a7141
    Creating sky
    Loading LuaRules
    gf1 = LuaRules/Gadgets/areaattack.lua
    gf1 = LuaRules/Gadgets/cmd_nocost.lua
    gf1 = LuaRules/Gadgets/comiscontrol.lua
    gf1 = LuaRules/Gadgets/fx_reclaim_shards.lua
    gf1 = LuaRules/Gadgets/lups_manager.lua
    gf1 = LuaRules/Gadgets/lups_shockwaves.lua
    gf1 = LuaRules/Gadgets/lups_wrapper.lua
    gf1 = LuaRules/Gadgets/mo_comgate.lua
    gf1 = LuaRules/Gadgets/mo_coop.lua
    gf1 = LuaRules/Gadgets/mo_enemywrecks.lua
    gf1 = LuaRules/Gadgets/mo_greenfields.lua
    gf1 = LuaRules/Gadgets/mo_koth.lua
    gf1 = LuaRules/Gadgets/mo_noowner.lua
    gf1 = LuaRules/Gadgets/mo_noshare.lua
    gf1 = LuaRules/Gadgets/mo_nowrecks.lua
    gf1 = LuaRules/Gadgets/mo_preventdraw.lua
    gf1 = LuaRules/Gadgets/teamcomends.lua
    gf1 = LuaRules/Gadgets/unit_air_plants.lua
    gf1 = LuaRules/Gadgets/unit_direct_control.lua
    gf1 = LuaRules/Gadgets/unit_fix_dropped_startpos.lua
    gf1 = LuaRules/Gadgets/unit_mex_upgrader.lua
    gf1 = LuaRules/Gadgets/unit_missile_delay.lua
    gf1 = LuaRules/Gadgets/unit_no_land_damage.lua
    gf1 = LuaRules/Gadgets/unit_noselfd.lua
    gf1 = LuaRules/Gadgets/unit_noselfpwn.lua
    gf1 = LuaRules/Gadgets/unit_passive_builders.lua
    gf1 = LuaRules/Gadgets/unit_prevent_lab_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_load_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_range_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_strange_orders.lua
    gf1 = LuaRules/Gadgets/unit_reclaim_fix.lua
    gf1 = LuaRules/Gadgets/unit_scout_spawner.lua
    gf1 = LuaRules/Gadgets/unit_set_neutral.lua
    gf1 = LuaRules/Gadgets/unit_shield_watch.lua
    gf2 = LuaRules/Gadgets/areaattack.lua
    gf2 = LuaRules/Gadgets/cmd_nocost.lua
    gf2 = LuaRules/Gadgets/comiscontrol.lua
    gf2 = LuaRules/Gadgets/fx_reclaim_shards.lua
    gf2 = LuaRules/Gadgets/lups_manager.lua
    gf2 = LuaRules/Gadgets/lups_shockwaves.lua
    gf2 = LuaRules/Gadgets/lups_wrapper.lua
    gf2 = LuaRules/Gadgets/mo_comgate.lua
    gf2 = LuaRules/Gadgets/mo_coop.lua
    gf2 = LuaRules/Gadgets/mo_enemywrecks.lua
    gf2 = LuaRules/Gadgets/mo_greenfields.lua
    gf2 = LuaRules/Gadgets/mo_koth.lua
    gf2 = LuaRules/Gadgets/mo_noowner.lua
    gf2 = LuaRules/Gadgets/mo_noshare.lua
    gf2 = LuaRules/Gadgets/mo_nowrecks.lua
    gf2 = LuaRules/Gadgets/mo_preventdraw.lua
    gf2 = LuaRules/Gadgets/teamcomends.lua
    gf2 = LuaRules/Gadgets/unit_air_plants.lua
    gf2 = LuaRules/Gadgets/unit_direct_control.lua
    gf2 = LuaRules/Gadgets/unit_fix_dropped_startpos.lua
    gf2 = LuaRules/Gadgets/unit_mex_upgrader.lua
    gf2 = LuaRules/Gadgets/unit_missile_delay.lua
    gf2 = LuaRules/Gadgets/unit_no_land_damage.lua
    gf2 = LuaRules/Gadgets/unit_noselfd.lua
    gf2 = LuaRules/Gadgets/unit_noselfpwn.lua
    gf2 = LuaRules/Gadgets/unit_passive_builders.lua
    gf2 = LuaRules/Gadgets/unit_prevent_lab_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_load_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_range_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_strange_orders.lua
    gf2 = LuaRules/Gadgets/unit_reclaim_fix.lua
    gf2 = LuaRules/Gadgets/unit_scout_spawner.lua
    gf2 = LuaRules/Gadgets/unit_set_neutral.lua
    gf2 = LuaRules/Gadgets/unit_shield_watch.lua
    Loaded gadget:  No Self-D           <unit_noselfd.lua>
    Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    Loaded gadget:  DirectControl       <unit_direct_control.lua>
    Loaded gadget:  DragonsDisguise     <unit_set_neutral.lua>
    Loaded gadget:  DroppedStartPos     <unit_fix_dropped_startpos.lua>
    Loaded gadget:  MissileControl      <unit_missile_delay.lua>
    Loaded gadget:  No Land Damage      <unit_no_land_damage.lua>
    Loaded gadget:  No Self Pwn         <unit_noselfpwn.lua>
    Loaded gadget:  NoCost              <cmd_nocost.lua>
    Loaded gadget:  PassiveBuilders     <unit_passive_builders.lua>
    Loaded gadget:  Prevent Lab Hax     <unit_prevent_lab_hax.lua>
    Loaded gadget:  Prevent Load Hax    <unit_prevent_load_hax.lua>
    Loaded gadget:  Prevent Range Hax   <unit_prevent_range_hax.lua>
    Loaded gadget:  Prevent Strange Orders  <unit_prevent_strange_orders.lua>
    Loaded gadget:  Reclaim Fix         <unit_reclaim_fix.lua>
    Loaded gadget:  ShieldDrain         <unit_shield_watch.lua>
    Loaded gadget:  Shockwaves          <lups_shockwaves.lua>
    Loaded gadget:  fx_reclaim_shards   <fx_reclaim_shards.lua>
    Loaded gadget:  lups_wrapper.lua    <lups_wrapper.lua>
    Loaded gadget:  Area Attack         <areaattack.lua>
    Loaded gadget:  C Is For Control    <comiscontrol.lua>
    Loaded gadget:  Team Com Ends       <teamcomends.lua>
    Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    gf1 = LuaRules/Gadgets/areaattack.lua
    gf1 = LuaRules/Gadgets/cmd_nocost.lua
    gf1 = LuaRules/Gadgets/comiscontrol.lua
    gf1 = LuaRules/Gadgets/fx_reclaim_shards.lua
    gf1 = LuaRules/Gadgets/lups_manager.lua
    gf1 = LuaRules/Gadgets/lups_shockwaves.lua
    gf1 = LuaRules/Gadgets/lups_wrapper.lua
    gf1 = LuaRules/Gadgets/mo_comgate.lua
    gf1 = LuaRules/Gadgets/mo_coop.lua
    gf1 = LuaRules/Gadgets/mo_enemywrecks.lua
    gf1 = LuaRules/Gadgets/mo_greenfields.lua
    gf1 = LuaRules/Gadgets/mo_koth.lua
    gf1 = LuaRules/Gadgets/mo_noowner.lua
    gf1 = LuaRules/Gadgets/mo_noshare.lua
    gf1 = LuaRules/Gadgets/mo_nowrecks.lua
    gf1 = LuaRules/Gadgets/mo_preventdraw.lua
    gf1 = LuaRules/Gadgets/teamcomends.lua
    gf1 = LuaRules/Gadgets/unit_air_plants.lua
    gf1 = LuaRules/Gadgets/unit_direct_control.lua
    gf1 = LuaRules/Gadgets/unit_fix_dropped_startpos.lua
    gf1 = LuaRules/Gadgets/unit_mex_upgrader.lua
    gf1 = LuaRules/Gadgets/unit_missile_delay.lua
    gf1 = LuaRules/Gadgets/unit_no_land_damage.lua
    gf1 = LuaRules/Gadgets/unit_noselfd.lua
    gf1 = LuaRules/Gadgets/unit_noselfpwn.lua
    gf1 = LuaRules/Gadgets/unit_passive_builders.lua
    gf1 = LuaRules/Gadgets/unit_prevent_lab_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_load_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_range_hax.lua
    gf1 = LuaRules/Gadgets/unit_prevent_strange_orders.lua
    gf1 = LuaRules/Gadgets/unit_reclaim_fix.lua
    gf1 = LuaRules/Gadgets/unit_scout_spawner.lua
    gf1 = LuaRules/Gadgets/unit_set_neutral.lua
    gf1 = LuaRules/Gadgets/unit_shield_watch.lua
    gf2 = LuaRules/Gadgets/areaattack.lua
    gf2 = LuaRules/Gadgets/cmd_nocost.lua
    gf2 = LuaRules/Gadgets/comiscontrol.lua
    gf2 = LuaRules/Gadgets/fx_reclaim_shards.lua
    gf2 = LuaRules/Gadgets/lups_manager.lua
    gf2 = LuaRules/Gadgets/lups_shockwaves.lua
    gf2 = LuaRules/Gadgets/lups_wrapper.lua
    gf2 = LuaRules/Gadgets/mo_comgate.lua
    gf2 = LuaRules/Gadgets/mo_coop.lua
    gf2 = LuaRules/Gadgets/mo_enemywrecks.lua
    gf2 = LuaRules/Gadgets/mo_greenfields.lua
    gf2 = LuaRules/Gadgets/mo_koth.lua
    gf2 = LuaRules/Gadgets/mo_noowner.lua
    gf2 = LuaRules/Gadgets/mo_noshare.lua
    gf2 = LuaRules/Gadgets/mo_nowrecks.lua
    gf2 = LuaRules/Gadgets/mo_preventdraw.lua
    gf2 = LuaRules/Gadgets/teamcomends.lua
    gf2 = LuaRules/Gadgets/unit_air_plants.lua
    gf2 = LuaRules/Gadgets/unit_direct_control.lua
    gf2 = LuaRules/Gadgets/unit_fix_dropped_startpos.lua
    gf2 = LuaRules/Gadgets/unit_mex_upgrader.lua
    gf2 = LuaRules/Gadgets/unit_missile_delay.lua
    gf2 = LuaRules/Gadgets/unit_no_land_damage.lua
    gf2 = LuaRules/Gadgets/unit_noselfd.lua
    gf2 = LuaRules/Gadgets/unit_noselfpwn.lua
    gf2 = LuaRules/Gadgets/unit_passive_builders.lua
    gf2 = LuaRules/Gadgets/unit_prevent_lab_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_load_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_range_hax.lua
    gf2 = LuaRules/Gadgets/unit_prevent_strange_orders.lua
    gf2 = LuaRules/Gadgets/unit_reclaim_fix.lua
    gf2 = LuaRules/Gadgets/unit_scout_spawner.lua
    gf2 = LuaRules/Gadgets/unit_set_neutral.lua
    gf2 = LuaRules/Gadgets/unit_shield_watch.lua
    Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    Loaded gadget:  DragonsDisguise     <unit_set_neutral.lua>
    Loaded gadget:  DroppedStartPos     <unit_fix_dropped_startpos.lua>
    Loaded gadget:  MissileControl      <unit_missile_delay.lua>
    Loaded gadget:  NoCost              <cmd_nocost.lua>
    Loaded gadget:  PassiveBuilders     <unit_passive_builders.lua>
    Loaded gadget:  Reclaim Fix         <unit_reclaim_fix.lua>
    Loaded gadget:  ShieldDrain         <unit_shield_watch.lua>
    Loaded gadget:  Shockwaves          <lups_shockwaves.lua>
    Loaded gadget:  fx_reclaim_shards   <fx_reclaim_shards.lua>
    Loaded gadget:  mo_enemywrecks      <mo_enemywrecks.lua>
    Loaded gadget:  mo_greenfields      <mo_greenfields.lua>
    Loaded gadget:  mo_noowner          <mo_noowner.lua>
    Loaded gadget:  mo_noshare          <mo_noshare.lua>
    Loaded gadget:  mo_nowrecks         <mo_nowrecks.lua>
    Loaded gadget:  Area Attack         <areaattack.lua>
    Loaded gadget:  C Is For Control    <comiscontrol.lua>
    Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    Loaded gadget:  Lups                <lups_wrapper.lua>
    Loading LuaGaia
    Loading LuaUI
    Using LUAUI_DIRNAME = LuaUI/
    Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
    LuaUI: bound F11 to the widget selector
    LuaUI: bound CTRL+F11 to tweak mode
    Hardware is incompatible with Xray shader requirements
    Hardware is incompatible with Xray shader requirements
    Loaded widget from mod:   CustomIcons         <unit_customicons.lua>
    Loaded widget from mod:   Pause Screen        <gui_pausescreen.lua>
    Loaded widget from mod:   Share Tracker       <unit_share_tracker.lua>
    Loaded widget from mod:   Take Reminder       <gui_take_remind.lua>
    Loaded widget from mod:   Select n Center!    <gui_center_n_select.lua>
    Loaded widget from mod:   BA Waypoint Dragger  <unit_waypoint_dragger_2.lua>
    Loaded widget from mod:   CustomFormations2   <unit_customformations2.lua>
    LuaUI v0.3
    Finalizing...
    [Thread 0x99856b90 (LWP 18380) exited]
    Spring 0.80+.0.0
    Build date/time: Sep 10 2009 17:20:18
    Player unnamed finished loading and is now ingame
    *********************************WARN_ONCE*********************************
    File r300_state.c function r500SetupRSUnit line 1907
    Don't know how to satisfy InputsRead=0x00000008
    ***************************************************************************
    unnamed added point: Start 0
    unnamed added point: Start 1
     -> connection established (given id 0)
    Player unnamed finished loading and is now ingame
    Sending spring Statistics over OSC to: 192.168.50.255:6447
    GameID: 2734aa4a8043fad556ca3bbb1d5845f6
    unnamed added point: Start 0
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9f096b90 (LWP 18381)]
    [Dynamic-linking native method java.lang.Object.registerNatives ... JNI]
    [Registering JNI native method java.lang.Object.hashCode]
    [Registering JNI native method java.lang.Object.wait]
    [Registering JNI native method java.lang.Object.notify]
    [Registering JNI native method java.lang.Object.notifyAll]
    [Registering JNI native method java.lang.Object.clone]
    [Dynamic-linking native method java.lang.System.registerNatives ... JNI]
    [Registering JNI native method java.lang.System.currentTimeMillis]
    [Registering JNI native method java.lang.System.nanoTime]
    [Registering JNI native method java.lang.System.arraycopy]
    [Dynamic-linking native method java.lang.Thread.registerNatives ... JNI]
    [Registering JNI native method java.lang.Thread.start0]
    [Registering JNI native method java.lang.Thread.stop0]
    [Registering JNI native method java.lang.Thread.isAlive]
    [Registering JNI native method java.lang.Thread.suspend0]
    [Registering JNI native method java.lang.Thread.resume0]
    [Registering JNI native method java.lang.Thread.setPriority0]
    [Registering JNI native method java.lang.Thread.yield]
    [Registering JNI native method java.lang.Thread.sleep]
    [Registering JNI native method java.lang.Thread.currentThread]
    [Registering JNI native method java.lang.Thread.countStackFrames]
    [Registering JNI native method java.lang.Thread.interrupt0]
    [Registering JNI native method java.lang.Thread.isInterrupted]
    [Registering JNI native method java.lang.Thread.holdsLock]
    [Registering JNI native method java.lang.Thread.getThreads]
    [Registering JNI native method java.lang.Thread.dumpThreads]
    [Dynamic-linking native method java.lang.Class.registerNatives ... JNI]
    [Registering JNI native method java.lang.Class.getName0]
    [Registering JNI native method java.lang.Class.getSuperclass]
    [Registering JNI native method java.lang.Class.getInterfaces]
    [Registering JNI native method java.lang.Class.getClassLoader0]
    [Registering JNI native method java.lang.Class.isInterface]
    [Registering JNI native method java.lang.Class.getSigners]
    [Registering JNI native method java.lang.Class.setSigners]
    [Registering JNI native method java.lang.Class.isArray]
    [Registering JNI native method java.lang.Class.isPrimitive]
    [Registering JNI native method java.lang.Class.getComponentType]
    [Registering JNI native method java.lang.Class.getModifiers]
    [Registering JNI native method java.lang.Class.getDeclaredFields0]
    [Registering JNI native method java.lang.Class.getDeclaredMethods0]
    [Registering JNI native method java.lang.Class.getDeclaredConstructors0]
    [Registering JNI native method java.lang.Class.getProtectionDomain0]
    [Registering JNI native method java.lang.Class.setProtectionDomain0]
    [Registering JNI native method java.lang.Class.getDeclaredClasses0]
    [Registering JNI native method java.lang.Class.getDeclaringClass]
    [Registering JNI native method java.lang.Class.getGenericSignature]
    [Registering JNI native method java.lang.Class.getRawAnnotations]
    [Registering JNI native method java.lang.Class.getConstantPool]
    [Registering JNI native method java.lang.Class.desiredAssertionStatus0]
    [Registering JNI native method java.lang.Class.getEnclosingMethod0]
    [Dynamic-linking native method java.lang.Class.getPrimitiveClass ... JNI]
    [Dynamic-linking native method java.security.AccessController.getStackAccessControlContext ... JNI]
    [Dynamic-linking native method java.security.AccessController.getInheritedAccessControlContext ... JNI]
    [Dynamic-linking native method java.lang.ClassLoader.registerNatives ... JNI]
    [Registering JNI native method java.lang.ClassLoader.retrieveDirectives]
    [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9f015b90 (LWP 18382)]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ef94b90 (LWP 18383)]
    [Dynamic-linking native method java.lang.System.initProperties ... JNI]
    [Dynamic-linking native method sun.misc.Unsafe.registerNatives ... JNI]
    [Registering JNI native method sun.misc.Unsafe.getLoadAverage]
    [Dynamic-linking native method java.lang.Throwable.fillInStackTrace ... JNI]
    [Registering JNI native method sun.misc.Unsafe.setMemory]
    [Registering JNI native method sun.misc.Unsafe.copyMemory]
    [Registering JNI native method sun.misc.Unsafe.getObject]
    [Registering JNI native method sun.misc.Unsafe.putObject]
    [Registering JNI native method sun.misc.Unsafe.getObjectVolatile]
    [Registering JNI native method sun.misc.Unsafe.putObjectVolatile]
    [Registering JNI native method sun.misc.Unsafe.getBoolean]
    [Registering JNI native method sun.misc.Unsafe.putBoolean]
    [Registering JNI native method sun.misc.Unsafe.getBooleanVolatile]
    [Registering JNI native method sun.misc.Unsafe.putBooleanVolatile]
    [Registering JNI native method sun.misc.Unsafe.getByte]
    [Registering JNI native method sun.misc.Unsafe.putByte]
    [Registering JNI native method sun.misc.Unsafe.getByteVolatile]
    [Registering JNI native method sun.misc.Unsafe.putByteVolatile]
    [Registering JNI native method sun.misc.Unsafe.getShort]
    [Registering JNI native method sun.misc.Unsafe.putShort]
    [Registering JNI native method sun.misc.Unsafe.getShortVolatile]
    [Registering JNI native method sun.misc.Unsafe.putShortVolatile]
    [Registering JNI native method sun.misc.Unsafe.getChar]
    [Registering JNI native method sun.misc.Unsafe.putChar]
    [Registering JNI native method sun.misc.Unsafe.getCharVolatile]
    [Registering JNI native method sun.misc.Unsafe.putCharVolatile]
    [Registering JNI native method sun.misc.Unsafe.getInt]
    [Registering JNI native method sun.misc.Unsafe.putInt]
    [Registering JNI native method sun.misc.Unsafe.getIntVolatile]
    [Registering JNI native method sun.misc.Unsafe.putIntVolatile]
    [Registering JNI native method sun.misc.Unsafe.getLong]
    [Registering JNI native method sun.misc.Unsafe.putLong]
    [Registering JNI native method sun.misc.Unsafe.getLongVolatile]
    [Registering JNI native method sun.misc.Unsafe.putLongVolatile]
    [Registering JNI native method sun.misc.Unsafe.getFloat]
    [Registering JNI native method sun.misc.Unsafe.putFloat]
    [Registering JNI native method sun.misc.Unsafe.getFloatVolatile]
    [Registering JNI native method sun.misc.Unsafe.putFloatVolatile]
    [Registering JNI native method sun.misc.Unsafe.getDouble]
    [Registering JNI native method sun.misc.Unsafe.putDouble]
    [Registering JNI native method sun.misc.Unsafe.getDoubleVolatile]
    [Registering JNI native method sun.misc.Unsafe.putDoubleVolatile]
    [Registering JNI native method sun.misc.Unsafe.getByte]
    [Registering JNI native method sun.misc.Unsafe.putByte]
    [Registering JNI native method sun.misc.Unsafe.getShort]
    [Registering JNI native method sun.misc.Unsafe.putShort]
    [Registering JNI native method sun.misc.Unsafe.getChar]
    [Registering JNI native method sun.misc.Unsafe.putChar]
    [Registering JNI native method sun.misc.Unsafe.getInt]
    [Registering JNI native method sun.misc.Unsafe.putInt]
    [Registering JNI native method sun.misc.Unsafe.getLong]
    [Registering JNI native method sun.misc.Unsafe.putLong]
    [Registering JNI native method sun.misc.Unsafe.getFloat]
    [Registering JNI native method sun.misc.Unsafe.putFloat]
    [Registering JNI native method sun.misc.Unsafe.getDouble]
    [Registering JNI native method sun.misc.Unsafe.putDouble]
    [Registering JNI native method sun.misc.Unsafe.getAddress]
    [Registering JNI native method sun.misc.Unsafe.putAddress]
    [Registering JNI native method sun.misc.Unsafe.allocateMemory]
    [Registering JNI native method sun.misc.Unsafe.reallocateMemory]
    [Registering JNI native method sun.misc.Unsafe.freeMemory]
    [Registering JNI native method sun.misc.Unsafe.objectFieldOffset]
    [Registering JNI native method sun.misc.Unsafe.staticFieldOffset]
    [Registering JNI native method sun.misc.Unsafe.staticFieldBase]
    [Registering JNI native method sun.misc.Unsafe.ensureClassInitialized]
    [Registering JNI native method sun.misc.Unsafe.arrayBaseOffset]
    [Registering JNI native method sun.misc.Unsafe.arrayIndexScale]
    [Registering JNI native method sun.misc.Unsafe.addressSize]
    [Registering JNI native method sun.misc.Unsafe.pageSize]
    [Registering JNI native method sun.misc.Unsafe.defineClass]
    [Registering JNI native method sun.misc.Unsafe.defineClass]
    [Registering JNI native method sun.misc.Unsafe.allocateInstance]
    [Registering JNI native method sun.misc.Unsafe.monitorEnter]
    [Registering JNI native method sun.misc.Unsafe.monitorExit]
    [Registering JNI native method sun.misc.Unsafe.tryMonitorEnter]
    [Registering JNI native method sun.misc.Unsafe.throwException]
    [Registering JNI native method sun.misc.Unsafe.compareAndSwapObject]
    [Registering JNI native method sun.misc.Unsafe.compareAndSwapInt]
    [Registering JNI native method sun.misc.Unsafe.compareAndSwapLong]
    [Registering JNI native method sun.misc.Unsafe.putOrderedObject]
    [Registering JNI native method sun.misc.Unsafe.putOrderedInt]
    [Registering JNI native method sun.misc.Unsafe.putOrderedLong]
    [Registering JNI native method sun.misc.Unsafe.park]
    [Registering JNI native method sun.misc.Unsafe.unpark]
    [Dynamic-linking native method sun.reflect.Reflection.getCallerClass ... JNI]
    [Dynamic-linking native method java.lang.String.intern ... JNI]
    [Dynamic-linking native method java.lang.Float.floatToRawIntBits ... JNI]
    [Dynamic-linking native method java.lang.Double.doubleToRawLongBits ... JNI]
    [Dynamic-linking native method java.lang.Object.getClass ... JNI]
    [Dynamic-linking native method java.lang.Class.forName0 ... JNI]
    [Dynamic-linking native method sun.reflect.Reflection.getClassAccessFlags ... JNI]
    [Dynamic-linking native method sun.reflect.NativeConstructorAccessorImpl.newInstance0 ... JNI]
    [Dynamic-linking native method sun.misc.VM.initialize ... JNI]
    [Dynamic-linking native method java.io.FileSystem.getFileSystem ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.initIDs ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.getBooleanAttributes0 ... JNI]
    [Dynamic-linking native method java.lang.System.mapLibraryName ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.canonicalize0 ... JNI]
    [Dynamic-linking native method java.lang.ClassLoader$NativeLibrary.load ... JNI]
    [Dynamic-linking native method java.io.FileInputStream.initIDs ... JNI]
    [Dynamic-linking native method java.io.FileDescriptor.initIDs ... JNI]
    [Dynamic-linking native method java.io.FileOutputStream.initIDs ... JNI]
    [Dynamic-linking native method java.lang.System.setIn0 ... JNI]
    [Dynamic-linking native method java.lang.System.setOut0 ... JNI]
    [Dynamic-linking native method java.lang.System.setErr0 ... JNI]
    [Dynamic-linking native method sun.misc.Signal.findSignal ... JNI]
    [Dynamic-linking native method sun.misc.Signal.handle0 ... JNI]
    [Dynamic-linking native method java.lang.Runtime.maxMemory ... JNI]
    [Dynamic-linking native method java.lang.Compiler.registerNatives ... JNI]
    [Registering JNI native method java.lang.Compiler.compileClass]
    [Registering JNI native method java.lang.Compiler.compileClasses]
    [Registering JNI native method java.lang.Compiler.command]
    [Registering JNI native method java.lang.Compiler.enable]
    [Registering JNI native method java.lang.Compiler.disable]
    [Dynamic-linking native method java.lang.ClassLoader$NativeLibrary.find ... JNI]
    [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
    [Dynamic-linking native method java.io.FileInputStream.open ... JNI]
    [Dynamic-linking native method java.io.FileInputStream.readBytes ... JNI]
    [Dynamic-linking native method java.io.FileInputStream.available ... JNI]
    [Dynamic-linking native method java.lang.reflect.Array.newArray ... JNI]
    [Dynamic-linking native method java.io.FileInputStream.close0 ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.list ... JNI]
    [Dynamic-linking native method java.io.ObjectStreamClass.initNative ... JNI]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ef13b90 (LWP 18384)]
    [Dynamic-linking native method java.lang.ClassLoader.findLoadedClass0 ... JNI]
    [Dynamic-linking native method java.lang.ClassLoader.findBootstrapClass ... JNI]
    [Dynamic-linking native method sun.misc.VMSupport.initAgentProperties ... JNI]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ee92b90 (LWP 18385)]
    Listening for transport dt_socket at address: 7777
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ee11b90 (LWP 18386)]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ed90b90 (LWP 18387)]
    Checked JNI functions are being used to validate JNI usage
    [New Thread 0x9ed0fb90 (LWP 18388)]
    [New Thread 0x9ec8eb90 (LWP 18389)]
    [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.initIDs ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.getLastModifiedTime ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.open ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.getTotal ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.getEntry ... JNI]
    [Dynamic-linking native method java.util.zip.ZipEntry.initIDs ... JNI]
    [Dynamic-linking native method java.util.zip.ZipEntry.initFields ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.freeEntry ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.getCSize ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.getSize ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.getMethod ... JNI]
    [Dynamic-linking native method java.util.zip.Inflater.initIDs ... JNI]
    [Dynamic-linking native method java.util.zip.Inflater.init ... JNI]
    [Dynamic-linking native method java.util.zip.Inflater.inflateBytes ... JNI]
    [Dynamic-linking native method java.util.zip.ZipFile.read ... JNI]
    [Dynamic-linking native method java.util.zip.Inflater.reset ... JNI]
    [Dynamic-linking native method java.lang.Package.getSystemPackage0 ... JNI]
    [Dynamic-linking native method java.util.jar.JarFile.getMetaInfEntryNames ... JNI]
    [Dynamic-linking native method java.lang.Double.longBitsToDouble ... JNI]
    [Dynamic-linking native method java.lang.StrictMath.floor ... JNI]
    [Dynamic-linking native method java.lang.ClassLoader.defineClass1 ... JNI]
    [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
    [Dynamic-linking native method java.util.concurrent.atomic.AtomicLong.VMSupportsCS8 ... JNI]
    [Dynamic-linking native method java.lang.Class.isAssignableFrom ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.createFileExclusively ... JNI]
    [Dynamic-linking native method java.io.FileOutputStream.open ... JNI]
    [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI]
    [Dynamic-linking native method java.io.FileOutputStream.close0 ... JNI]
    [Dynamic-linking native method com.sun.jna.Native.sizeof ... JNI]
    [Dynamic-linking native method com.sun.jna.Native.initIDs ... JNI]
    [Dynamic-linking native method java.lang.ref.Finalizer.invokeFinalizeMethod ... JNI]
    [Dynamic-linking native method com.sun.jna.Memory.malloc ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._setMemory ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._getPointer ... JNI]
    [Dynamic-linking native method com.sun.jna.Memory.free ... JNI]
    [Dynamic-linking native method java.lang.reflect.Proxy.defineClass0 ... JNI]
    
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x9ed90b90 (LWP 18387)]
    0x0616dc43 in ciEnv::register_method () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    No source file named address.
    (gdb) (gdb) bt
    #0  0x0616dc43 in ciEnv::register_method () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #1  0x060f509c in Compilation::install_code () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #2  0x060f514d in Compilation::compile_method () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #3  0x060f57a5 in Compilation::Compilation () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #4  0x060f5e9a in Compiler::compile_method () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #5  0x061a6aca in CompileBroker::invoke_compiler_on_method () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #6  0x061a64d6 in CompileBroker::compiler_thread_loop () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #7  0x063a03dd in JavaThread::run () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #8  0x06310ac9 in java_start () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #9  0xb787d4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
    #10 0xb75d949e in clone () from /lib/tls/i686/cmov/libc.so.6
    (gdb) cont
    Continuing.
    [Dynamic-linking native method sun.reflect.NativeMethodAccessorImpl.invoke0 ... JNI]
    [Dynamic-linking native method com.sun.jna.Function.invokeInt ... JNI]
    [Dynamic-linking native method com.sun.jna.Function.invokePointer ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._getString ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._getInt ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._write ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._setByte ... JNI]
    [Dynamic-linking native method java.lang.System.identityHashCode ... JNI]
    [Dynamic-linking native method sun.nio.ch.IOUtil.initIDs ... JNI]
    [Dynamic-linking native method sun.nio.ch.FileChannelImpl.initIDs ... JNI]
    [Dynamic-linking native method sun.nio.ch.FileDispatcher.init ... JNI]
    [Dynamic-linking native method sun.nio.ch.FileKey.initIDs ... JNI]
    [Dynamic-linking native method sun.nio.ch.FileKey.init ... JNI]
    [Dynamic-linking native method sun.nio.ch.FileChannelImpl.lock0 ... JNI]
    [Dynamic-linking native method java.util.TimeZone.getSystemTimeZoneID ... JNI]
    [Dynamic-linking native method java.io.UnixFileSystem.getLength ... JNI]
    [Dynamic-linking native method java.util.ResourceBundle.getClassContext ... JNI]
    [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... JNI]
    [Dynamic-linking native method java.lang.Throwable.getStackTraceElement ... JNI]
    Sep 11, 2009 11:28:17 AM nulloojavaai.NullOOJavaAI init
    INFO: initializing team 1
    Sync trace log: trace0.log
    [Dynamic-linking native method com.sun.jna.Pointer._setPointer ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._setInt ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._setShort ... JNI]
    [Dynamic-linking native method com.sun.jna.Pointer._setFloat ... JNI]
    
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb640f710 (LWP 18372)]
    fastmath::sqrt_sse (x=10000) at rts/System/FastMath.h:68
    (gdb) bt
    #0  fastmath::sqrt_sse (x=10000) at rts/System/FastMath.h:68
    #1  0x082ee033 in math::sqrt (x=10000) at rts/System/FastMath.h:264
    #2  0x082ee0ea in float3::distance (this=0xbff8c658, f=@0xbff8c64c) at rts/System/float3.h:386
    #3  0x087b7b22 in CGeoSquareProjectile (this=0xc690540, p1=@0xbff8c658, p2=@0xbff8c64c, v1=@0xbff8c5dc, v2=@0xbff8c5dc, w1=0.5, w2=0.5) at rts/Sim/Projectiles/Unsynced/GeoSquareProjectile.cpp:41
    #4  0x086c6b65 in CGeometricObjects::AddLine (this=0xb667628, start={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94355297, y = -1.94355154, z = 1}, end={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94355154, y = 1, z = 0}, width=1, arrow=0, lifetime=200, group=1) at rts/Sim/Misc/GeometricObjects.cpp:120
    #5  0x089b949e in CAICallback::CreateLineFigure (this=0xa9cd0e8, pos1={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94358444, y = -1.94358301, z = 1}, pos2={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94358301, y = 1, z = 0}, width=1, arrow=0, lifetime=200, group=0) at rts/ExternalAI/AICallback.cpp:1026
    #6  0x089aed5e in skirmishAiCallback_Engine_handleCommand (teamId=1, toId=-1, commandId=-1, commandTopic=32, commandData=0xc5faff8) at rts/ExternalAI/SSkirmishAICallbackImpl.cpp:522
    #7  0x9ebda6bb in ffi_call_SYSV () from /tmp/jna4190064345749028188.tmp
    #8  0x9ebda4aa in ffi_call (cif=0xc690540, fn=0x89ada59 <skirmishAiCallback_Engine_handleCommand>, rvalue=0xc690540, avalue=0xbff8c960) at /home/twall/jna/native/libffi/src/x86/ffi.c:326
    #9  0x9ebd230a in dispatch () from /tmp/jna4190064345749028188.tmp
    #10 0x9ebd2bc4 in Java_com_sun_jna_Function_invokeInt () from /tmp/jna4190064345749028188.tmp
    #11 0x918b4883 in ?? ()
    #12 0x918a8f29 in ?? ()
    #13 0x918a8ee7 in ?? ()
    #14 0x918a8ee7 in ?? ()
    #15 0x918a93c3 in ?? ()
    #16 0x918a9405 in ?? ()
    #17 0x918a9405 in ?? ()
    #18 0x918a8f29 in ?? ()
    #19 0x918a8f29 in ?? ()
    #20 0x918a904d in ?? ()
    #21 0x918a9405 in ?? ()
    #22 0x918a62cc in ?? ()
    #23 0x0621b25d in JavaCalls::call_helper () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #24 0x0630f998 in os::os_exception_wrapper () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #25 0x0621b0f0 in JavaCalls::call () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #26 0x06244b17 in jni_invoke_nonstatic () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #27 0x0622955a in jni_CallIntMethodV () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #28 0x0624cf3b in checked_jni_CallIntMethod () from /opt/jdk1.6/jre/lib/i386/client/libjvm.so
    #29 0x9f290eb1 in java_skirmishAI_handleEvent (teamId=1, topic=5, data=0xbff8d2b0) at AI/Interfaces/Java/src/native/JavaBridge.c:1616
    #30 0x9f292d58 in proxy_skirmishAI_handleEvent (teamId=1, topic=5, data=0xbff8d2b0) at AI/Interfaces/Java/src/native/InterfaceExport.c:252
    #31 0x0899e18a in CSkirmishAILibrary::HandleEvent (this=0xc514d50, teamId=1, topic=5, data=0xbff8d2b0) at rts/ExternalAI/SkirmishAILibrary.cpp:91
    #32 0x089bbfef in CSkirmishAI::HandleEvent (this=0xa92dd80, topic=5, data=0xbff8d2b0) at rts/ExternalAI/SkirmishAI.cpp:38
    #33 0x0899a81d in CSkirmishAIWrapper::UnitCreated (this=0xbf0b610, unitId=3567, builderId=-1) at rts/ExternalAI/SkirmishAIWrapper.cpp:298
    #34 0x0898ab9a in CEngineOutHandler::UnitCreated (this=0xa8b80f8, unit=@0xcb7ecb0, builder=0x0) at rts/ExternalAI/EngineOutHandler.cpp:269
    #35 0x087dee77 in CUnit::Init (this=0xcb7ecb0, builder=0x0) at rts/Sim/Units/Unit.cpp:1632
    #36 0x088016d2 in CUnitLoader::LoadUnit (this=0x8bb6570, ud=0xad981f0, pos={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94406223, y = 1.40129846e-45, z = 0}, team=1, build=false, facing=0, builder=0x0) at rts/Sim/Units/UnitLoader.cpp:372
    #37 0x0880196b in CUnitLoader::LoadUnit (this=0x8bb6570, name=@0xbff8d7d4, pos={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94407892, y = 1.40129846e-45, z = 0}, team=1, build=false, facing=0, builder=0x0) at rts/Sim/Units/UnitLoader.cpp:83
    #38 0x083cf12f in CSkirmishAITestScript::GameStart (this=0xa4f29a0) at rts/Game/StartScripts/SkirmishAITestScript.cpp:90
    #39 0x0833ae7d in CGame::StartPlaying (this=0xa6ae868) at rts/Game/Game.cpp:3428
    #40 0x08340fbd in CGame::ClientReadNet (this=0xa6ae868) at rts/Game/Game.cpp:3617
    #41 0x08345fac in CGame::Update (this=0xa6ae868) at rts/Game/Game.cpp:2804
    #42 0x088d3803 in SpringApp::Update (this=0xbff8e020) at rts/System/SpringApp.cpp:842
    #43 0x088db9b3 in SpringApp::Run (this=0xbff8e020, argc=1, argv=0xbff8e104) at rts/System/SpringApp.cpp:966
    #44 0x088e1882 in Run (argc=1, argv=0xbff8e104) at rts/System/Main.cpp:111
    #45 0x088e18dd in main (argc=105085600, argv=0x0) at rts/System/Main.cpp:127
    (gdb) list AI/Interfaces/Java/src/native/JavaBridge.c:1616
    Line 1616 of "AI/Interfaces/Java/src/native/JavaBridge.c" starts at address 0x9f290e7b <java_skirmishAI_handleEvent+178> and ends at 0x9f290eb4 <java_skirmishAI_handleEvent+235>.
    (gdb) list rts/Sim/Misc/GeometricObjects.cpp:120
    Line 120 of "rts/Sim/Misc/GeometricObjects.cpp" starts at address 0x86c6af8 <_ZN17CGeometricObjects7AddLineE6float3S0_fiii+1030> and ends at 0x86c6b6e <_ZN17CGeometricObjects7AddLineE6float3S0_fiii+1148>.
    (gdb) list rts/Sim/Projectiles/Unsynced/GeoSquareProjectile.cpp:41
    Line 41 of "rts/Sim/Projectiles/Unsynced/GeoSquareProjectile.cpp" starts at address 0x87b7b10 <CGeoSquareProjectile+356> and ends at 0x87b7b54 <CGeoSquareProjectile+424>.
    (gdb) list rts/System/float3.h:386
    Line 386 of "rts/System/float3.h" starts at address 0x82ee0b7 <_ZNK6float38distanceERKS_+97> and ends at 0x82ee10a <_ZNK6float38distanceERKS_+180>.
    (gdb) Quit
    (gdb) 
    

-Relationships
+Relationships

-Notes

~0004103

hoijui (reporter)

it segfaults in float fastmath::sqrt_sse(float x), at rts/System/FastMath.h:68

i attached a file with GDB output of the crash, with the intersting part beeing this (use git master commit 096cb26fede865aecb5798a0f1b452d50e373490 as reference):

[code]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb640f710 (LWP 18372)]
fastmath::sqrt_sse (x=10000) at rts/System/FastMath.h:68
(gdb) bt
#0 fastmath::sqrt_sse (x=10000) at rts/System/FastMath.h:68
#1 0x082ee033 in math::sqrt (x=10000) at rts/System/FastMath.h:264
#2 0x082ee0ea in float3::distance (this=0xbff8c658, f=@0xbff8c64c) at rts/System/float3.h:386
0000003 0x087b7b22 in CGeoSquareProjectile (this=0xc690540, p1=@0xbff8c658, p2=@0xbff8c64c, v1=@0xbff8c5dc, v2=@0xbff8c5dc, w1=0.5, w2=0.5) at rts/Sim/Projectiles/Unsynced/GeoSquareProjectile.cpp:41
0000004 0x086c6b65 in CGeometricObjects::AddLine (this=0xb667628, start={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94355297, y = -1.94355154, z = 1}, end={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94355154, y = 1, z = 0}, width=1, arrow=0, lifetime=200, group=1) at rts/Sim/Misc/GeometricObjects.cpp:120
0000005 0x089b949e in CAICallback::CreateLineFigure (this=0xa9cd0e8, pos1={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94358444, y = -1.94358301, z = 1}, pos2={static binder = {class_ = 0x9fc3618, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x8bbc344, name = 0x8a5990c "float3", size = 12, constructor = 0x88a59a6 <float3::_ConstructInstance(void*)>, destructor = 0x88a59d6 <float3::_DestructInstance(void*)>, nextBinder = 0x8bbc320}, static memberRegistrator = 0x8bbc3b4, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, x = -1.94358301, y = 1, z = 0}, width=1, arrow=0, lifetime=200, group=0) at rts/ExternalAI/AICallback.cpp:1026
#6 0x089aed5e in skirmishAiCallback_Engine_handleCommand (teamId=1, toId=-1, commandId=-1, commandTopic=32, commandData=0xc5faff8) at rts/ExternalAI/SSkirmishAICallbackImpl.cpp:522
[/code]

~0004107

hoijui (reporter)

i did the same test with NullLegacyCppAI, and it does not segfault there.
So it is either the native part of the Java Interface somehow messing up something about SSE (baczek said it could be data alignment), or it is the JVM messing up the environment, eg. FPU/CPU state.

~0004112

hoijui (reporter)

did some testing:
JDKs tested: 1.6.0_12, 1.6.0_16, 1.7.0m4
JVM flags:
-XX:UseSSE=0
-XX:UseSSE=1
-XX:+RestoreMXCSROnJNICalls
-Xint
-XX:+AlwaysRestoreFPU
-XX:+CITime
-XX:+CheckJNICalls
-Xcheck:jni
-verbose:jni
-XX:+UnlockDiagnosticVMOptions
(tried various combinations of these.. they do not help)

also resetted the FPU with streflop before the relevant code, same outcome.

i need help!

~0004144

hoijui (reporter)

a LOT of investigating, fetching tips from 3 different IRC channels and many hours later:
results of the jurney can be seen here:
http://springrts.com/phpbb/viewtopic.php?f=12&t=20408
in short:
the JVM seems to mess up memory alignment (SSE functions need 16bit alignment). There is an attribute that forces aligment in a fucntion, which fixes this bug, but it first has to be aproved to not hurt performance too much.
From how it looks to me, chances are good that it will be applied.
(it even looks as if i accidentially came up with a way to speed up SSE sqrt() by up to 30% ;-) )

~0004153

hoijui (reporter)

fixed with git commit: 166a8cf8cb7f681f85e601b742e176da56cc394c

with spring default flags, the performance los is hardly there, and as i accidentially came up with a 25% - 50% speed up of sqrt by the way, it was no question whether ot incliude it or not :D

for more details, see:
http://springrts.com/phpbb/viewtopic.php?f=12&t=20408
+Notes

-Issue History
Date Modified Username Field Change
2009-09-05 08:46 hughperkins New Issue
2009-09-11 12:48 hoijui Relationship added related to 0001634
2009-09-11 13:29 hoijui Relationship deleted related to 0001634
2009-09-11 13:31 hoijui File Added: GDB_output_096cb26fede865aecb5798a0f1b452d50e373490.txt
2009-09-11 13:39 hoijui Note Added: 0004103
2009-09-11 13:59 hoijui Project AI => Spring engine
2009-09-11 17:06 hoijui Note Added: 0004107
2009-09-12 14:03 hoijui Note Added: 0004112
2009-09-18 12:04 hoijui Note Added: 0004144
2009-09-18 22:55 hoijui Note Added: 0004153
2009-09-18 22:55 hoijui Status new => resolved
2009-09-18 22:55 hoijui Fixed in Version => 0.80.4.0+git
2009-09-18 22:55 hoijui Resolution open => fixed
2009-09-18 22:55 hoijui Assigned To => hoijui
2009-10-03 10:46 imbaczek Target Version => 0.81.0.0
+Issue History