dotnet-webgl-sample icon indicating copy to clipboard operation
dotnet-webgl-sample copied to clipboard

Update to .NET 8

Open AshleighAdams opened this issue 1 year ago • 3 comments
trafficstars

  • [ ] Requires successful run in a browser with a AOT'd Release build

AshleighAdams avatar Feb 02 '24 23:02 AshleighAdams

Function trampolining broken again?

dotnet.native.js:8 WebGL: this extension has very low support on mobile devices; do not rely on it for rendering effects: WEBGL_polygon_mode
(anonymous) @ dotnet.native.js:8
initExtensions @ dotnet.native.js:8
registerContext @ dotnet.native.js:8
createContext @ dotnet.native.js:8
_eglCreateContext @ dotnet.native.js:8
$func13658 @ dotnet.native.wasm:0x2acbb7
$func13644 @ dotnet.native.wasm:0x2ab95d
$func12345 @ dotnet.native.wasm:0x258d79
$func13642 @ dotnet.native.wasm:0x2ab55d
$func19087 @ dotnet.native.wasm:0x3b8fba
$func20517 @ dotnet.native.wasm:0x40eb1e
$do_jit_call_indirect @ c7cbb3c6:0x56
$func20415 @ dotnet.native.wasm:0x40b48e
$func20407 @ dotnet.native.wasm:0x3fe883
$func20441 @ dotnet.native.wasm:0x40c32a
$func22842 @ dotnet.native.wasm:0x4c0a2e
$func22219 @ dotnet.native.wasm:0x495919
$func22218 @ dotnet.native.wasm:0x4958a3
$func21680 @ dotnet.native.wasm:0x470ed7
$func10159 @ dotnet.native.wasm:0x1d9c0c
$func10158 @ dotnet.native.wasm:0x1d9b8e
$func12936 @ dotnet.native.wasm:0x273496
$func10167 @ dotnet.native.wasm:0x1dabf5
$func10164 @ dotnet.native.wasm:0x1da510
$func10284 @ dotnet.native.wasm:0x1e0c13
$func10146 @ dotnet.native.wasm:0x1d8b9c
$func13357 @ dotnet.native.wasm:0x294b8c
$func19622 @ dotnet.native.wasm:0x3d49c0
$func20517 @ dotnet.native.wasm:0x40eb0b
$do_jit_call_indirect @ c7cbb3c6:0x56
$func20415 @ dotnet.native.wasm:0x40b48e
$func20407 @ dotnet.native.wasm:0x3fe883
$func20441 @ dotnet.native.wasm:0x40c32a
$func22842 @ dotnet.native.wasm:0x4c0a2e
$func22219 @ dotnet.native.wasm:0x495919
$func22225 @ dotnet.native.wasm:0x49625d
$func22249 @ dotnet.native.wasm:0x498a57
$mono_wasm_invoke_method_bound @ dotnet.native.wasm:0x4f1197
Module._mono_wasm_invoke_method_bound @ dotnet.native.js:8
kr @ invoke-cs.ts:273
l.javaScriptExports.call_entry_point @ managed-exports.ts:60
Nc @ run.ts:44
$c @ run.ts:17
run @ run.ts:395
(anonymous) @ main.js:158
logging.ts:119 Error: [MONO] /__w/1/s/src/mono/mono/mini/aot-runtime-wasm.c:150 <disabled>
    at ht (logging.ts:95:18)
    at Ul (logging.ts:119:27)
    at dotnet.native.wasm:0x4f4fb2
    at dotnet.native.wasm:0x430425
    at dotnet.native.wasm:0x42ce86
    at dotnet.native.wasm:0x42cf53
    at dotnet.native.wasm:0x42cf89
    at dotnet.native.wasm:0x3fe146
    at dotnet.native.wasm:0x40da08
    at dotnet.native.wasm:0x40dc98
Ul @ logging.ts:119
$func23542 @ dotnet.native.wasm:0x4f4fb2
$func20797 @ dotnet.native.wasm:0x430425
$func20720 @ dotnet.native.wasm:0x42ce86
$func20722 @ dotnet.native.wasm:0x42cf53
$func20723 @ dotnet.native.wasm:0x42cf89
$func20407 @ dotnet.native.wasm:0x3fe146
$func20475 @ dotnet.native.wasm:0x40da08
$func20482 @ dotnet.native.wasm:0x40dc98
$func18004 @ dotnet.native.wasm:0x383429
$func533 @ dotnet.native.wasm:0x1ffd4
$func13621 @ dotnet.native.wasm:0x2a8f88
$func13637 @ dotnet.native.wasm:0x2ab449
$func13662 @ dotnet.native.wasm:0x2acdf7
tick @ dotnet.native.js:8
dotnet.native.js:8 Uncaught ExitStatus

AshleighAdams avatar Feb 02 '24 23:02 AshleighAdams

After some investigation, it dies after calling glClearColor() again, trampoline function generation must be broken again?

Old issue from when it broke in .NET 7: https://github.com/dotnet/runtime/issues/76930

AshleighAdams avatar Feb 02 '24 23:02 AshleighAdams

Reported issue at https://github.com/dotnet/runtime/issues/97906

AshleighAdams avatar Feb 03 '24 00:02 AshleighAdams

Reported issue at dotnet/runtime#97906

It appears to be working again in .NET 9 preview 3. I was testing .NET 8 referencing this project: https://github.com/RedMike/SdlWasmSample and ran into the same issue you're facing. Upgraded your project to NET9, changed the await dotnet.run() to the imported runMain() and it works.

I still hope for this to be fixed in NET 8.

Battlerax avatar May 03 '24 23:05 Battlerax

Reported issue at dotnet/runtime#97906

It appears to be working again in .NET 9 preview 3. I was testing .NET 8 referencing this project: https://github.com/RedMike/SdlWasmSample and ran into the same issue you're facing. Upgraded your project to NET9, changed the await dotnet.run() to the imported runMain() and it works.

I still hope for this to be fixed in NET 8.

I can confirm that this works. Thank you for the info.

https://github.com/IHaveAStrongPassword/dotnet-webgl-sample/tree/net9

IHaveAStrongPassword avatar Jul 19 '24 20:07 IHaveAStrongPassword

Thanks guys, retargeted to .NET 9, will close this PR as it's broken and merge in the .NET 9 one

AshleighAdams avatar Jul 26 '24 00:07 AshleighAdams