2019-08-23 15:47 CEST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002631Spring engineLuapublic2016-02-15 01:33
ReporterJools 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.82.7.1 
Target VersionFixed in Version 
Summary0002631: LuaUI/widgets.lua crashes on local widget error
DescriptionAn 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 InformationA 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
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files
  • txt file icon infolog.txt (15,710 bytes) 2011-09-01 17:22 -
    LogOutput initialized.
    Spring 0.82.7.1 (0.82.7.1)
    Build date/time: Jan  8 2011 00:17:26
    Available log subsystems: 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).
      Use "none" to disable the default log subsystems.
    using default configuration source "E:\Games\Spring\/springsettings.cfg"
    [CMyMath::Init] CPU SSE mask: 124, flags:
    	SSE 1.0:  1,  SSE 2.0:  1
    	SSE 3.0:  1, SSSE 3.0:  1
    	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: Microsoft Windows
    Microsoft Windows 7 Ultimate Edition, 64-bit Service Pack 1 (build 7601)
    Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz; 4095MB RAM, 10236MB pagefile
    OS: emulated 32bit mode
    Using read-write data directory: E:\Games\Spring\
    Using read-only data directory: T:\Users\Pontus\Documents\My Games\Spring\
    Scanning: T:\Users\Pontus\Documents\My Games\Spring\maps
    Scanning: T:\Users\Pontus\Documents\My Games\Spring\mods
    Scanning: E:\Games\Spring\maps
    Error opening E:\Games\Spring\maps\DeltaSiegeOrig.sd7: Archive not found
    Unable to open archive: E:\Games\Spring\maps\DeltaSiegeOrig.sd7
    Scanning: E:\Games\Spring\base
    Scanning: E:\Games\Spring\games
    Scanning: E:\Games\Spring\mods
    Scanning: E:\Games\Spring\packages
    Supported Video modes: 1280x1024, 1280x960, 1280x800, 1280x768, 1280x720, 1152x864, 1024x768, 800x600, 720x576, 720x480, 640x480
    Video mode set to 1280x1024/32bit
    [f=0000000] SDL:  1.2.10
    [f=0000000] GL:   2.1.2
    [f=0000000] GL:   NVIDIA Corporation
    [f=0000000] GL:   GeForce 7300 GT/PCI/SSE2
    [f=0000000] GLSL: 1.20 NVIDIA via Cg compiler
    [f=0000000] GLEW: 1.5.4
    [f=0000000] Joysticks found: 0
    [f=0000000] Joystick 0 not found
    [f=0000000] Connecting to local server
    [f=0000000] Starting GameServer: 12 ms
    [f=0000000] Starting demo recording
    [f=0000000] [Sound] OpenAL info:
    [f=0000000] [Sound]   Vendor:     OpenAL Community
    [f=0000000] [Sound]   Version:    1.1 ALSOFT 1.11.753
    [f=0000000] [Sound]   Renderer:   OpenAL Soft
    [f=0000000] [Sound]   AL Extensions: AL_EXTX_buffer_sub_data AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
    [f=0000000] [Sound]   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXTX_thread_local_context
    [f=0000000] [Sound]                   ALC_EXT_EFX found (required for air absorption): yes
    [f=0000000] [Sound]   Device:     DirectSound Software
    [f=0000000] [Sound]   Available Devices:  
    [f=0000000] [Sound]                       DirectSound Software
    [f=0000000] [Sound] air absorption enabled: 0.1
    [f=0000000] Using mod XTA 9.665 beta
    [f=0000000] Using mod archive XTAPEV9665b(1).sd7
    [f=0000000] Loading client data: 105 ms
    [f=0000000] User number 0 (team 0, allyteam 0)
    [f=0000000] [Sound]  parsed 4 sounds from gamedata/sounds.lua
    [f=0000000] Loading sounds: 2 ms
    [f=0000000] Camera and mouse: 110 ms
    [f=0000000] Parsing unit icons
    [f=0000000] Loading GameData Definitions
    [f=0000000] WARNING: removed core_mkrogoth unitDef, missing model file  (core_mkrogoth.3do)
    [f=0000000] WARNING: removed nuclear_missilex3 weaponDef, missing model
    [f=0000000] Loading all definitions:  0.817000
    [f=0000000] Loading GameData Definitions: 876 ms
    [f=0000000] Parsing Map Information
    [f=0000000] Loading SMF
    [f=0000000] Loading Map
    [f=0000000] Calculating smooth height mesh
    [f=0000000] Calculating smooth mesh: 47 ms
    [f=0000000] Number of damage types: 17
    [f=0000000] Creating unit textures
    [f=0000000] Loading weapon definitions
    [f=0000000] Could not load sound from def: 0
    [f=0000000] Could not load sound from def: corcomhit
    [f=0000000] Could not load sound from def: 0
    [f=0000000] Could not load sound from def: 0
    [f=0000000] Could not load sound from def: 0
    [f=0000000] Loading unit definitions
    [f=0000000] Could not load sound from def: torpadv1
    [f=0000000] WARNING: too many unit categories (32), skipping level10
    [f=0000000] WARNING: too many unit categories (33), skipping ctrl_c
    [f=0000000] WARNING: too many unit categories (34), skipping energy
    [f=0000000] WARNING: too many unit categories (35), skipping carry
    [f=0000000] WARNING: too many unit categories (36), skipping antisub
    [f=0000000] WARNING: too many unit categories (37), skipping all
    [f=0000000] WARNING: too many unit categories (38), skipping core
    [f=0000000] WARNING: too many unit categories (39), skipping phib
    [f=0000000] WARNING: too many unit categories (40), skipping defensive
    [f=0000000] WARNING: too many unit categories (41), skipping metal
    [f=0000000] WARNING: too many unit categories (42), skipping mine
    [f=0000000] WARNING: too many unit categories (43), skipping kamikaze
    [f=0000000] WARNING: too many unit categories (44), skipping ctrl_m
    [f=0000000] WARNING: too many unit categories (45), skipping ctrl_s
    [f=0000000] WARNING: too many unit categories (46), skipping storage
    [f=0000000] WARNING: too many unit categories (47), skipping jam
    [f=0000000] WARNING: too many unit categories (48), skipping ctrl_n
    [f=0000000] WARNING: too many unit categories (49), skipping rad
    [f=0000000] WARNING: too many unit categories (50), skipping ctrl_j
    [f=0000000] WARNING: too many unit categories (51), skipping bomb
    [f=0000000] WARNING: too many unit categories (52), skipping ctrl_u
    [f=0000000] WARNING: too many unit categories (53), skipping stealth
    [f=0000000] WARNING: too many unit categories (54), skipping spy
    [f=0000000] WARNING: too many unit categories (55), skipping extractor
    [f=0000000] WARNING: too many unit categories (56), skipping tll
    [f=0000000] Inconsistent movedata 13 for arm_plesiosaur (moveclass tankhover4): floater, but not a ship movetype
    [f=0000000] Could not load sound from def: hovsmof1
    [f=0000000] WARNING: too many unit categories (57), skipping paral
    [f=0000000] WARNING: too many unit categories (58), skipping armspid
    [f=0000000] WARNING: too many unit categories (59), skipping category=core
    [f=0000000] WARNING: too many unit categories (60), skipping notland
    [f=0000000] WARNING: too many unit categories (61), skipping minelayer
    [f=0000000] WARNING: too many unit categories (62), skipping ctrl_x
    [f=0000000] WARNING: too many unit categories (63), skipping fort
    [f=0000000] Inconsistent movedata 20 for armflea (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] Inconsistent movedata 20 for armfleaa (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] WARNING: too many unit categories (64), skipping mobile
    [f=0000000] WARNING: too many unit categories (65), skipping ctrl_k
    [f=0000000] Could not load sound from def: torpadv1
    [f=0000000] WARNING: too many unit categories (66), skipping die
    [f=0000000] Inconsistent movedata 20 for dieflea (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] Inconsistent movedata 20 for fleagoth (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] Inconsistent movedata 20 for mflea (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] Inconsistent movedata 20 for minigoth (moveclass tankhover9): neither canhover nor floater, but not a ground movetype
    [f=0000000] Loading feature definitions
    [f=0000000] Initializing map features
    [f=0000000] Reading Estimate PathCosts [8]
    [f=0000000] Reading Estimate PathCosts [32]
    [f=0000000] [CPathManager] pathing data checksum: ac212386
    [f=0000000] You are missing the "ARB_shadow_ambient" extension (this will probably make shadows darker than they should be)
    [f=0000000] Loading .smt tile-file "maps/Aquatic_Divide_TNM05-V2.smt"
    [f=0000000] Loading 15436 tiles from file 1/1
    [f=0000000] Reading tiles
    [f=0000000] Reading tile map
    [f=0000000] generating MipMaps: 2 ms
    [f=0000000] Creating Projectile Textures
    [f=0000000] Creating sky
    [f=0000000] Loading console: 0 ms
    [f=0000000] [Sound] Unable to open audio file: FailedCommand
    [f=0000000] [Sound] CSound::GetSoundId: could not find sound: FailedCommand
    [f=0000000] Loading LuaRules
    [f=0000000] Loaded gadget:  CobButton           <unit_cobbutton.lua>
    [f=0000000] Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    [f=0000000] Loaded gadget:  Disable Buildoptions  <unit_disable_buildoptions.lua>
    [f=0000000] Loaded gadget:  Dynamic collision volume & Hitsphere Scaledown  <unit_dynamic_collision_volume.lua>
    [f=0000000] Loaded gadget:  Health Upgrade      <unit_health_upgrade.lua>
    [f=0000000] Loaded gadget:  Jumpjets            <unit_jumpjets.lua>
    [f=0000000] Loaded gadget:  No Land Damage      <unit_no_land_damage.lua>
    [f=0000000] Loaded gadget:  No Self Pwn         <unit_noselfpwn.lua>
    [f=0000000] Loaded gadget:  NoAirNuke           <exp_no_air_nuke.lua>
    [f=0000000] Loaded gadget:  Production Rate     <unit_buildspeed.lua>
    [f=0000000] Loaded gadget:  Repair Pad          <unit_refuel.lua>
    [f=0000000] Loaded gadget:  Spawn               <commoption.lua>
    [f=0000000] Loaded gadget:  UnitEStallDisable   <unit_estall_disable.lua>
    [f=0000000] Loaded gadget:  UnitMorph           <unit_morph.lua>
    [f=0000000] Loaded gadget:  UnitStealth         <unit_stealth.lua>
    [f=0000000] Loaded gadget:  lups_wrapper.lua    <lups_wrapper.lua>
    [f=0000000] Loaded gadget:  Area Attack         <areaattack.lua>
    [f=0000000] Loaded gadget:  Team Com Ends       <teamcomends.lua>
    [f=0000000] Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    [f=0000000] Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    [f=0000000] Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    [f=0000000] Loaded gadget:  Chicken Spawner     <unit_spawner.lua>
    [f=0000000] Loaded gadget:  Dynamic collision volume & Hitsphere Scaledown  <unit_dynamic_collision_volume.lua>
    [f=0000000] Loaded gadget:  UnitEStallDisable   <unit_estall_disable.lua>
    [f=0000000] Loaded gadget:  UnitMorph           <unit_morph.lua>
    [f=0000000] Loaded gadget:  UnitStealth         <unit_stealth.lua>
    [f=0000000] Loaded gadget:  mo_nowrecks         <mo_nowrecks.lua>
    [f=0000000] Loaded gadget:  Area Attack         <areaattack.lua>
    [f=0000000] Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    [f=0000000] Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    [f=0000000] Loaded gadget:  Lups                <lups_wrapper.lua>
    [f=0000000] Loading LuaGaia
    [f=0000000] Loading LuaUI
    [f=0000000] Using LUAUI_DIRNAME = LuaUI/
    [f=0000000] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
    [f=0000000] LuaUI: bound F11 to the widget selector
    [f=0000000] LuaUI: bound CTRL+F11 to tweak mode
    [f=0000000] Switching to Overhead (TA) style camera
    [f=0000000] Hardware is incompatible with Xray shader requirements
    [f=0000000] Failed to load: gui_advplayerslist.lua  (duplicate name)
    [f=0000000] Failed to load: gui_ally_res.lua  (duplicate name)
    [f=0000000] Failed to load: unit_customformations2.lua  (duplicate name)
    [f=0000000] Failed to load: unit_z_selector.lua  (duplicate name)
    [f=0000000] Loading widget from mod:   HealthBars          <unit_healthbars.lua> ...
    [f=0000000] Loading widget from user:  Commander Name Tags1.1  <unit_comm_nametags.lua> ...
    [f=0000000] Loading widget from user:  Ally Resource Bars  <gui_ally_res.lua> ...
    [f=0000000] Loading widget from user:  AdvPlayersList      <gui_advplayerslist.lua> ...
    [f=0000000] Loading widget from mod:   BuildETA - XTA      <gui_build_eta_xta.lua> ...
    [f=0000000] Loading widget from user:  Don't Shoot         <unit_dontshoot.lua> ...
    [f=0000000] Loading widget from mod:   Cloak Fire State    <unit_cloakfirestate.lua> ...
    [f=0000000] Loading widget from mod:   DontMove - XTA      <unit_dontmove_xta.lua> ...
    [f=0000000] Loading widget from user:  SmartAreaReclaim    <unit_smart_area_reclaim.lua> ...
    [f=0000000] Loading widget from user:  Point Tracker       <gui_point_tracker.lua> ...
    [f=0000000] Loading widget from user:  DCIcon              <dbg_dcicon.lua> ...
    [f=0000000] Loading widget from mod:   FactoryGuard - XTA  <unit_factory_guard_xta.lua> ...
    [f=0000000] Loading widget from mod:   Holdfire Fix        <unit_holdfire_fix.lua> ...
    [f=0000000] Loading widget from mod:   State Reverse Toggle  <cmd_state_reverse_toggle.lua> ...
    [f=0000000] Loading widget from user:  Z Selector          <unit_z_selector.lua> ...
    [f=0000000] Loading widget from mod:   ReclaimInfo - XTA   <gui_reclaiminfo_xta.lua> ...
    [f=0000000] Loading widget from user:  Pause Screen        <gui_pauseScreen.lua> ...
    [f=0000000] Loading widget from mod:   DGun Stall Assist   <unit_dgun_stall_assist.lua> ...
    [f=0000000] Loading widget from user:  Autodestruction Alert  <tp_autodestruction_alert.lua> ...
    [f=0000000] Loading widget from mod:   Stockpiler (dynamic, alternate version) - XTA  <unit_stockpile_dynamic_alt.lua> ...
    [f=0000000] Loading widget from user:  Defense Range       <gui_defenseRange.lua> ...
    [f=0000000] Loading widget from mod:   Stockpiler (dynamic) - XTA  <unit_stockpile_dynamic.lua> ...
    [f=0000000] Loading widget from user:  Force cloak         <tp_forcecloak.lua> ...
    [f=0000000] Loading widget from user:  Lock Target         <tp_locktarget.lua> ...
    [f=0000000] Loading widget from user:  Spring exception hunter  <tp_SEH.lua> ...
    [f=0000000] Loading widget from mod:   Start Point Remover - XTA  <init_start_point_remover_xta.lua> ...
    [f=0000000] Loading widget from mod:   Attack AoE - Xta    <gui_attack_aoe_xta.lua> ...
    [f=0000000] Loading widget from user:  SmoothScroll        <camera_smooth_move.lua> ...
    [f=0000000] Loading widget from user:  Commander Behaviour: rightlick = move instead of reclaim  <tp_comantireclaim.lua> ...
    [f=0000000] Loading widget from user:  Sneer after comnap  <tp_comnapsneer.lua> ...
    [f=0000000] Loading widget from user:  Keyfix              <tp_keyfix.lua> ...
    [f=0000000] Loading widget from user:  FastSwitch          <gui_fastswitch.lua> ...
    [f=0000000] Loading widget from user:  Team View           <gui_team_viewer.lua> ...
    [f=0000000] Loading widget from user:  Rank Icons          <gui_xp.lua> ...
    [f=0000000] Loading widget from mod:   Select n Center! - XTA  <gui_center_n_select_xta.lua> ...
    [f=0000000] Loading widget from mod:   LupsManager         <gfx_lups_manager.lua> ...
    [f=0000000] Loading widget from user:  Ecostats            <gui_ecostats.lua> ...
    [f=0000000] Ecostats: widget loaded in active player mode
    [f=0000000] Loading widget from mod:   Lups                <lups_wrapper.lua> ...
    [f=0000000] Loading widget from user:  CustomFormations2   <unit_customformations2.lua> ...
    [f=0000000] 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)
    [f=0000000] Finalizing...
    [f=0000000] Connection attempt from Jools
    [f=0000000]  -> Version: 0.82.7.1 (0.82.7.1)
    [f=0000000]  -> Connection established (given id 0)
    [f=0000000] Player Jools finished loading and is now ingame
    [f=0000000] Switching to Smooth style camera
    [f=0000000] GameID: 0ca25f4eec2437b9e9fda45f1cdf4421
    [f=0000000] Jools added point: Start 0
    [f=0000001] Skirmish AI "Enemy" took over control of team 1
    [f=0000518] User exited
    [f=0000518] Path cache hits 0 0%
    [f=0000518] Path cache hits 0 0%
    [f=0000518] Statistics for local connection:
    Received: 1291 bytes
    Sent: 4967 bytes
    
    txt file icon infolog.txt (15,710 bytes) 2011-09-01 17:22 +
  • ? file icon tp_SEH.lua (605 bytes) 2011-09-06 17:35

-Relationships
+Relationships

-Notes

~0007327

jK (developer)

infolog does not indicate a crash of whole luaui.

~0007335

Jools (reporter)

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.

~0015786

Anonymous (viewer)

Fix 5778cde5e2d53880b398bd442efb6786b82e8bbe committed to develop branch: fix 0002631, repo: spring changeset id: 6621
+Notes

+Related Changesets

-Issue History
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
+Issue History