Search Issue Tracker

Won't Fix

Votes

3

Found in

2018.3.0b1

Issue ID

1081068

Regression

No

Editor crashes with "The file 'MemoryStream' is corrupted!" when entering Play Mode through Rider with breakpoints in decompiler

Unity Test Runner

-

How to reproduce:
1. Open attached "pong-tdd1" project
2. Open project's solution in Rider
3. Search all (Ctrl + T), enter "TestLauncherFactory", open Symbols file and set breakpoint on line 16
4. Search all (Ctrl + T), enter "TestRunnerApi", open Symbols file and set breakpoint on line 16
5. Attach Rider to Unity process and enter Play Mode through Rider

Expected result: Editor does not crash
Actual result: Editor crashes

Reproduced with: 2018.3.0b3, 2019.1.0a2
Could not reproduce on earlier versions - was not able to decompile same two Symbols files in Rider

Error:
MissingMethodException: UnityEngine.GUIContent UnityEditor.EditorGUIUtility.TrTextContent(string,string,UnityEngine.Texture)

Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.TestTools.TestRunner.GUI.TestListGUI' threw an exception.
at UnityEditor.TestTools.TestRunner.GUI.EditModeTestListGUI..ctor () <0x3c06e950 + 0x00052> in <d310e06253d94f229d301da3b83d828d>:0

(Filename: Line: -1)

The file 'MemoryStream' is corrupted! Remove it and launch unity again!
[Position out of bounds!]

Notes: IMPORTANT! You have to have enabled "Enable external source debug" in Rider settings (Ctrl + Alt + S -> Build, Execution,Deployment -> Debugger).

  1. Resolution Note:

    No longer reproduces in 2019.2.9f1. The fix is likely in the editor side, rather than the test-framework. I would be difficult to locate and backport.

Comments (2)

  1. Ewanuk

    Oct 12, 2021 14:22

    Not resolved, still present in 2021.2.b13.3550.

    Using Rider 2021.2.1 Build#RD-212.5080.71

  2. zelmund

    Sep 18, 2020 21:29

    2019.4.10
    still present

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.