Files
darkfi/bin/app
jkds 6b9ef3aff2 app: fix potential bug on exit due to already dropped anim when draw() is called after window quit request. see below for more detailed info.
= Crash =

1. User quits -> god.stop_app() -> runtime stops
2. Arc<ManagedSeqAnim> drops -> delete_unmanaged_anim() -> animation removed from self.anims
3. miniquad event loop calls draw() one more time
4. draw_call() hits GfxDrawInstruction::Animation(anim_id) -> self.anims.get_mut(&anim_id).unwrap()
   PANIC! Animation was already deleted in step 2

= Cause =

- DrawCall holds Animation(AnimId) - just an ID, not a reference
- self.anims: HashMap<AnimId, GfxSeqAnim> stores actual animation data
- ManagedSeqAnim::drop() removes animation from self.anims
- DrawCalls may still reference deleted animations
- Race during shutdown: animations deleted before final draw()

= Fix =

Change Animation(AnimId) to Animation(ManagedSeqAnimPtr):
- Arc keeps ManagedSeqAnim alive as long as DrawCall exists
- Drop only fires when all DrawCalls are dropped
- Animation stays in self.anims until safe to delete
- Uses Rust ownership to prevent bug at compile time
2026-01-04 07:14:18 +01:00
..
2026-01-01 11:40:45 +00:00
2025-02-17 12:14:14 +00:00
2025-10-29 09:57:17 +01:00
2026-01-04 05:13:35 +01:00
2025-08-18 10:41:11 +02:00
2025-02-17 12:14:14 +00:00

Unix (Linux/Mac)

Install rustup and cargo install cargo-limit, then run:

make

Windows

Install rustup and follow the instructions.

If you get the error "VCRUNTIME140.dll was not found", then install Microsoft Visual C++ Redistributable.

Android

Make sure you have podman installed. Then run:

# You only need to build the container once
podman build -t apk .

make android

To debug any issues, you can enter an interactive terminal using make podman-cli.

To delete everything, run podman system reset.

Users who prefer to build locally can follow the commands in the Dockerfile. Note that the build.rs hardcodes the SDK/NDK paths so either you follow it exactly (recommended) or modify build.rs.

Useful Dev Commands

This is just for devs. Users ignore this.

Debugging Missing Symbols

"hb_ft_font_create_referenced"

nm libharfbuzz_rs-5d6b743170eb0207.rlib | grep hb_ | less

Resolve Dependency Issues

cargo tree --target aarch64-linux-android --invert openssl-sys

Examine the APK

apktool d target/android-artifacts/release/apk/darkwallet.apk -o dw-apk