向情节提要板添加RepeatBehavior和持续时间时出现Wasm异常

时间:2020-06-24 10:27:17

标签: uno-platform

我正在尝试使用VisualStates和Storyboard在WebAssembly中显示一个简单的闪烁动画。将持续时间和RepeatBehavior ='Forever'都添加到情节提要中时,出现以下异常:

    Error
    at 631680 (dotnet.js:1)
    at _emscripten_asm_const_iii (dotnet.js:1)
    at wasm_logger (:58006/<anonymous>:wasm-function[3132]:0x9dfb7)
    at eglib_log_adapter (:58006/<anonymous>:wasm-function[6071]:0x112d92)
    at monoeg_g_logstr (:58006/<anonymous>:wasm-function[4608]:0xcd55a)
    at monoeg_g_logv_nofree (:58006/<anonymous>:wasm-function[2196]:0x63d92)
    at monoeg_assertion_message (:58006/<anonymous>:wasm-function[429]:0xd35c)
    at mono_assertion_message_unreachable (:58006/<anonymous>:wasm-function[144]:0x347c)
    at interp_exec_method (:58006/<anonymous>:wasm-function[1380]:0x2fa40)
    at interp_runtime_invoke (:58006/<anonymous>:wasm-function[5695]:0xfb19a)

Uno.UI.js:97 Unhandled dispatcher exception: RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info. (RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
    at abort (http://localhost:58006/package_e0b2677001d484af549b92b1436e81abf6d3eb6b/dotnet.js:1:16059)
    at _abort (http://localhost:58006/package_e0b2677001d484af549b92b1436e81abf6d3eb6b/dotnet.js:1:117947)
    at wasm_logger (<anonymous>:wasm-function[3132]:0x9dfd9)
    at eglib_log_adapter (<anonymous>:wasm-function[6071]:0x112d92)
    at monoeg_g_logstr (<anonymous>:wasm-function[4608]:0xcd55a)
    at monoeg_g_logv_nofree (<anonymous>:wasm-function[2196]:0x63d92)
    at monoeg_assertion_message (<anonymous>:wasm-function[429]:0xd35c)
    at mono_assertion_message_unreachable (<anonymous>:wasm-function[144]:0x347c)
    at interp_exec_method (<anonymous>:wasm-function[1380]:0x2fa40)
    at interp_runtime_invoke (<anonymous>:wasm-function[5695]:0xfb19a))

Uno.UI.js:98 Uncaught RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
    at abort (http://localhost:58006/package_e0b2677001d484af549b92b1436e81abf6d3eb6b/dotnet.js:1:16059)
    at _abort (http://localhost:58006/package_e0b2677001d484af549b92b1436e81abf6d3eb6b/dotnet.js:1:117947)
    at wasm_logger (<anonymous>:wasm-function[3132]:0x9dfd9)
    at eglib_log_adapter (<anonymous>:wasm-function[6071]:0x112d92)
    at monoeg_g_logstr (<anonymous>:wasm-function[4608]:0xcd55a)
    at monoeg_g_logv_nofree (<anonymous>:wasm-function[2196]:0x63d92)
    at monoeg_assertion_message (<anonymous>:wasm-function[429]:0xd35c)
    at mono_assertion_message_unreachable (<anonymous>:wasm-function[144]:0x347c)
    at interp_exec_method (<anonymous>:wasm-function[1380]:0x2fa40)
    at interp_runtime_invoke (<anonymous>:wasm-function[5695]:0xfb19a)

Uno.UI.js:97 Unhandled dispatcher exception: RuntimeError: memory access out of bounds (RuntimeError: memory access out of bounds
    at malloc (<anonymous>:wasm-function[359]:0xa47e)
    at monoeg_malloc (<anonymous>:wasm-function[161]:0x3e0f)
    at mono_mempool_new_size (<anonymous>:wasm-function[629]:0x12bce)
    at generate (<anonymous>:wasm-function[5909]:0x107b81)
    at mono_interp_transform_method (<anonymous>:wasm-function[1290]:0x2b57b)
    at do_transform_method (<anonymous>:wasm-function[2959]:0x93ac4)
    at interp_exec_method (<anonymous>:wasm-function[1380]:0x2eda7)
    at interp_runtime_invoke (<anonymous>:wasm-function[5695]:0xfb19a)
    at mono_jit_runtime_invoke (<anonymous>:wasm-function[5149]:0xe196b)
    at do_runtime_invoke (<anonymous>:wasm-function[1411]:0x3ea94))

Uno.UI.js:98 Uncaught RuntimeError: memory access out of bounds
    at malloc (<anonymous>:wasm-function[359]:0xa47e)
    at monoeg_malloc (<anonymous>:wasm-function[161]:0x3e0f)
    at mono_mempool_new_size (<anonymous>:wasm-function[629]:0x12bce)
    at generate (<anonymous>:wasm-function[5909]:0x107b81)
    at mono_interp_transform_method (<anonymous>:wasm-function[1290]:0x2b57b)
    at do_transform_method (<anonymous>:wasm-function[2959]:0x93ac4)
    at interp_exec_method (<anonymous>:wasm-function[1380]:0x2eda7)
    at interp_runtime_invoke (<anonymous>:wasm-function[5695]:0xfb19a)
    at mono_jit_runtime_invoke (<anonymous>:wasm-function[5149]:0xe196b)
    at do_runtime_invoke (<anonymous>:wasm-function[1411]:0x3ea94)

dotnet.js:1 Thread 0x1 may have been prematurely finalized* Assertion at /__w/1/s/mono/mono/utils/mono-threads.c:702, condition `<disabled>' not met
Uno.UI.js:97 Unhandled dispatcher exception: [object Object] (undefined)

Uno.UI.js:98 Uncaught ExitStatus {name: "ExitStatus", message: "Program terminated with exit(0)", status: 0}

dotnet.js:1 * Assertion: should not be reached at /__w/1/s/mono/mono/utils/mono-threads-coop.h:48
dotnet.js:1 Uncaught ExitStatus {name: "ExitStatus", message: "Program terminated with exit(0)", status: 0}

dotnet.js:1 * Assertion at /__w/1/s/mono/mono/utils/mono-internal-hash.c:47, condition `<disabled>' not met
dotnet.js:1 Uncaught ExitStatus {name: "ExitStatus", message: "Program terminated with exit(0)", status: 0}

导致上述错误的xaml是:

<Grid Background="White" BorderBrush="Gray" BorderThickness="1" Width="250" Height="250">
    <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="LightStates">
            <VisualState x:Name="LightFlashing">
                <Storyboard Duration="0:0:2.0" RepeatBehavior="Forever">
                    <DoubleAnimation From="1" To="0" Storyboard.TargetName="AnimatedEllipse" Storyboard.TargetProperty="Opacity" />
                </Storyboard>
            </VisualState>
        </VisualStateGroup>
    </VisualStateManager.VisualStateGroups>

    <Ellipse x:Name="AnimatedEllipse" Height="126" Width="126">
        <Ellipse.Fill>
            <SolidColorBrush x:Name="AnimatedEllipseBrush" Color="Red" />
        </Ellipse.Fill>
    </Ellipse>
</Grid>

从情节提要中删除持续时间并将其添加到DoubleAnimation可以正常工作,没有错误。 Uno.Wasm.Bootstrap版本是1.3.0-dev.44

1 个答案:

答案 0 :(得分:0)

这是Uno Platform中的错误,我为此on GitHub创建了一个问题。可能在所有目标上都出现了相同的问题,如您所提到的,解决此问题之前的解决方法是将Duration属性保留在DoubleAnimation上。感谢您举报!