SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

Error using double or float values with WebAssembly

Open mark-cb opened this issue 4 years ago • 4 comments

Seeing a bug with the latest preview and also see the same bug in Steve Sandersons Blaze Orbital sample when using double/float in entity classes. Works fine with decimals! Tried with EF Core and SQLite-net Simple repro here:

https://github.com/mark-cb/BlazorSQLiteWasm

Seems that the issue is not purely related to the preview version.

Decimals work fine.

Error: /__w/1/s/src/mono/mono/mini/aot-runtime-wasm.c:113 /__w/1/s/src/mono/mono/mini/aot-runtime-wasm.c:113 Uncaught ExitStatus

mark-cb avatar Mar 15 '22 09:03 mark-cb

I have modified the title of this issue to clarify that it is Wasm-specific. If that's not true, let me know.

ericsink avatar Mar 15 '22 15:03 ericsink

@bricelam Has this problem caught your eye anywhere yet? I'm having trouble thinking of an idea that doesn't sound dumb (like a compiler bug in emscripten).

I looked at the compiler flags for emscripten but I don't see anything obviously wrong.

My next step in the investigation would be to take the wasm file, write a little code in C to call some basic SQLite functions, compile the whole thing to wasm, and try running it under wasmtime. Just to verify that the sqlite.wasm file is legit.

ericsink avatar Apr 06 '22 15:04 ericsink

Sounds like an issue with interop in the .NET Wasm runtime. @mark-cb can you file an issue on dotnet/runtime so they can investigate?

bricelam avatar Apr 12 '22 19:04 bricelam

Issue reported with dotnet/runtime here: https://github.com/dotnet/runtime/issues/67970

mark-cb avatar Apr 13 '22 17:04 mark-cb

AFAICT, this was resolved by a change in dotnet/runtime.

ericsink avatar Sep 19 '22 20:09 ericsink