Closed robnugent closed 1 year ago
I believe the is likely the same issue that I reported in issue #690 and that the fix to that issue just changed the symptoms.
This is using the 4.2.0 release.
Warning - the test case can hard-lock your PC to the point where the mouse wont move
Thank you for the report and sorry for the issue.
This is using the 4.2.0 release.
Please try 4.3.0-alpha1. Quite a bit of work has been done on robustness in libktx as part of implementing the new tools.
@MarkCallow - thanks for the quick response.
Is there somewhere I can download builds of 4.3.0-alpha1 please? I could only locate 4.2.0 builds on the releases page...
If I need to build these myself, it might take me a while to get to this, as I was pretty incompetent at the build process when I tried this previously...
Thanks, Rob
@MarkCallow Apologies - please ignore the above - I just realized that the 'ASSETS' tab on the 4.3.0-alpha1 build can be expanded and has the binaries.
@MarkCallow OK - I just tried 4.3.0-alpha1 and the same problem exists both on Windows/arm64 and Windows/x64
Tail of my output on Windows/arm64:
...
9536 : Worker-05 iteration: 548, size: 1760x1760, compressed data size is 774400
9537 : Worker-03 iteration: 598, size: 1743x1743, compressed data size is 760384
9538 : Worker-02 iteration: 598, size: 1886x1886, compressed data size is 891136
9539 : Worker-09 iteration: 604, size: 1032x1032, compressed data size is 266256
9540 : Worker-09 iteration: 605, size: 1339x1339, compressed data size is 451584
9541 : Worker-05 iteration: 549, size: 1134x1134, compressed data size is 322624
B:\svn\abraded\rob\code\trunk\src\modules\nbproject\build-impl.xml:1340: The following error occurred while executing this line:
B:\svn\abraded\rob\code\trunk\src\modules\nbproject\build-impl.xml:1024: Java returned: -1073741819
BUILD FAILED (total time: 1 minute 42 seconds)
Thank you for the quick reply. We'll look into it.
@wasimabbas-arm, in the case of success, ktxTexture2_CompressAstcEx does not appear to be freeing input_image
, allocated between lines 667 and 676. It is only freed in case of failure. Please take a look.
@robnugent perhaps you can try freeing that, when you have time to set up a build yourself, and see if it fixes the problem.
@MarkCallow - I just managed to build the code much more easily than I did last time.
Yes - this looks to be the problem. FYI: - I just added a line of code thus:
if (work.error != ASTCENC_SUCCESS) {
std::cout << "ASTC compressor failed\n" <<
astcenc_get_error_string(work.error) << std::endl;
imageFree(input_image);
astcenc_context_free(astc_context);
return KTX_INVALID_OPERATION;
}
>>> imageFree(input_image)
My test has been running for about 20mins now, without any obvious signs of leaking memory.
@MarkCallow potential fix https://github.com/KhronosGroup/KTX-Software/pull/721
v4.2.1 and v4.3.0-alpha2 have been released with the fix to free input image
. I'm pretty sure this is the problem so I'm closing this. If the problem still occurs please reopen this, if you can, or open a new bug.
@MarkCallow - I just tried 4.2.1 and can confirm that this issue is indeed fixed.
Thanks again for the fast response on this.
Rob
Take the following test program and run it on Windows/arm64 or Windows/x64. Within a small number of minutes the JVM will crash. The HotSpot dump file shows e.g. the following as the stack trace:
I'll try to append the whole dump file
Sometimes, there is a message to stderr saying something like 'malloc failed'.
Note the following:
1) Windows Task Manager show 'committed' memory spiralling during this test until the point of failure 2) It fails even if you adjust the test to just use one thread - it just takes longer.