AssetManager async dependency failure propagation and reference counting
0 reputation · 28 Apr 2021, 15:21 UTC
AssetManager provides load, get and update APIs for asynchronous asset loading with automatic dependency graph resolution in libGDX core. Reference counting is manual via references; AssetManager.dispose() decrements counts but does not auto-unload assets when count reaches zero, requiring explicit unload calls.
Behavior around failed loads and manual reference management is not fully specified. When a dependency asset fails to load, dependent assets remain in a failed state and the API contract for retry, reset or rollback of the load graph is unclear. The threading model requires update() to be called on the rendering thread while actual loading runs on background threads supplied by the application, with differences across desktop, Android and GWT backends. Behavior is version sensitive across libGDX releases.
The goal is to clarify documented state transitions and reference management for async loads with dependencies under version assumptions.
What state does AssetManager report for a dependent asset when its dependency fails to load, and is that state resettable without re-queueing? Does AssetManager automatically adjust reference counts for dependents on dependency failure, or must unload be performed manually for each asset? Is retry behavior defined after a failed load, and does it require an explicit load call or finishLoading invocation?