Error executing Rive animation

Hello there,
I’m trying Rive so I have just created a blank project to do some tests.
The Rive model i’m using is forked from here, it’s a community file I’m using just for test.
The version of the Rive extension I’m using is 2.2.0 and the Defold engine version I’m running is 1.8.1.
The project is mostly empty, what I do have is:

  • The main collection
  • The main collection has a game object
  • The game object has a rive model, and a script.

This is how the Rive model is configured.

Also, I am using the render script provided bu the Rive extension, as explained in the official doc.

The script only has an init function which starts the playback of the animation:

    function init(self)
    	local options = {
    		offset = 0.2, -- start 20% into the animation
    		playback_rate = 1.5, -- play the animation at 150% speed
    	rive.play_anim("#rivemodel", "Timeline 1", go.PLAYBACK_ONCE_PINGPONG, options, function(self, message_id, message, sender)

The code is pretty much copy-pasta from the guide.

I think it’s all correct, there should be no other steps from the guide, however when I try to run I get a fatal error:

    ERROR:CRASH:  0 0x7FF65B8BE560 dmCrash::GenerateCallstack D:\a\defold\defold\engine\crash\src\backtrace_win32.cpp:144
    ERROR:CRASH:  1 0x7FF65BCB6214 raise /tmp/job13365814682286171450/minkernel/crts/ucrt/src/appcrt/misc/signal.cpp:547
    ERROR:CRASH:  2 0x7FF65BCA601C abort /tmp/job13365814682286171450/minkernel/crts/ucrt/src/appcrt/startup/abort.cpp:71
    ERROR:CRASH:  3 0x7FF65BCA527C common_assert_to_stderr<wchar_t> /tmp/job13365814682286171450/minkernel/crts/ucrt/src/appcrt/startup/assert.cpp:186
    ERROR:CRASH:  4 0x7FF65BCA4D94 _wassert /tmp/job13365814682286171450/minkernel/crts/ucrt/src/appcrt/startup/assert.cpp:443
    ERROR:CRASH:  5 0x7FF65B6F21C0 dmRive::CompRiveGetComponent /tmp/job13365814682286171450/upload/defold-rive/src/comp_rive.cpp:190
    ERROR:CRASH:  6 0x7FF65B923650 dmGameObject::GetComponentUserDataFromLua D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject_script.cpp:512
    ERROR:CRASH:  7 0x7FF65B992540 dmScript::GetComponentFromLua D:\a\defold\defold\engine\gamesys\src\gamesys\gamesys_script.cpp:114
    ERROR:CRASH:  8 0x7FF65B716550 dmRive::RiveComp_PlayAnim /tmp/job13365814682286171450/upload/defold-rive/src/script_rive.cpp:57
    ERROR:CRASH:  9 0x7FF65B718ADE lj_BC_FUNCC <unknown>:0
    ERROR:CRASH: 10 0x7FF65B8B5A90 lua_pcall <unknown>:0
    ERROR:CRASH: 11 0x7FF65B8E7A60 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1401
    ERROR:CRASH: 12 0x7FF65B94B130 dmGameObject::RunScript D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:142
    ERROR:CRASH: 13 0x7FF65B9499D0 dmGameObject::CompScriptInit D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:183
    ERROR:CRASH: 14 0x7FF65B91C480 dmGameObject::InitComponents D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:1704
    ERROR:CRASH: 15 0x7FF65B918CE0 dmGameObject::InitCollection D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:1773
    ERROR:CRASH: 16 0x7FF65B9A4890 dmEngine::Init D:\a\defold\defold\engine\engine\src\engine.cpp:1348
    ERROR:CRASH: 17 0x7FF65B9A37D0 dmEngineCreate D:\a\defold\defold\engine\engine\src\engine.cpp:2160
    ERROR:CRASH: 18 0x7FF65B9A94F0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:68
    ERROR:CRASH: 19 0x7FF65B8ABCB0 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
    ERROR:CRASH: 20 0x7FF65BC5B244 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    ERROR:CRASH: 21 0x7FF8799C2560 BaseThreadInitThunk <unknown>:0
    ERROR:CRASH: 22 0x7FF87A34AA20 RtlUserThreadStart <unknown>:0
    ERROR:CRASH: Lua Callstack:
    ERROR:CRASH:   main/start_rive.script:7: in function <main/start_rive.script:1>

which I’m unable to decypher…

I have a crash dump file also, but it’s binary and I have no idea how to open it.

The Rive model is rendering good in the editor however:

Any idea??



Could you share the project? :thinking:

ah sure! it’s indeed easier with the code :smiley:



hey, did anyone have a chance to test this? I have tried also different versions of the extension, none seem to work, on both windows and mac os. The guide to include rive is incredibly easy, i don’t understand if i’m doing something wrong.

Consider that i get build error even if i build the project completely empty, with no rive scenes/models imported.

Are there dependencies i need to consider? like having a c++ compiler on the machine? a particular JVM version?

Am i the only one that is uncapable of getting this to run? :smiley:

Hi, there was a small issue with the extension due to recent updates in the vulkan renderer, but I’ve now gotten it to work again with some smaller changes in the extension:

NOTE: You need to use Defold 1.9.0+ together with the latest released version 2.3.1:

To get 1.9.0, you can use the beta version of Defold or the latest alpha version of Defold (or wait until it has become a stable release)