Skip to content

EnC: Mono throws when member accessibility is changed #108097

Open
@tmat

Description

@tmat

Description

Mono throws when member accessibility is changed during debugging

Reproduction Steps

Use Roslyn build from PR: dotnet/roslyn#75191 for repro.

  1. Create Blazor WASM app
  2. Replace @code block in Counter.razor with:
@code {
    private int currentCount = 0;

    public void IncrementCount()
    {
        currentCount++;
        var c = new C();
        //c.x = 1;
    }

    class C
    {
        //public
        int x;
    }
}
  1. Place breakpoint to IncrementCount and F5.
  2. Click "Increment" button and uncomment commented code after hitting the breakpoint.
  3. Step

Expected behavior

Assignment to x is successfully executed.

Actual behavior

One of the following:
1)
The Blazor app crashes and disconnects:

19:29 41.06 BlazorApp26 (Web assembly): [Error] Applying updates to the application failed. The request sent to the browser failed: Web socket connection to the browser has been closed:  The request sent to the browser failed: Web socket connection to the browser has been closed: 
19:29 41.06 An unexpected error has occurred, any pending updates have been discarded.
  1. VS crashes,
     
  2. VS debugger shows exception in JavaScript:
Error: [MONO] * Assertion at /__w/1/s/src/mono/mono/component/hot_reload.c:2236, condition `<disabled>' not met
    at ht (https://localhost:7139/_framework/dotnet.runtime.js:3:12765)
    at Ll (https://localhost:7139/_framework/dotnet.runtime.js:3:176248)
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[119]:0xa308
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[634]:0x3f446
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[550]:0x3bd96
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[554]:0x3beb7
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[556]:0x3befa
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[555]:0x3becd
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[1552]:0x83413
    at https://localhost:7139/_framework/dotnet.native.wasm:wasm-function[2424]:0xbae9e

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-EnC-monoHot Reload for WebAssembly, iOS/Android, etcin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions