1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To Recover: Subscribing To Workshop -> Temp Dump 0xc0000005 Access Violation

Discussion in 'Bug Reports' started by Dakota, May 21, 2019.

  1. Dakota

    Dakota Member

    Joined:
    May 13, 2018
    Messages:
    42
    Likes Received:
    18
    So many of these reports... If you subscribe to new Workshop items (in my case Scenarios) you risk scorching your Train SIm installation. I know what's happening now (after a couple of days systematic and detailed analysis).

    Short Story:
    1. Subscribe to Workshop scenario(s). The more you do at one time the higher your risk!
    2. Try to open TS. It may die during initialization, or more commonly shortly after you see the Main Menu, boom! Temp Dump with 0cC000005 popup.
    3. Subsequent attempts to open TS will result in a nearly immediate Temp Dump and popup.
    What's Happening?

    When you subscribe to a Workshop item, Steam puts it into its workshop folder that is shared between all installed games. This process always succeeds. Each time TS starts, it looks at its own list of installed Workshop items vs the stuff Steam has in its shared area. If there is something new, TS will "auto-install" it from the Steam area into its own workshop area. This process of "auto-install" happens in the background and in parallel with the startup of TS, and it is this process that is unreliable. Sometimes, and I can't see any pattern to it, the installation process results in TS' copy of the workshop data being plainly corrupted. For scenarios (for example) a file called ScenarioProperties.xml is read from the Steam area, and then it is altered by TS which substitutes "real" values for "placeholders" in the original from the workshop. This is what randomly fails. Once TS has corrupted a workshop item during installation, Train Simulator is 100% dead.

    I have seen no pattern to the corruption. Sometimes garbage data and/or characters will be embedded in strings (the ones that are substituted by TS during installation). I've even seen a case where an entire chunk of 15-20 lines of the original ScenarioProperties.xml are simply missing from the "installed" one in TS. Clearly TS' startup process of "installing" the XML file is unreliable. I have reproduced this many times over the last week or so and I clearly understand what is happening, I just don't know why! ANd this has been happening for ages, based on the reports I have seen here and elsewhere over the last year or so.

    How to Mitigate the Problem - Don't subscribe to more than one Workshop item at once. It's really hazardous to install an entire collection.

    How to Recover from a TS Workshop Corruption
    1. Let's say you installed a Workshop Scenario. Open the File Explorer and navigate to C:\Program Files (x86)\Steam\steamapps\common\RailWorks\Content\Routes
    2. In the File Explorer's Search box (upper right) type ScenarioProperties.xml. You will get a lot of these files, one for each workshop scenario.
    3. Now sort this list by Date Modified descending with most recent at the top. The one at the top will most likely be the corrupted one.
    4. Right-click on this entry in the list and choose Open File Location. You should see something like this: Snap6.jpg
    5. In the above example, in the location field at the top of the Explorer, click Scenarios. This will put you in the scenarios folder of the correct route. Again sort the list by Date Modified descending. Now you should see the (e.g.) 8bb168eb-68b9-4c97-90d5-6dd340e884e9 folder at the top (newest scenario folder). Delete it (delete the e.g. 8bb168eb-68b9-4c97-90d5-6dd340e884e9 folder). This deletes the corrupted scenario.
    6. Keep the File Explorer open as it is. Now start TS. It will see that it needs to install this Scenario from the workshop. If it still dies, then delete the next oldest scenario folder, etc. If you have to delete more than 2-3 to get TS to start, then you should unsubscribe from those scenarios in Steam so your odds for getting them all to successfully install in TS will improve :)
    7. Let it initialize, then let it sit at the main menu for at least 30 seconds (enough time for the background installation process to complete), then try to enter Drive > Workshop. If you see a brief "Installing Workshop Items" then you're good and this time it succeeded.
    8. If you get another TempDump, go back to that File Explorer you left open in step 6. and delete the scenario folder again. It will still be at the top of the date-sorted list.
    9. Repeat (delete, restart) until you can run TS. It may take a few tries. There is nothing you can do (AFAIK) to "make" it install the scenario successfully. Just keep trying. Eventually it will succeed.
    For routes instead search for RouteProperties.xml. If you delete an entire route folder, though, all of the scenarios for that route will also be auto-installed and your chances for success are lowered (at least one will probably get corrupted). In this case unsubscribe from all of the scenarios for that route, then unsubscribe from the route, and delete the Routes\xxx-xxx-xxxx folder to allow TS to start. then start with subscribing to the route, keep trying until you get a good Route install, then once for each scenario, repeat until successful.

    I know this is complicated ... I just did my best to explain it. It's probably easier to actually do after you've dome it a few times. Of course if you're careless you could scorch your whole TS installation so be careful.
     
    Last edited: Jul 23, 2019
    • Helpful Helpful x 2
  2. ARuscoe

    ARuscoe Well-Known Member

    Joined:
    Apr 9, 2018
    Messages:
    1,850
    Likes Received:
    1,061
    If it's the mixture between the TS startup routine (which does check the database so could be locking the files which are trying to be installed at the same time, creating the conflict) another thing you can do is having TS running and at the scenario selection screen for a non-connected route. This way the program won't be accessing the same files at the time. THEN go into the workshop and do your subscription and steam should still install the route or scenario in the background, giving you a pop up in the top right when it's complete

    File locks can cause all sorts of issues, so if you've shown it to be a problem with starting up TS whilst installing items, this would be my bet
     
    • Like Like x 1
  3. Dakota

    Dakota Member

    Joined:
    May 13, 2018
    Messages:
    42
    Likes Received:
    18
    I'm not subscribing then immediately running TS2018. I thought of the conflict between Steam's workshop (and it's cache of files for subscribed scenarios) and TS2018 starting up and finding a possibly partially downloaded workshop item. This can't happen, because the workshop cache items are single files, giant zipfiles. For example C:\Program Files (x86)\Steam\steamapps\workshop\content\24010\1213109480\scnr_48da92e6-11d4-4402-9561-64e180194e68 is a scenario on the workshop cache.

    I subscribed way before, like an hour. I then let it install into TS then tried. Boom. I deleted the installed scenario in TS and let TS again install it. Boom. Finally on the nth try it was OK. I had taken the scnr_xxx.zip in the workshop, copit it out then unzipped it into folders. That allowed me to see the differences between files (using a powerful "diff" tool Araxis Merge I could scan every file in the scenario even the .ap and .bin ones. The installation process only modifies ScenarioProperties.xml. The rest come out of the workshop cache scnr_...zip unmodified.

    I got to where I simply compared the original ScenarioProperties.xml from the workshop cache (which is always correct) and the installed one in TS Route. I can immediately see the corrupted ones versus the ones that are modified in accordance with the installation.

    Maybe there is a locking botch somewhere in there, but it is unrelated to the subscription process in the Workshop. That had all occurred well before my tests, and the contents of the stuff from the Workshop are always correct.
     
  4. Dakota

    Dakota Member

    Joined:
    May 13, 2018
    Messages:
    42
    Likes Received:
    18
    PS: I am on a 64 bit system and am running TS2019 / 64. I saw a post that advised that the 64 bit version is having problems. Maybe this is one of them. I will switch to editing in 32 bit mode.
     
  5. Nigel Kendal-Ward

    Nigel Kendal-Ward New Member

    Joined:
    Dec 1, 2018
    Messages:
    5
    Likes Received:
    1
     
  6. Nigel Kendal-Ward

    Nigel Kendal-Ward New Member

    Joined:
    Dec 1, 2018
    Messages:
    5
    Likes Received:
    1
    As far as I can recall,this as mentioned to Dovetail as far back as Train Sim 2015, and their attitude seems to be "if you download free stuff, it can't be any good. This does a disservice to many who write these scenarios.
    But for a game developer to deny ALL responsibility for writing and releasing such a buggy program in the first place beggars belief. First they screw about with Flight Simulator, rewrite it and when the going gets tough, Dovetail abandon it. I wonder if Train Simulator is going the same way, now that Train Sim World has been allowed to escape?
     
    • Like Like x 1
  7. Smokebox

    Smokebox Member

    Joined:
    Dec 10, 2016
    Messages:
    18
    Likes Received:
    25
    • Like Like x 2
  8. Smokebox

    Smokebox Member

    Joined:
    Dec 10, 2016
    Messages:
    18
    Likes Received:
    25
    By the way, I strongly recommend that everyone who gets Access Violation when trying to start TS2019, while it says it's "Updating Scenario Database", raise a ticket with DTG support (https://dovetailgames.kayako.com/Tickets/Submit) and mention this thread.
     
    • Like Like x 1
  9. Dakota

    Dakota Member

    Joined:
    May 13, 2018
    Messages:
    42
    Likes Received:
    18
    Smokebox, I couldn't agree more. There is a new one posted today here in the Bugs forum and you should see the (un) helpful replies.
     
  10. Dakota

    Dakota Member

    Joined:
    May 13, 2018
    Messages:
    42
    Likes Received:
    18
    The hits just keep on coming. This just has to be a cross-thread timing issue, no thread-lock on the data. In my opinion this is a show-stopper class bug. I realized that my title should indicate that recovery instructions are included in the OP so I changed the title.
     
    Last edited: Jul 23, 2019
  11. Alicatt

    Alicatt New Member

    Joined:
    Dec 9, 2016
    Messages:
    18
    Likes Received:
    10
    This helped me today when I got an access violation on start up of TS2019 64bit, deleted the scenario and route that I had just subscribed to. First I unsubscribed from the scenario and route then deleted the files/folders and restarted TS2019 and it worked, so cleared cache exited and then re subbed to the route and let it download again … and it works :)
     
  12. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    1,061
    Likes Received:
    444
    If I download a scenario that I like and I might run more than once I will clone the scenario and then unsubscribe the original scenario.
    Seems to work as I don't, touch wood, suffer from the Access Violation problem related to Workshop Scenarios.

    Peter
     
  13. Alicatt

    Alicatt New Member

    Joined:
    Dec 9, 2016
    Messages:
    18
    Likes Received:
    10
    Thanks for your info 749006, but it does not really help in that TS2019 would not open to allow that, it crashed with the access violation long before it got to the menu, and it crashed with both the 32bit and 64bit versions.
     
  14. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    1,061
    Likes Received:
    444
    Did you unsubscribe from any Workshop Scenarios/Routes - you can do that thru the Steam Client

    Peter
     
  15. Alicatt

    Alicatt New Member

    Joined:
    Dec 9, 2016
    Messages:
    18
    Likes Received:
    10
    Yes I did unsubscribe first, but that did not allow TS to run either, it was after that that I came here looking for a solution and led me to the above solution which did allow me to delete the offending workshop items which let TS run, I've since re subscribed to the items individually and re-downloaded them and TS runs just fine and I have been enjoying my run from Oban to Edinburgh Waverly :)
     
  16. Wikkus

    Wikkus New Member

    Joined:
    May 1, 2019
    Messages:
    1
    Likes Received:
    0
    This is pure gold! Thank you, OP! +severalmillion :D

    R.
     

Share This Page