Unexpected pre-execution of panel script causes errors

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: Ralph, russ

Post Reply
Message
Author
WillemijnL
Posts: 77
Joined: Sat Jan 30, 2016 1:14 pm

Unexpected pre-execution of panel script causes errors

#1 Post by WillemijnL » Mon May 03, 2021 5:39 am

I get many errors from my panel script because the panel script is executed many times before the script is realy started. Except for the last exectution the script is executed without the neccessary data which causes an error in a (library) function which is called with only nil values.

Even when starting AM the panel script is executed.

Code: Select all

2021-05-03 06:40:04 INFO  AMBase - Initializing
2021-05-03 06:40:04 INFO  AMBase - HW id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021-05-03 06:40:06 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "logic.lua"]:186: attempt to call a nil value (field 'load_config')
2021-05-03 06:40:06 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "logic.lua"]:186: attempt to call a nil value (field 'load_config')
2021-05-03 06:40:06 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "logic.lua"]:186: attempt to call a nil value (field 'load_config')
When starting the panel, the script is executed several times before the script is realy started. The last time it runs fine and the library function works OK as expected. I added info logging to see what happens which is only visible the last time (last two lines). The error message indicates "Error loading instrument script", but the library is only part of the panel, not part of any instrument.

Code: Select all

2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 ERROR InstrumentScanner - Instrument Switcher panel: Error loading instrument script: [string "config_loader.lua"]:150: bad argument #1 to 'for iterator' (table expected, got nil)
2021-05-03 06:45:08 INFO  SiRunner - Instrument Switcher panel: logic.lua started
2021-05-03 06:45:08 INFO  SiRunner - Instrument Switcher panel: PanelConfig.load called
For testing the panel has 5 instruments at the moment (see Instrument switcher panel).

I expect the panel script is executed only once after instrument loading when the panel is started. Perhaps these errors also causes user properties not to be visible which is another issue.

User avatar
Sling
Posts: 4435
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Unexpected pre-execution of panel script causes errors

#2 Post by Sling » Mon May 03, 2021 8:09 am

Not sure if you are just stating fact or looking for some help. If you are looking for help then it’s difficult to comment without seeing the script that generates these errors.

WillemijnL
Posts: 77
Joined: Sat Jan 30, 2016 1:14 pm

Re: Unexpected pre-execution of panel script causes errors

#3 Post by WillemijnL » Mon May 03, 2021 1:05 pm

Just stating and hopefully it can be fixed. Help is not needed. If Corjan needs the panel, I can send it to him. I don't want to publish it here at the moment, because the panel contains new tools that I only want to publish when they are finished.

User avatar
Sling
Posts: 4435
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Unexpected pre-execution of panel script causes errors

#4 Post by Sling » Mon May 03, 2021 9:10 pm

Probably better off just sending a pm then as it’s not really for the community.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests