2025-07-21 08:29 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005581Spring engineLuapublic2017-05-28 12:05
ReporterGoogle_Frog 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionduplicate 
Product Version103.0 +git 
Target VersionFixed in Version 
Summary0005581: 103.0.1-939 New terrain texture gadget error
DescriptionWe are receiving crash reports with terrain texture handler where previously there were none. My current guess is that previously these computers would crash before they reach this point.

Here is the relevant code: https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Gadgets/terrain_texture_handler.lua#L260

ZK ticket: https://github.com/ZeroK-RTS/Zero-K/issues/2253
Steps To ReproduceError here https://github.com/ZeroK-RTS/CrashReports/issues/1180
[f=0057410] Error: [LuaRules::RunCallInTraceback] error=2 (LUA_ERRRUN) callin=DrawGenesis trace=[Internal Lua error: Call failure] [string "LuaRules/Gadgets/terrain_texture_handler.lu..."]:274: bad argument 0000004 to 'spGetMapSquareTexture' (string expected, got nil)
terminate called after throwing an instance of 'std::bad_alloc'
  what(): std::bad_alloc

Error here https://github.com/ZeroK-RTS/CrashReports/issues/1186
[f=0087683] Error: [LuaRules::RunCallInTraceback] error=2 (LUA_ERRRUN) callin=DrawGenesis trace=[Internal Lua error: Call failure] [string "LuaRules/Gadgets/terrain_texture_handler.lu..."]:277: bad argument #1 to 'RenderToTexture' (string expected, got nil)
[f=0087686] Error: [LuaRules::RunCallInTraceback] error=2 (LUA_ERRRUN) callin=DrawGenesis trace=[Internal Lua error: Call failure] [string "LuaRules/Gadgets/terrain_texture_handler.lu..."]:350: bad argument #1 to 'RenderToTexture' (string expected, got nil)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
duplicate of 0005574resolvedKloot 103.0.1-939 various failues to allocate memory 
+Relationships

-Notes

~0017722

Kloot (developer)

Last edited: 2017-05-28 12:03

View 2 revisions

gl.CreateTexture can return nil (which is more likely on graphics cards with limited free memory), the gadget doesn't check for that.

~0017723

Kloot (developer)

also in essence a duplicate of 0005574.
+Notes

-Issue History
Date Modified Username Field Change
2017-05-28 04:12 Google_Frog New Issue
2017-05-28 11:58 Kloot Note Added: 0017722
2017-05-28 12:03 Kloot Note Edited: 0017722 View Revisions
2017-05-28 12:05 Kloot Status new => closed
2017-05-28 12:05 Kloot Resolution open => duplicate
2017-05-28 12:05 Kloot Note Added: 0017723
2017-05-28 12:05 Kloot Relationship added duplicate of 0005574
+Issue History