Comments (5)
@san7890 The "bad index" runtimes on the map loader were exactly what we were seeing (leading to a Tramstation that was partly non-functional), and it was a royal pain to track down. I had noticed that it was also not loading the word filter toml, but I wasn't sure exactly why it was breaking until I created the testbed in the OP.
from rust-g.
Yeah about that test...
#98 rewrote it.
var/test_json = @{"
{"database":{"data":[["delta","phi"]],"enabled":true,"ports":[8000,25565],"temp_targets":{"case":72,"cpu":79}}}
"}
/test/proc/check_toml_file2json()
rustg_file_write(test_toml, "test.toml")
var/toml_output = rustg_read_toml_file("test.toml")
if (toml_output != test_json) //only works if the output of the function is text
CRASH("test:\n[test_toml]\n \nexpected:\n[test_json]\n \nrustg:\n[toml_output]")
Previously it was:
/test/proc/check_toml_file2json()
rustg_file_write(test_toml, "test.toml")
var/toml_output = json_encode(rustg_read_toml_file("test.toml")) // turn a list into text
var/test_output = json_encode(json_decode(test_json)) // convert text into a list and back again
// ~= checks for structural equality
if (toml_output != test_output)
CRASH("test:\n[test_toml]\n \nexpected:\n[test_output]\n \nrustg:\n[toml_output]")
from rust-g.
way to go @tralezab
from rust-g.
Worked on the test data
from rust-g.
I wrote about this a bit in tgstation/tgstation#68690 but I think that what ZeWaka once termed a "dumb tramstation random error" (via #107 (comment), example found here: https://github.com/tgstation/tgstation/runs/7527162114?check_suite_focus=true) may also be related to this bug, since the runtimes seem to be specifically happening on just the Modular Map Loaders.
[19:01:34] Runtime in modular_map_loader.dm,34: bad index
proc name: load map (/obj/modular_map_root/proc/load_map)
src: the tramstation (/obj/modular_map_root/tramstation)
src.loc: the floor (108,137,3) (/turf/open/floor/iron/smooth)
call stack:
the tramstation (/obj/modular_map_root/tramstation): load map()
world: ImmediateInvokeAsync(the tramstation (/obj/modular_map_root/tramstation), /obj/modular_map_root/proc/loa... (/obj/modular_map_root/proc/load_map))
the tramstation (/obj/modular_map_root/tramstation): Initialize(1)
Atoms (/datum/controller/subsystem/atoms): InitAtom(the tramstation (/obj/modular_map_root/tramstation), 0, /list (/list))
the tramstation (/obj/modular_map_root/tramstation): New(1)
/datum/parsed_map (/datum/parsed_map): create atom(/obj/modular_map_root/tramstat... (/obj/modular_map_root/tramstation), the floor (108,137,3) (/turf/open/floor/iron/smooth))
/datum/parsed_map (/datum/parsed_map): instance atom(/obj/modular_map_root/tramstat... (/obj/modular_map_root/tramstation), /list (/list), the floor (108,137,3) (/turf/open/floor/iron/smooth), 1, 0)
/datum/parsed_map (/datum/parsed_map): build coordinate(/list (/list), /list (/list), the floor (108,137,3) (/turf/open/floor/iron/smooth), 1, 0)
/datum/parsed_map (/datum/parsed_map): load impl(1, 1, 2, 0, 1, -1e+31, 1e+31, -1e+31, 1e+31, 0)
/datum/parsed_map (/datum/parsed_map): load(1, 1, 2, null, 1, null, null, null, null, null)
Mapping (/datum/controller/subsystem/mapping): LoadGroup(/list (/list), "Station", "map_files/tramstation", /list (/list), /list (/list), /list (/list), 0)
Mapping (/datum/controller/subsystem/mapping): loadWorld()
Mapping (/datum/controller/subsystem/mapping): Initialize(684916)
Master (/datum/controller/master): Initialize(10, 0, 1)
/tg/station configs these modular map loaders for Tramstation via this TOML file here: https://github.com/tgstation/tgstation/blob/master/strings/modular_maps/Tramstation.toml . I hope that the associated PR can also rectify that issue as well. It's a good thing we have CI for all maps there otherwise I'm like 95% certain it would have gotten to production and we would probably just get majorly large fuckups.
from rust-g.
Related Issues (20)
- 1.0.0 HOT 2
- flist() but better
- [Lunacy idea] Porting the TGS CI/CD pipeline to automate generation of releases + changelogs + milestones HOT 4
- can't write indexed image without palette HOT 1
- Panicing inside FFI is undefined behavior (and we have plenty of branches that panic)
- Separate debug info from .so file HOT 4
- HTTP request, specifying an output path to a folder that doesn't exist will throw an error
- Add Redis list operation support
- dmi_strip_metadata leads to removing alpha channel from the icon HOT 1
- unix_timestamp does not output with a precision of 6 when the timestamp is millisecond perfect
- Move this repository to spacestation13 org HOT 1
- rustg_file_exists() returns "false" instead of "" if the file is not found HOT 2
- hash module is now failing lint HOT 1
- Clippy unhappy with compiling 3.1.0 on Windows HOT 4
- Pull CI BYOND version from /tg/ repo HOT 3
- Why is the Rust Analyzer target set to i686-pc-windows gnu? HOT 3
- Clippy fails on windows build HOT 1
- CI should generate rust_g.dm on default features HOT 3
- Statically link vcredist HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-g.