View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002631 | Spring engine | Lua | public | 2011-09-01 17:22 | 2016-02-15 01:33 |
| Reporter | Jools | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 0.82.7.1 | ||||
| Summary | 0002631: LuaUI/widgets.lua crashes on local widget error | ||||
| Description | An error in function widget:GetConfigData(data) causes the whole LUAUI to crash. Infolog produces the following error: Lua LoadCode pcall error = 2, luaui.lua, error = 2, LuaUI/widgets.lua, [string "LuaUI\Widgets\tp_SEH.lua"]:18: attempt to index global 'undefinedvar' (a nil value) | ||||
| Additional Information | A test widget to reproduce the error is attached here. local versionNumber = "1.0" function widget:GetInfo() return { name = "Spring exception hunter", desc = "Test a bug in spring lua", author = "Jools", date = "Sep 1, 2011", license = "GNU GPL v2", layer = 0, enabled = true } end local var1 function widget:GetConfigData(data) -- save if undefinedvar.stupidcode then -- CRASH ON THIS LINE --Echo("Saving config data") return { var1 = var1 } end end function widget:SetConfigData(data) -- load var1 = data.var1 end | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
infolog does not indicate a crash of whole luaui. |
|
|
Well, maybe there are some parts of it that don't crash then, but to the user it's the same thing. If you put this widget in your widgets folder then there is *nothing* you can do in-game to make game working. The game will appear with just a commander, buildmenu and resources bar. All other lua-things crash, for instance there is no minimap and no way to press F11 to enable widgets. So typing /luaui reload doesn't work, and that's why I thought the whole luaui crashed. Because it is effectively not working. Just try for yourself. A similar error in one of my widgets forced people to reinstall the whole widgets folder to make the game working. |
|
|
Fix 5778cde5e2d53880b398bd442efb6786b82e8bbe committed to develop branch: fix 0002631, repo: spring changeset id: 6621 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-09-01 17:22 | Jools | New Issue | |
| 2011-09-01 17:22 | Jools | File Added: infolog.txt | |
| 2011-09-05 21:35 | jK | Note Added: 0007327 | |
| 2011-09-06 17:35 | Jools | File Added: tp_SEH.lua | |
| 2011-09-06 17:43 | Jools | Note Added: 0007335 | |
| 2016-02-15 01:33 | Changeset attached | => spring develop 5778cde5 | |
| 2016-02-15 01:33 | Anonymous | Note Added: 0015786 | |
| 2016-02-15 01:33 | Anonymous | Status | new => resolved |
| 2016-02-15 01:33 | Anonymous | Resolution | open => fixed |