Hi!
So, i’ve been updating my Kha stuff to the latest builds, and there’s been some changes under the hood … Kore is gone and has been replaced with Kinc totally now - and haxe has been updated to 4.2
This sounds great, but im having some issues with HaxeUI-kha - native windows versions keep crashing…
Among other things i have the weird error:
G
→ PNG chunk not known
It seems to be caused by some of HaxeUIs resource embedding… Maybe a 4.2 issue…?
Hmmm, interesting… ive mainly been checking the html5 version, ill have to make a point to also check window native builds… what version of haxeui are you using?
Just wanted you to know while this mostly works fine now - the error still happens from time to time - could it be that if a resource is not found , it crashes?
Its the exact same error - but i think this happens if a resource is not found / embedded. Perhaps add a check to see if the resource is valid or something?
Yeah, i guess a check couldnt hurt, but if they happen randomly then i would imagine the resource does exist (otherwise i would expect it to fail every time consistently, no?)
No, its not random - i belive it happens when you try to view a component that uses an images that should be embedded but for some reason isnt (like the png was missing) - So the getResource data is null probably?
OK, right, so yeah, maybe a check would make sense then - additionally, can you isolate what component is causing the issue - would also be nice to fix that too
Right, ok… It seems to happen at several places.
The image component will cause the crash - or the scrollbars - when they appear the app crashes.
Not sure -why- they arent found … but im pretty sure the crash happens because the embedded resources arent found / are null.
here is the stacktrace:
| |[Inline Frame] FoxEditor.exe!kinc_microsoft_affirm(HRESULT result) Line 38|C++|
|---|---|---|
| |FoxEditor.exe!kinc_g4_texture_init_from_image(kinc_g4_texture * texture, kinc_image * image) Line 94|C++|
| |FoxEditor.exe!kha::Image_obj::initFromEncodedBytes(Array<unsigned char> bytes, String format) Line 118|C++|
| |FoxEditor.exe!kha::Image_obj::fromEncodedBytes(hx::ObjectPtr<haxe::io::Bytes_obj> bytes, String format, Dynamic doneCallback, Dynamic __o_readable, hx::Null<bool>) Line 368|C++|
| |FoxEditor.exe!haxe::ui::backend::AssetsImpl_obj::imageFromBytes(hx::ObjectPtr<haxe::io::Bytes_obj> bytes, Dynamic callback) Line 189|C++|
| |FoxEditor.exe!haxe::ui::backend::AssetsImpl_obj::getImageFromHaxeResource(String resourceId, Dynamic callback) Line 161|C++|
| |FoxEditor.exe!`haxe::ui::ToolkitAssets_obj::getImage'::`23'::_hx_Closure_0::_hx_run(Dynamic imageInfo) Line 183|C++|
| |FoxEditor.exe!`haxe::ui::ToolkitAssets_obj::getImage'::`23'::_hx_Closure_0::__run(const Dynamic & inArg0) Line 196|C++|
| |FoxEditor.exe!haxe::ui::backend::AssetsImpl_obj::getImageInternal(String resourceId, Dynamic callback) Line 147|C++|
| |FoxEditor.exe!haxe::ui::ToolkitAssets_obj::getImage(String resourceId, Dynamic callback, hx::Null<bool> __o_useCache) Line 198|C++|
| |FoxEditor.exe!haxe::ui::util::ImageLoader_obj::load(Dynamic callback) Line 118|C++|
| |FoxEditor.exe!haxe::ui::components::_Image::ResourceBehaviour_obj::validateData() Line 186|C++|
| |FoxEditor.exe!haxe::ui::behaviours::DataBehaviour_obj::validate() Line 110|C++|
| |FoxEditor.exe!haxe::ui::behaviours::Behaviours_obj::validateData() Line 214|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::validateComponentData() Line 459|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::validateComponentInternal(hx::Null<bool> __o_nextFrame) Line 408|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::validateComponent(hx::Null<bool> __o_nextFrame) Line 293|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::syncComponentValidation(hx::Null<bool> __o_nextFrame) Line 346|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::syncComponentValidation(hx::Null<bool> __o_nextFrame) Line 358|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::syncComponentValidation(hx::Null<bool> __o_nextFrame) Line 358|C++|
| |FoxEditor.exe!haxe::ui::containers::ScrollViewBuilder_obj::checkScrolls() Line 365|C++|
| |FoxEditor.exe!haxe::ui::containers::ScrollView_obj::validateComponentInternal(hx::Null<bool> __o_nextFrame) Line 235|C++|
| |FoxEditor.exe!haxe::ui::core::ComponentValidation_obj::validateComponent(hx::Null<bool> __o_nextFrame) Line 293|C++|
| |[Inline Frame] FoxEditor.exe!haxe::ui::validation::IValidating_obj::validateComponent(Dynamic) Line 27|C++|
| |FoxEditor.exe!haxe::ui::validation::ValidationManager_obj::process() Line 190|C++|
| |FoxEditor.exe!haxe::ui::validation::__ValidationManager_objprocess(hx::Object * inObj) Line 212|C++|
| |FoxEditor.exe!hx::CMemberFunction0::__Run(const Array<Dynamic> & inArgs) Line 48|C++|
| |[Inline Frame] FoxEditor.exe!Dynamic::operator()() Line 304|C++|
| |FoxEditor.exe!`kha::Scheduler_obj::addTimeTaskToGroup'::`2'::_hx_Closure_0::_hx_run() Line 480|C++|
| |FoxEditor.exe!`kha::Scheduler_obj::addTimeTaskToGroup'::`2'::_hx_Closure_0::__Run(const Array<Dynamic> & inArgs) Line 482|C++|
| |[Inline Frame] FoxEditor.exe!Dynamic::operator()() Line 304|C++|
| |FoxEditor.exe!kha::Scheduler_obj::executeTimeTasks(double until) Line 365|C++|
| |FoxEditor.exe!kha::Scheduler_obj::executeFrame() Line 282|C++|
| |FoxEditor.exe!kha::SystemImpl_obj::frame() Line 531|C++|
| |FoxEditor.exe!`anonymous namespace'::update() Line 154|C++|
| |[Inline Frame] FoxEditor.exe!kinc_internal_update_callback(...) Line 86|C++|
| |[Inline Frame] FoxEditor.exe!kinc_internal_frame(...) Line 189|C++|
| |[Inline Frame] FoxEditor.exe!kinc_start(...) Line 204|C++|
Is this running using a minimal test app? Any chance i could grab it? Just to make sure were doing the same thing… ive played (previously) with lists, tables and all was fine (for the previous issue)… so something is… … strange.
It seems a full rebuild of my project solved the missing assets issue. But the situation is still the same - say - if a png is missing from the resource folder it wont get embedded and when haxeui tries to show the image the app will crash. Solution would be to just dont try to add the image if it is null i guess?