Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. Hello Guest!
    Welcome to the Bug Report forum, please make sure you search for your problem before posting here. If you post a duplicate (that you post the same issue while other people have already done that before) you will be given a warning point which can eventually lead into account limitations !

    Here you can find a guide on how to post a good bug report thread.
    Space Engineers version --- Medieval Engineers version
  2. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

[1.184.401] Scripts every now and again stop working

Discussion in 'Bug Reports' started by Aliengfx, Oct 19, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Aliengfx Trainee Engineer

    Messages:
    4
    I use in game scripts to control automated mining craft, they aren't complicated and run fine for hours but now and again they fail with a script is too complex and it crashes the ship. I also use the TIM inventory manager which also runs fine for a few hours but then fails with the same error. It's running on a dedicated server. Anyway there can be some kind of soft fail for scripts so it only permanently disables them if they test too complex more than several times in a period to make them more robust?
     
  2. Sinbad Senior Engineer

    Messages:
    2,788
    its likely that the scripts you are running are on the edge of tripping the limit. then something happens that makes them run a section of code one time too many and it crosses the line.
    for example with tim, if it fills up a cargo container it needs to search for a new one. if you have 50 containers that are almost full and need to shore an extra container of stuff, the script may have to iterate through all of them and move a little bit of stuff into each one. for that run the script (that part of it) will be 50 times more complex than usual. that can trigger the limit.
    something similar may be happening with the miners, but I don't know enough about them to say so.
    there is also the chance that there is a global limit on PB complexity per game tick and you are seeing the error pop up when too many of your scripts trigger on the same game tick, so it errors on the one that sent it over the limit.
     
  3. Aliengfx Trainee Engineer

    Messages:
    4
    Sure, but TIM is running at 25% load on a single cycle and no one is doing anything in the base at the time. I think it's the combination of TIM and high load from drilling and stone ejection causing the scripts to stop. Would be great if we could have an option to increase the timeout in the game settings. I've seen streamers have an issue with having to recompile TIM repeatedly. If it is a global limit like you say that would explain the miner scripts crashing as they aren't at all complex, just some vector calculations that are identical each run so I'm going to disable TIM and see if the miner script still crashes.
     
    • Like Like x 1
  4. Georgik Apprentice Engineer

    Messages:
    215
    I've also run into problem where suddenly (all) most of my PBs threw complexity exception. I suspect it's not scripts' problem, there must be something more (some script were pretty simple to overflow the limit).

    I read somewhere digis control module is causing this, so I removed it from mods and now exception is almost never throwed (but still I think it occured few times after this).
    But since it is hardly reproducable, no easy fix is in view. We don't even know if it's caused by mod.
     
  5. Noy Apprentice Engineer

    Messages:
    112
    it's often scanning the grid and other surprisingly labor intensive actions, that cause that complexity exception; so try to minimize things like that, were you can.
     
Thread Status:
This last post in this thread was made more than 31 days old.