Giter Club home page Giter Club logo

Comments (5)

SuperSayu avatar SuperSayu commented on May 24, 2024 2

@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.

SuperSayu avatar SuperSayu commented on May 24, 2024 1

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.

optimumtact avatar optimumtact commented on May 24, 2024

way to go @tralezab

from rust-g.

ZeWaka avatar ZeWaka commented on May 24, 2024

Worked on the test data

from rust-g.

san7890 avatar san7890 commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.