Known Issue TextMeshPro exception when undocking [7692]

Discussion in 'Known Issues' started by Andre Merrick, Dec 9, 2020.

  1. Andre Merrick

    Andre Merrick Commander

    Joined:
    Oct 11, 2016
    Messages:
    161
    Likes Received:
    207
    I have one ship that when docking to a base.. or CV.. a COQ pops up with the below being sent to the logs. Only this one vessel does it and ONLY in the Experimental Version. In the public version it doesn't do it. I can click continue.. about a dozen times.. when attempting to take off.. and it does eventually take off. When I dock.. I only get one COQ pop-up.

    Its a modified version of the Razorcrest SV from the Workshop.

    IndexOutOfRangeException: Index was outside the bounds of the array.
    at TMPro.TMP_Text.FillSpriteVertexBuffers (System.Int32 i, System.Int32 index_X4) [0x00017] in <6597850da5614ffc926cf6e13e4d2012>:0
    at TMPro.TextMeshPro.GenerateTextMesh () [0x056f3] in <6597850da5614ffc926cf6e13e4d2012>:0
    at TMPro.TextMeshPro_OnPreRenderObject () [0x00129] in <6597850da5614ffc926cf6e13e4d2012>:0
    at TMPro.TextMeshPro.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00035] in <6597850da5614ffc926cf6e13e4d2012>:0
    at TMPro.TMP_UpdateManager.DoRebuilds () [0x00083] in <6597850da5614ffc926cf6e13e4d2012>:0
    at (wrapper delegate-invoke) <Module>.invoke_void()
    at UnityEngine.Canvas.SendWillRenderCanvases () [0x0000a] in <7e3933e843524feeb0cb9cc1883e7bf9>:0

    (Filename: <6597850da5614ffc926cf6e13e4d2012> Line: 0)
     

    Attached Files:

    #1
  2. Pantera

    Pantera Administrator
    Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    7,456
    Likes Received:
    7,832
    Please update your client to B3191 you're currently on "-LOG- Build: 3187"
     
    #2
    Germanicus likes this.
  3. Andre Merrick

    Andre Merrick Commander

    Joined:
    Oct 11, 2016
    Messages:
    161
    Likes Received:
    207
    I haven't played today ... work and all.. :/ I'll check it tonight on the latest version and let you know if I still see it.
     
    #3
    Germanicus likes this.
  4. Pantera

    Pantera Administrator
    Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    7,456
    Likes Received:
    7,832
    Ok if it still triggers can you attach a copy of the save game so we can trigger it ?
    Thanks.
     
    #4
    Germanicus likes this.
  5. Andre Merrick

    Andre Merrick Commander

    Joined:
    Oct 11, 2016
    Messages:
    161
    Likes Received:
    207
    Still gives the error - I've attached the logs.. and the ship.

    It does in Creative or a Single Player.. I'll start a new Creative as well.

    Edit:

    New Creative 2 - "Game" started ... still gives the error.
     

    Attached Files:

    #5
  6. Pantera

    Pantera Administrator
    Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    7,456
    Likes Received:
    7,832
    Thanks this is strange though & it will go away when you turn the LCD screens off or if you remove all of the text & symbols that are on these 2 screens at the front either side of the cockpit
    7692 - TextMPro CoQ_2020-12-09_22-49-22.png


    I cannot give a ETA on a fix for this just yet I'm afraid.
     
    #6
    Andre Merrick and Germanicus like this.
  7. Andre Merrick

    Andre Merrick Commander

    Joined:
    Oct 11, 2016
    Messages:
    161
    Likes Received:
    207
    I'll just remove them. Thank you for figuring it out for me!!
     
    #7
    Pantera likes this.
  8. egoncharovsky

    egoncharovsky Ensign

    Joined:
    Dec 17, 2020
    Messages:
    1
    Likes Received:
    0
    Please, fix this issue. I was constructing my ship for a four days. It is my first. After the last update I just cannot unconnect from base - the same error occurs.
    I would like to ignore message (for me it's not critical that smth happens with rendering), but it still appear and fully blocks my gameplay. So sad!

    BuildNumber:
    3197

    IndexOutOfRangeException: Index was outside the bounds of the array.
    at TMPro.TMP_Text.FillSpriteVertexBuffers (System.Int32 i, System.Int32 index_X4) [0x00017] in <5e2ec1be9db949b09ceca4d4c50cf8c7>:0
    at TMPro.TextMeshPro.GenerateTextMesh () [0x056f3] in <5e2ec1be9db949b09ceca4d4c50cf8c7>:0
    at TMPro.TextMeshPro_OnPreRenderObject () [0x00129] in <5e2ec1be9db949b09ceca4d4c50cf8c7>:0
    at TMPro.TextMeshPro.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00035] in <5e2ec1be9db949b09ceca4d4c50cf8c7>:0
    at TMPro.TMP_UpdateManager.DoRebuilds () [0x00083] in <5e2ec1be9db949b09ceca4d4c50cf8c7>:0
    at (wrapper delegate-invoke) <Module>.invoke_void()
    at UnityEngine.Canvas.SendWillRenderCanvases () [0x0000a] in <7e3933e843524feeb0cb9cc1883e7bf9>:0
     
    #8
  9. BDAKiwi

    BDAKiwi Ensign

    Joined:
    Dec 24, 2020
    Messages:
    13
    Likes Received:
    13
    Twice now with two spawns, both with a lot of hours in them, I have received the following error:

    An Internal Error Occurred!
    Please insert a short description in the prepared email! Thank you.

    With both crashes, this error showed up in the logs:
    IndexOutOfRangeException: Index was outside the bounds of the array.

    In both cases I have sent emails with a description and the requested log files.

    I can continue but in the first case it broke gameplay. It zeroed the diplomacy meters and set all races to 'Unknown', I can't start or resume missions and visiting other factions doesn't change the 'Unknown' status.

    This time I can't take off in my primary SV. As soon as I hit the liftoff button the error occurs.

    In both games I had built and upgraded nmk111's most excellent Police Interceptor, and in the current game it is this vehicle that causes the problem. I can take off in all my other vehicles but as soon as I try in the Interceptor the error occurs so I suspect there's a link to workshop items. I upgraded the SV to T4 as soon as it spawned and destroyed a Kirax base with it, and have used it for many tasks before this happened. It is currently inside jrandall's excellent starter CV the Wayfarer-ST.

    Restoring to earlier backups does not resolve the issue.

    This time it doesn't look like it has caused any other issues so I'll disassemble the SV and build a different one, and see if the problem goes away.
     
    #9
  10. BDAKiwi

    BDAKiwi Ensign

    Joined:
    Dec 24, 2020
    Messages:
    13
    Likes Received:
    13
    Aaaaaaand... disassembling the Police Interceptor fixed the problem. I have since had a response from the devs saying this:
    'As a temporary workaround until this can be fixed please turn off all LCD screens or projectors when trying to undock.'
    Right, the PI has a LOT of projectors and screens, looks like the game can't quite handle it even though you can build all those bits.
     
    #10
  11. Pantera

    Pantera Administrator
    Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    7,456
    Likes Received:
    7,832
    Update:
    We cannot fix the problem directly as the exception occurs inside of a Unity package we will be making unity aware of this & post again when a fix for this has been done.

    Here is some info on how you can stop this exception from triggering.

    TextMeshPro "IndexOutOfRangeException" workarounds:
    1)
    Editing text/sprites with problematic LCD or Projectors:
    If you have a vessel that has LCD screens or Projectors that contain text with special characters like these 2 examples:
    EX1.jpg

    & another LCD screen or Projector with a sprite

    EX3.jpg

    & each time you try to undock a CoQ triggers you will need to remove the text with special characters or the sprite from the LCD /Projector to avoid the CoQ/Exception that looks like this in client_.log that is generated for the session:

    Code:
    IndexOutOfRangeException: Index was outside the bounds of the array.
      at TMPro.TMP_Text.FillSpriteVertexBuffers (System.Int32 i, System.Int32 index_X4) [0x00017] in <6597850da5614ffc926cf6e13e4d2012>:0
      at TMPro.TextMeshPro.GenerateTextMesh () [0x056f3] in <6597850da5614ffc926cf6e13e4d2012>:0
      at TMPro.TextMeshPro.OnPreRenderObject () [0x00129] in <6597850da5614ffc926cf6e13e4d2012>:0
      at TMPro.TextMeshPro.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00035] in <6597850da5614ffc926cf6e13e4d2012>:0
      at TMPro.TMP_UpdateManager.DoRebuilds () [0x00083] in <6597850da5614ffc926cf6e13e4d2012>:0
      at (wrapper delegate-invoke) <Module>.invoke_void()
      at UnityEngine.Canvas.SendWillRenderCanvases () [0x0000a] in <7e3933e843524feeb0cb9cc1883e7bf9>:0
    
    Client log location:
    Right click on Empyrion in your steam library > Properties > Local files > Browse local files > Logs >
    Open the folder that is named by the build you are currently on for example "3212" & open the most recent client to see if the above exception has triggered.

    Additional notes:
    1. The exception only happens with a specific action (like undocking a vessel): think about which signs you added / edited lately and simplify or remove parts of the content until the error is gone
    2. A setting has been added to the "Empyrion.props" file to initially switch off all signs. To find this file to edit:
    "Empyrion.props" file location:
    Right click on Empyrion in your steam library > Properties > Local files > Browse local files > "Empyrion.props" should be in the root Empyrion folder & can be opened with a text editor such as notepad++
    Then players can enable the "DisableSignDisplayInitially" setting, load the game, fix it like in case 1, and disable the setting again. To do this change this:

    Code:
    # DisableSignDisplayInitially = true
    
    To this then save the file & start the client again:

    Code:
    DisableSignDisplayInitially = true
    
    When using the props file setting all signs are off after loading. For each sign you suspect being problematic:
    1. in Control Panel / Devices: switch the sign on (if it's already "ON" switch off and then on)
    2. open the "Edit Sign" window, if the content doesn't get visible on the sign itself edit something

    2)
    Automate the LCD's/Projectors that either contain the text with special characters or a sprite that causes the CoQ to trigger when un-docking a vessel by setting up a set & reset latch signal:
    Sensor setup example:
    1 Motion sensor setup to be the "Set" signal (only named as "SET" in the Tx Signal as an example)
    TextMPro test_2021-01-22_15-19-54.png

    1 Motion sensor setup to be the "Reset" latch (only named as "RESET" in the Tx Signal as an example)
    TextMPro test_2021-01-22_15-20-00.png

    These sensors are then placed right behind the cockpit with the idea that as soon as you walk through them to get to the cockpit the Projectors with sprites will automatically be turned off & will automatically turn back on once I get out of the cockpit & walk back through them to prevent the CoQ from triggering.

    Setup the signal from the "Set/Reset Latch" circuit which in this example is called "Sig001" to the On/Off option of the LCD's or projectors configure options with the "Follow" option inverted.
    In this example I'm only setting up the 3 projectors I setup with sprites in the attached blueprint all to the same circuit signal & the same configuration options "Sig001" "Follow - Inverted".
    All 3 projectors are setup exactly to the same circuit & configuration here is just 1 of them:

    TextMPro test_2021-01-22_15-20-11.png

    Video demonstrating this setup with a test vessel can be seen here:
    https://drive.google.com/file/d/1LE5jauEE2UTqalW0fL24fnOl-AwOFkWJ/view?usp=sharing

    Additional setup:
    You can setup a signal in the "Signals" column in the "Main" window of the control panel to manually toggle the LCD's or Projectors that either that contain text with special characters or just a sprite in combination with the motion sensors setup to the "Set/Reset latch" circuit:

    - Create a signal in the "Signals" Column of the "Main" window of the control panel & name it something like this for example "Projector sprites"
    NewGame_8_2021-01-22_17-49-41.png

    - Select the "Signal Logic" window of the Control panel Create a "2X OR" Circuit
    - Add the signal from the "Main" window "Signals" column to this "2X OR" circuit's input in this example it is called "Projector Toggle" then also add as the other input the signal from the "Set/Reset latch" circuit which in this example is called "Sig 001".
    - Then each of the Projectors needs to be setup to this new circuits signal. Select each LCD/Porjector that needs to be setup to this signal & in their Configure options select the circuits name like in this example "Sig003" & keep it set to "Follow" & Inverted by check the box to the far right with "I:" next to it
    NewGame_8_2021-01-22_18-08-36.png

    The attached SV blueprint called "TMP Workaround" has all of the above already setup as an example for anyone to check out & see the setup in game.
    Place it into your blueprints folder & extract it form the compressed file then the next time you start the game it should appear as "TMP Workaround" in your blueprint list.

    If a vessel you experience this exception is from the steam workshop please make the autor of the blueprint aware by linking them to this post so they can update the workshop blueprint with either of the methods above.
     

    Attached Files:

    #11
  12. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    649
    Likes Received:
    792
    Build: 3279
    Mode: MP & SinglePlayer & Creativ all in vanilla

    Reproducibility: yes
    Severity: high

    Type: CoQ

    Summary: CoQ on dock/undock with "special" LCD displayed content

    Description:
    CoQ on client/SP while docking/undocking CV on a CV
    disable all LCDs on Vega AI and it works

    Steps to Reproduce: Savegame: Dock/Undock CV Vega AI on Carrier CV

    Screenshots, Crash Logs, any other Relevant Information or Download links: Savegame & Log in ZIP
     

    Attached Files:

    #12
    Last edited: Apr 12, 2021

Share This Page