Editor Cooking Crash

Discussion in 'PC Editor Discussion' started by classthrash#2930, Apr 26, 2024.

  1. classthrash#2930

    classthrash#2930 Active Member

    Joined:
    Jan 13, 2024
    Messages:
    101
    Likes Received:
    26
    When cooking , i keep getting these errors every so often, the only i found to clear them is re-install the PC editor, has anyone come across this ?

    upload_2024-4-26_19-31-5.png

    Regards,
    M
     
  2. MJCKP

    MJCKP Well-Known Member

    Joined:
    Jul 14, 2023
    Messages:
    338
    Likes Received:
    438
    I have this problem regularly. Open TrainSimWorld4MOD\TS2Prototype\Saved\Config\Windows\EditorPerProjectUserSettings.ini, find the lines:

    Bookmarks=((00000000000000000000000000000000, ()))
    GraphEditorQuickJumps=((0, ()))

    Delete them, save the file and try cooking again, it should work then.



    If you want to automate it you can also paste the following into a .vbs file:
    Code:
    Option Explicit
    
    Const ForAppending = 8
    Const TristateFalse = 0 ' the value for ASCII
    Const Overwrite = True
    
    Const WindowsFolder = 0
    Const SystemFolder = 1
    Const TemporaryFolder = 2
    
    Dim FileSystem
    Dim Filename, OldText1, OldText2, NewText
    Dim OriginalFile, TempFile, Line
    Dim TempFilename
    
    ' Set the filename and text strings
    Filename = "C:\UE-EditorTSW4\TrainSimWorld4MOD\TS2Prototype\Saved\Config\Windows\EditorPerProjectUserSettings.ini"
    OldText1 = "Bookmarks=((00000000000000000000000000000000, ()))"
    OldText2 = "GraphEditorQuickJumps=((0, ()))"
    NewText = ""
    
    Set FileSystem = CreateObject("Scripting.FileSystemObject")
    Dim tempFolder: tempFolder = FileSystem.GetSpecialFolder(TemporaryFolder)
    TempFilename = FileSystem.GetTempName
    
    If FileSystem.FileExists(TempFilename) Then
        FileSystem.DeleteFile TempFilename
    End If
    
    Set TempFile = FileSystem.CreateTextFile(TempFilename, Overwrite, TristateFalse)
    Set OriginalFile = FileSystem.OpenTextFile(Filename)
    
    Do Until OriginalFile.AtEndOfStream
        Line = OriginalFile.ReadLine
    
        If InStr(Line, OldText1) > 0 Then
            Line = Replace(Line, OldText1, NewText)
        End If
    
        If InStr(Line, OldText2) > 0 Then
            Line = Replace(Line, OldText2, NewText)
        End If
    
        TempFile.WriteLine(Line)
    Loop
    
    OriginalFile.Close
    TempFile.Close
    
    FileSystem.DeleteFile Filename
    FileSystem.MoveFile TempFilename, Filename
    
    WScript.Quit
    

    Change the part
    Code:
    Filename = "C:\UE-EditorTSW4\TrainSimWorld4MOD\TS2Prototype\Saved\Config\Windows\EditorPerProjectUserSettings.ini"
    to point to wherever your editor is.

    Then just get into habit of running the file every time before you cook something.
     
    Last edited: Apr 27, 2024

Share This Page