Skip to content

Troubleshooting

Problems that often occur while building a Player, and their causes.

1. Find by symptom

Symptom Cause Where it is explained
The animation does not move ss_runtime_play is not called. Setup alone does not make update advance it Playback Control §2
The animation does not advance past the start / a finite loop never ends The same animation is set up every frame Player API Conventions §8-2
Resuming from a pause jumps back to the start play is called instead of resume Playback Control §4-1
The end notification arrives every frame / never arrives The rising edge of is_finished is not detected Playback Control §7
The animation stops in an environment where one update advances less than one frame The frame number held as state is rounded and written back Playback Control §6-2
Every part vanishes for an instant at the loop boundary An out-of-range frame number is passed to ss_runtime_get_frame_data Playback Control §6-1
Events or sounds on frame 0 sometimes do not occur Event processing is gated on whether the frame is drawn Events §3-1
Parts with a texture change are not drawn external_textures() is not loaded Loading and Initialization §3
The image is upside down / flipped twice The coordinate system setting and a flip in the Player are both applied Player Design Approach §5
An effect or child animation lags / is frozen after being shown again The child's clock is advanced from draw_order Instance Parts §2
Independent-playback effects or children do not start when playback restarts Slots are not initialized on play Instance Parts §6
Child animations or effects do not fade out with the parent's fade The opacity of the instance part or effect part is not applied Instance Parts §5 / Effect Parts §3
Clipping does not work The writers are decided from the Mask DrawBatches alone Mask §3
Where masks overlap, the result changes with the drawing order The same bit is used for add and invert Mask §4-4
Masks of another animation on the same frame are wrong The clipping is not undone Mask §4-2
Tinting comes out doubly dark The parts color alpha is multiplied by the opacity again Parts Color §3
Overrides seem to have no effect Frames are cached by frame number Part Overrides §5-1
Destroying crashes The Context is destroyed while the render thread reads the SoA buffers Render Loop §4-1
An animation or part specified by name is not found You compute string hashes yourself, and the value differs from the Brain's §2

2. Name hashes do not match

Symptom: no error appears, but a different animation plays, or an instance part's reference is not found and nothing is drawn.

Cause: the hash (uint32) of an animation or part name is computed by implementing FNV-1a or similar yourself in the target language, and the result differs by even one bit from the Brain's ss_runtime_hash_string.

Fix: do not implement string hashing yourself; always call ss_runtime_hash_string(const char* s) to make hashes.

3-1. LNK2019 / LNK2001: unresolved external symbol

Symptom: when you use ssconverter.lib or ssruntime.lib in a Windows C++ project, linking reports LNK2019 / LNK2001.

Cause: the Windows API symbols the Rust standard library uses are not resolved when the final binary is linked.

Fix: add the following standard Windows libraries to your link settings.

  • Userenv.lib
  • Bcrypt.lib
  • Ntdll.lib
  • Ws2_32.lib

  • Visual Studio: add the four above under Project Properties → Linker → Input → Additional Dependencies

  • SCons: env.Append(LIBS=["Userenv", "Bcrypt", "Ntdll", "Ws2_32"])
  • CMake: target_link_libraries(<target> PRIVATE Userenv Bcrypt Ntdll Ws2_32)

3-2. LNK2005 / LNK1169: duplicate symbols (linking both ssruntime.lib and ssconverter.lib)

Symptom: linking both static libraries into the same binary (the Windows build of a Godot module or GDExtension, for example) makes link.exe fail with LNK2005 / LNK1169.

ssruntime.windows.editor.x86_64.lib(...) : error LNK2005: ___rust_alloc is already defined in ssconverter.windows.editor.x86_64.lib(...).
godot.windows.editor.x86_64.exe : fatal error LNK1169: one or more multiply defined symbols found.

Cause: each Rust static library contains the Rust runtime (the allocator and panic functions), so __rust_alloc / rust_begin_unwind / rust_eh_personality and others appear in both .lib files. The MSVC linker treats duplicates as errors; macOS is §4-1.

Fix: add /FORCE:MULTIPLE to the link options of the final binary.

# SCons example (Godot module / GDExtension)
if env["platform"] == "windows":
    env.Append(LINKFLAGS=["/FORCE:MULTIPLE", "/IGNORE:4006"])
  • /FORCE:MULTIPLE: demotes LNK2005 to a warning (LNK4006) and continues linking
  • /IGNORE:4006: suppresses that warning too (optional)

When you use /WX (LNK4088)

If godot-cpp or similar enables /WX (treat warnings as errors), the LNK4088 warning ("image being generated due to /FORCE option") that /FORCE:MULTIPLE always produces becomes LNK1218, and the build fails.

warning LNK4088: image being generated due to /FORCE option...
LINK : error LNK1218: warning treated as error.

LNK4088 is one of the warnings MSVC cannot suppress with /IGNORE, so /IGNORE:4088 has no effect. Instead, pass /WX:NO to the linker so that warnings are not treated as errors at link time only.

if env["platform"] == "windows":
    env.Append(LINKFLAGS=["/FORCE:MULTIPLE", "/IGNORE:4006", "/WX:NO"])

/WX:NO affects the linker only, so /WX for the compiler (CCFLAGS / CXXFLAGS) stays as it is. Warnings in your source code are still treated as errors.

Important

Once you add /WX:NO, every link warning passes through. Resolve all link errors (LNK2005 and so on) first, and add this option last.

Effect on behavior

The libraries are built with panic = "abort", so rust_begin_unwind / rust_eh_personality are never actually used, and both allocators call MSVCRT's malloc / free, so they behave the same. Whichever definition is used, the behavior does not change.

4-1. Duplicate symbols (linking both libssruntime.a and libssconverter.a)

Symptom: linking both static libraries into the same binary makes ld fail.

duplicate symbol '_rust_eh_personality' in:
    .../libssruntime.a[2](...)
    .../libssconverter.a[2](...)
ld: 1 duplicate symbols

Cause: the same as §3-2.

Fix: add -Wl,-dead_strip to the options of the final link, or link one of the two as a dynamic library. With -dead_strip, ld reports the duplicate as a warning and completes the link. As described in §3-2, there is no effect on behavior.


Back to contents