2024-04-23 15:39 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001756Spring engineLuapublic2010-07-08 09:35
ReporterGoogle_Frog 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionwon't fix 
Product Version 
Target VersionFixed in Version 
Summary0001756: Hole in the world when heightmap is set to NaN using Lua
DescriptionI doubt this bug would ever occur but I heard that Spring devs want to hear about any crash that lua can cause. Sometimes bugs in my terraform gadget cause the manipulated parts of the map to disappear. I assume that something has been divided by zero. Strangely Spring does not crash at that point. This crash occurred when a unit walked into the hole, at this stage the water plane (water 0) was flashing on and off.
Additional InformationSpring 0.80.5.2 (0.80.5.2-5-gcb5d5b5{0.80.5-branch}-cmake-mingw32) has crashed.
[ 239532] Exception: Access violation (0xc0000005)
[ 239532] Exception Address: 0x006b3f1b
[ 239532] DLL information:
[ 239532] 0x00400000 spring
[ 239532] 0x7c900000 ntdll
[ 239532] 0x7c800000 kernel32
[ 239532] 0x10000000 DevIL
[ 239532] 0x77c10000 MSVCRT
[ 239532] 0x003e0000 ILU
[ 239532] 0x77dd0000 ADVAPI32
[ 239532] 0x77e70000 RPCRT4
[ 239532] 0x77fe0000 Secur32
[ 239532] 0x68b20000 GLU32
[ 239532] 0x5ed00000 OPENGL32
[ 239532] 0x77f10000 GDI32
[ 239532] 0x77d40000 USER32
[ 239532] 0x73760000 DDRAW
[ 239532] 0x73bc0000 DCIMAN32
[ 239532] 0x76c90000 IMAGEHLP
[ 239532] 0x6fbc0000 mingwm10
[ 239532] 0x7c9c0000 SHELL32
[ 239532] 0x77f60000 SHLWAPI
[ 239532] 0x71ab0000 WS2_32
[ 239532] 0x71aa0000 WS2HELP
[ 239532] 0x6e940000 libgcc_s_dw2-1
[ 239532] 0x00fe0000 SDL
[ 239532] 0x76b40000 WINMM
[ 239532] 0x7c340000 MSVCR71
[ 239532] 0x66fc0000 freetype6
[ 239532] 0x61b80000 zlib1
[ 239532] 0x6ed80000 glew32
[ 239532] 0x6b180000 vorbisfile
[ 239532] 0x63e00000 vorbis
[ 239532] 0x01030000 ogg
[ 239532] 0x01050000 OpenAL32
[ 239532] 0x76390000 IMM32
[ 239532] 0x773d0000 comctl32
[ 239532] 0x5d090000 comctl32
[ 239532] 0x5ad70000 uxtheme
[ 239532] 0x74720000 MSCTF
[ 239532] 0x755c0000 msctfime
[ 239532] 0x774e0000 ole32
[ 239532] 0x605d0000 mslbui
[ 239532] 0x03670000 ATKOGL32
[ 239532] 0x69500000 nvoglnt
[ 239532] 0x72280000 DINPUT
[ 239532] 0x688f0000 HID
[ 239532] 0x77920000 SETUPAPI
[ 239532] 0x76c30000 WINTRUST
[ 239532] 0x77a80000 CRYPT32
[ 239532] 0x77b20000 MSASN1
[ 239532] 0x72d20000 wdmaud
[ 239532] 0x72d10000 msacm32
[ 239532] 0x77be0000 MSACM32
[ 239532] 0x77bd0000 midimap
[ 239532] 0x73f10000 dsound
[ 239532] 0x77c00000 VERSION
[ 239532] 0x76fd0000 CLBCATQ
[ 239532] 0x77120000 OLEAUT32
[ 239532] 0x77050000 COMRes
[ 239532] 0x73ee0000 KsUser
[ 239532] 0x04f70000 wrap_oal
[ 239532] 0x71a50000 mswsock
[ 239532] 0x662b0000 hnetcfg
[ 239532] 0x71a90000 wshtcpip
[ 239532] 0x59a60000 DBGHELP
[ 239532] Stacktrace:
[ 239532] (0) C:\Program Files\Spring 80.5\spring.exe [0x006B3F1B]
[ 239532] (1) C:\Program Files\Spring 80.5\spring.exe [0x006BADC3]
[ 239532] (2) C:\Program Files\Spring 80.5\spring.exe [0x0072FBDF]
[ 239532] (3) C:\Program Files\Spring 80.5\spring.exe [0x0073AD53]
[ 239532] (4) C:\Program Files\Spring 80.5\spring.exe [0x00405583]
[ 239532] (5) C:\Program Files\Spring 80.5\spring.exe [0x0041E8DE]
[ 239532] (6) C:\Program Files\Spring 80.5\spring.exe [0x00422B4C]
[ 239532] (7) C:\Program Files\Spring 80.5\spring.exe [0x007F29FA]
[ 239532] (8) C:\Program Files\Spring 80.5\spring.exe [0x007F9915]
[ 239532] (9) C:\Program Files\Spring 80.5\spring.exe [0x007EF1AB]
[ 239532] (10) C:\Program Files\Spring 80.5\spring.exe [0x007EF651]
[ 239532] (11) C:\Program Files\Spring 80.5\spring.exe [0x00887C28]
[ 239532] (12) C:\Program Files\Spring 80.5\spring.exe [0x0040124B]
[ 239532] (13) C:\Program Files\Spring 80.5\spring.exe [0x004012B8]
[ 239532] (14) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FE7]
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0004414

SirMaverick (reporter)

Last edited: 2009-12-08 12:28

Example how to reproduce?

Similar construct like 0001470. Bad parameters for LevelHeightMap didn't crash Spring directly, but when the map was rendered.

~0004415

Google_Frog (reporter)

Create a ramp at least 2 segments long and 1 segement wide using the modified terraform gadget.

The only modification is line 1507, in the working gadget the line is 1506. It's got a lot of knock on effects though as the modification screws up the indexing on a table used to check intercepts.

~0004416

SirMaverick (reporter)

Last edited: 2009-12-08 21:52

Could reproduce this after some time. It's really void area: There is no tooltip for the area, nor is any command allowed (move etc.). Units will block at the edge. I used air constructors for terraforming, those who were in the void area when it appeared where frozen, didn't move anymore. They could only move out by "bumping" with other planes.

If I move the camera center (cross) into the void area the screen gets white. Flicker appeared later. Not just water, but also the land flickers. It flickers only when the game is running - no flicker when paused.

Tested with default settings + lups disabled.

I'll try to create a smaller test case.

~0004417

SirMaverick (reporter)

Last edited: 2009-12-08 23:45

Reproduced by:

  local a = 0
  local b = 0/a -- nan
  Spring.SetHeightMapFunc(
    function()
      for x = 1, 100 do
        for y = 1, 100 do
          Spring.SetHeightMap(x,y,b)
        end
      end
    end
  )

Seems all height map function have this problem.

~0004418

Kloot (developer)

Probably many more than just those related to heightmap manipulation; Spring can not be expected to sanitize every possible Lua-provided argument.
+Notes

-Issue History
Date Modified Username Field Change
2009-12-08 12:00 Google_Frog New Issue
2009-12-08 12:04 SirMaverick Note Added: 0004414
2009-12-08 12:08 SirMaverick Note Edited: 0004414
2009-12-08 12:28 SirMaverick Note Edited: 0004414
2009-12-08 15:00 Google_Frog File Added: unit_terraform.lua
2009-12-08 15:03 Google_Frog Note Added: 0004415
2009-12-08 21:51 SirMaverick Note Added: 0004416
2009-12-08 21:52 SirMaverick File Added: terra.jpg
2009-12-08 21:52 SirMaverick Note Edited: 0004416
2009-12-08 23:42 SirMaverick Note Added: 0004417
2009-12-08 23:45 SirMaverick Note Edited: 0004417
2009-12-09 01:44 Kloot Note Added: 0004418
2010-01-26 14:58 tvo Summary Hole in the world => Hole in the world when heightmap is set to NaN using Lua
2010-07-08 09:35 jK Status new => closed
2010-07-08 09:35 jK Resolution open => won't fix
+Issue History