Closed yowl closed 3 weeks ago
I have a similar exception running Avalonia in NativeAOT-LLVM, but with HarfBuzzSharp
RuntimeError: null function or function signature mismatch
$S_P_CoreLib_System_Runtime_ThunkBlocks__GetNewThunksBlock | @ | dotnet.native.wasm:0x5d68d1
| $S_P_CoreLib_System_Runtime_ThunksHeap___ctor | @ | dotnet.native.wasm:0xd9869
| $S_P_CoreLib_System_Runtime_ThunksHeap__CreateThunksHeap | @ | dotnet.native.wasm:0x5bf890
| $S_P_CoreLib_System_Runtime_InteropServices_PInvokeMarshal__AllocateThunk | @ | dotnet.native.wasm:0xbb27b
| $S_P_CoreLib_System_Runtime_CompilerServices_ConditionalWeakTable_2_CreateValueCallback<System___Canon__System___Canon>__InvokeOpenStaticThunk | @ | dotnet.native.wasm:0x16c9ae
| $S_P_CoreLib_System_Runtime_CompilerServices_ConditionalWeakTable_2<System___Canon__System___Canon>__GetValueLocked | @ | dotnet.native.wasm:0x16f5f8
| $S_P_CoreLib_System_Runtime_CompilerServices_ConditionalWeakTable_2<System___Canon__System___Canon>__GetValue | @ | dotnet.native.wasm:0x4e9f02
| $S_P_CoreLib_System_Runtime_InteropServices_PInvokeMarshal__GetFunctionPointerForDelegate | @ | dotnet.native.wasm:0x59d17a
| $S_P_CoreLib_System_Runtime_InteropServices_Marshal__GetFunctionPointerForDelegate | @ | dotnet.native.wasm:0xa138c
| $S_P_CoreLib_System_Runtime_InteropServices_Marshal__GetFunctionPointerForDelegate_0<System___Canon> | @ | dotnet.native.wasm:0x4c3e9d
| $HarfBuzzSharp_HarfBuzzSharp_HarfBuzzApi__hb_face_create_for_tables | @ | dotnet.native.wasm:0x1e8179
| $HarfBuzzSharp_HarfBuzzSharp_Face___ctor_2 | @ | dotnet.native.wasm:0x49520c
| $Avalonia_Skia_Avalonia_Skia_GlyphTypefaceImpl___ctor | @ | dotnet.native.wasm:0x286869
| $Avalonia_Skia_Avalonia_Skia_FontManagerImpl__TryCreateGlyphTypeface | @ | dotnet.native.wasm:0x490633
| $Avalonia_Base_Avalonia_Media_Fonts_SystemFontCollection__TryGetGlyphTypeface | @ | dotnet.native.wasm:0x2804f4
| $Avalonia_Base_Avalonia_Media_FontManager__TryGetGlyphTypeface | @ | dotnet.native.wasm:0x54369e
| $Avalonia_Base_Avalonia_Media_Typeface__get_GlyphTypeface | @ | dotnet.native.wasm:0x115cbe
Removing text rendering make app render just fine without this error (at least, a simple rectangle and software render for now).
And to keep experiments with LLVM and SkiaSharp in one place, if I enable WebGL rendering it will throw a different exception:
RuntimeError: memory access out of bounds
at dotnet.native.wasm.GrMemoryPool::allocate(:51968/unsigned long) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.SkSL::Pool::AllocIRNode(:51968/unsigned long) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.SkSL::Context::Context(:51968/) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.SkSL::Compiler::Compiler(:51968/GrShaderCaps const*, SkSL::Compiler::Flags) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrGLContext::compiler(:51968/) const (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrSkSLtoGLSL(:51968/GrGLContext const&, SkSL::Program::Kind, SkSL::String const&, SkSL::Program::Settings const&, SkSL::String*, GrContextOptions::ShaderErrorHandler*) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrGLProgramBuilder::finalize(:51968/GrGLPrecompiledProgram const*) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrGLProgramBuilder::CreateProgram(:51968/GrGLGpu*, GrRenderTarget*, GrProgramDesc const&, GrProgramInfo const&, GrGLPrecompiledProgram const*) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrGLGpu::ProgramCache::findOrCreateProgram(:51968/GrRenderTarget*, GrProgramDesc const&, GrProgramInfo const&, GrGpu::Stats::ProgramCacheResult*) (http://localhost:51968/dotnet.native.wasm)
at dotnet.native.wasm.GrGLGpu::ProgramCache::findOrCreateProgram(:51968/GrRenderTarget*, GrProgramInfo const&) (http://localhost:51968/dotnet.native.wasm)
Not sure what triggers it yet, I want to focus on software rendering for now.
Description
Attempting to
surface.Canvas.DrawColor(SKColors.White);
and flush causes an exceptionCode
Expected Behavior
The canvas goes white
Actual Behavior
Exception occurs,
Basic Information
Detailed IDE/OS information (click to expand)
``` PASTE ANY DETAILED VERSION INFO HERE ```Screenshots
Reproduction Link
https://github.com/yowl/wskia/tree/flush
and build with
Then server using some webserver and open in Chrome canary