Discuss suspected bugs with other users and Sim Innovations Staff
Moderators: russ , Ralph
Keith Baxter
Posts: 4458 Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana
#221
Post
by Keith Baxter » Sat Sep 23, 2023 6:43 pm
SimPassion wrote: ↑ Sat Sep 23, 2023 6:37 pm
Just discovered error in json static data reading and construction logic, will create CTD with AM 4.2 (BETA 26)
Gilles,
Is your file a valid json?
Check here.
https://jsonlint.com/
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
SimPassion
Posts: 5001 Joined: Thu Jul 27, 2017 12:22 am
#222
Post
by SimPassion » Sat Sep 23, 2023 7:54 pm
Right Keith, converted from CSV to JSON, however the conversion had put "\u0026" in place of "&", I missed this point, thanks for the head up
image.png (7.21 KiB) Viewed 404 times
Now I just have this error :
Code: Select all
ERROR - logic.lua:2: Failed to load static data from json_data.json: Error before: ÿþ[
using the following statement :
Code: Select all
data = static_data_load("json_data.json")
Keith Baxter
Posts: 4458 Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana
#223
Post
by Keith Baxter » Sat Sep 23, 2023 8:03 pm
SimPassion wrote: ↑ Sat Sep 23, 2023 7:54 pm
Right Keith, converted from CSV to JSON, however the conversion had put "\u0026" in place of "&", I missed this point, thanks for the head up
image.png
Now I just have this error :
Code: Select all
ERROR - logic.lua:2: Failed to load static data from json_data.json: Error before: ÿþ[
using the following statement :
Code: Select all
data = static_data_load("json_data.json")
Post your json_data.json file and I will take a look.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
SimPassion
Posts: 5001 Joined: Thu Jul 27, 2017 12:22 am
#225
Post
by SimPassion » Sat Sep 23, 2023 8:15 pm
It seems static_data_load doesn't like underscore char "_" in the filename ...
[EDIT] Now it works, thanks Keith for your help !!!
image.png (8.58 KiB) Viewed 393 times
Last edited by
SimPassion on Sat Sep 23, 2023 8:40 pm, edited 1 time in total.
Keith Baxter
Posts: 4458 Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana
#226
Post
by Keith Baxter » Sat Sep 23, 2023 8:33 pm
SimPassion wrote: ↑ Sat Sep 23, 2023 8:15 pm
It seems static_data_load doesn't like underscore char "_" in the filename ...
[EDIT] Now it works, thanks Keith for your help !!!
image.png
Are you sure Gilles?
I have a lot of json files with "_" and all seem to work.
You sure it was not a typo?
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
SimPassion
Posts: 5001 Joined: Thu Jul 27, 2017 12:22 am
#227
Post
by SimPassion » Sat Sep 23, 2023 8:46 pm
Keith Baxter wrote: ↑ Sat Sep 23, 2023 8:33 pm
Are you sure Gilles?
I have a lot of json files with "_" and all seem to work.
You sure it was not a typo?
Keith
Sure Keith, the output filename is shown here, together with the script part :
https://siminnovations.com/forums/viewt ... 160#p56160
However I reverted to the initial filename with "_" in it and now it works as expected, so I have no clue what triggered the issue previously (made the testing on both 4.1.6 and 4.2 BETA 26 with same error message)
Thanks in any case for your help to diagnose Keith
Keith Baxter
Posts: 4458 Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana
#228
Post
by Keith Baxter » Sat Sep 23, 2023 8:49 pm
Gilles,
Are you checking if the data has loaded?
It might be that you are trying to access the data before it has loaded.
Code: Select all
---Map static Data
map_level1_data = static_data_load("world_110.json")
if map_level1_data ~= nil then
print("The Map level 1 data has loaded")
end
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
SimPassion
Posts: 5001 Joined: Thu Jul 27, 2017 12:22 am
#229
Post
by SimPassion » Sat Sep 23, 2023 9:03 pm
In the case it was triggering an error, I had only one line in synchronous mode :
Code: Select all
data = static_data_load("json_data.json")
However and as mentioned in my last post, it do works now, so no idea
Detlef
Posts: 285 Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria
#230
Post
by Detlef » Sat Sep 30, 2023 3:38 pm
Hi,
just to let you know. After MSFS Sim update 13 yesterday, all my Airmanager instruments stopped working. More precisely, they didn't react to mouse/Knobster actions any more, and also did not reflect the aircrafts status. I found that I had to re-install the Airmanager plug-in. In the course I forgot that I still had an old plugin installed. So by accident I tried the most recent one Flightsim plugins 4.1 Home Use (BETA 13).exe. That worked somewhat, but when turning the Knobster there is a delay of one to several seconds before anything happens.
So I went back to the version Flightsim plugins 4.1 Home Use (BETA 10).exe again. Because I still use Air Manager 4.2 Home Use (BETA 23) for the Knobster delay problems.
Thank you
Detlef