View Issue Details

IDProjectCategoryView StatusLast Update
0000016Kohi EngineBugspublic2026-10-24 03:08
Reportertravisvroman Assigned Totravisvroman  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versionv0.13.0 
Target Versionv0.13.0Fixed in Versionv0.13.0 
Summary0000016: [BUG] Don't know how to obtain the .kbi files
Description

Ported over from GitHub issues: https://github.com/travisvroman/kohi/issues/281

Bug: Segmentation fault on first run due to missing binary assets (.kbi, .k3d, .kaf, .spv)

Summary

A fresh clone of the repository segfaults immediately on launching testbed.kapp because all binary asset files (.kbi, .k3d, .kaf, .spv) are absent from the repo and there are no documented instructions for generating them. The README covers building the engine but says nothing about the required asset import step.


Steps to Reproduce

  1. git clone --recurse-submodules https://github.com/travisvroman/kohi
  2. make all-debug
  3. cd bin && ./testbed.kapp

Crash Output

[DEBUG]: Attempting to load asset 'Texture.DefaultWaterNormal' from package 'Kohi.Runtime'...
[TRACE]: Package 'Kohi.Runtime': Invalid path ('../kohi.runtime/assets/images/Texture.DefaultWaterNormal.kbi') for asset 'Texture.DefaultWaterNormal'.
[TRACE]: Failed to load binary asset. See logs for details.
[ERROR]: Cannot deserialize image without a nonzero size, block of memory and an asset to write to.
[ERROR]: Failed to deserialize image asset. See logs for details.
Segmentation fault (core dumped)

Root Cause

The engine expects pre-imported binary assets at paths like:

  • kohi.runtime/assets/images/Texture.DefaultWaterNormal.kbi
  • testbed.kapp/assets/images/*.kbi
  • testbed.kapp/assets/models/*.k3d
  • testbed.kapp/assets/music/*.kaf / assets/sounds/*.kaf
  • kohi.runtime/assets/shaders/*.spv

None of these files exist in the repository. Only source assets are present (.png, .jpg, .tga, .obj, .mp3, .ogg, .glsl). The .gitignore excludes all generated binary assets.

The asset importer (kohi.tools importmanifest) exists in source (tools_main.c) and must be run before first launch, but:

  1. It is not documented anywhere in the README or wiki.
  2. It is broken in the release build of kohi.tools due to a separate Makefile bug (stale .o files — see related issue), making it hard to discover even for users who dig into the source.
  3. There is also no manifest provided for the Kohi.Runtime package itself, only for testbed.kapp — so even running importmanifest on the testbed manifest does not generate the runtime assets (e.g. Texture.DefaultWaterNormal.kbi) that crash the engine on startup.

Environment

  • OS: Ubuntu 24.04.4 LTS (kernel 6.17.0-20-generic)
  • Compiler: clang / LLVM
  • GPU: Intel UHD Graphics 620 (integrated), Mesa 25.2.8
  • Vulkan API: 1.4.4

Suggested Fixes

Short term:

  • Add a # First-time setup section to the README explaining that assets must be imported before launching, with the exact commands:
    # From the project root after building:
    cd bin
    ./kohi.tools importmanifest ../testbed.kapp/asset_manifest.kson
  • Provide (or document) a manifest for the Kohi.Runtime package assets so that runtime-level assets like Texture.DefaultWaterNormal.kbi can also be generated.

Medium term:

  • Add a make import-assets target to the root Makefile that runs the importer automatically as part of first-time setup.
  • Consider whether the engine should fail gracefully (log a clear error + exit cleanly) rather than segfaulting when a required binary asset is missing, to improve the developer experience.

Long term:

  • Consider committing a pre-built set of binary assets, or providing a download script/release artifact, so that new contributors can get up and running without needing to debug the toolchain first.
Tagsbug
Revision

Activities

travisvroman

2026-10-20 12:04

administrator   ~0000003

Going forward you'll want to do 2 things on a fresh clone/checkout:

  • Run make setup and let it run through gathering dependencies and setting up required folder structures, and building required toolchain utils.
  • Run import_updated_assets.bat for Windows, or import_updated_assets.sh everywhere else. This will import all assets for all plugins/modules of Kohi.

Issue History

Date Modified Username Field Change
2026-10-19 18:30 travisvroman New Issue
2026-10-19 18:30 travisvroman Status new => assigned
2026-10-19 18:30 travisvroman Assigned To => travisvroman
2026-10-19 18:30 travisvroman Tag Attached: bug
2026-10-20 12:04 travisvroman Status assigned => resolved
2026-10-20 12:04 travisvroman Resolution open => fixed
2026-10-20 12:04 travisvroman Fixed in Version => v0.13.0
2026-10-20 12:04 travisvroman Note Added: 0000003
2026-10-24 03:08 travisvroman Status resolved => closed