Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on loading sample KTX file #31

Closed
mcclure opened this issue Mar 10, 2023 · 7 comments
Closed

Crashes on loading sample KTX file #31

mcclure opened this issue Mar 10, 2023 · 7 comments

Comments

@mcclure
Copy link

mcclure commented Mar 10, 2023

3D rendering library "LOVR" includes a file ibl.ktx in its samples.

https://github.com/bjornbytes/lovr-docs/tree/v0.16.0/examples/Lighting/PBR_Materials

This was created from filament's "cmgen" app.

When ibl.ktx is opened in ImageViewer using FIle->Open, ImageViewer crashes (suddenly closes). There are no error messages.

Expected behavior

The file is probably legitimate. But if it is not valid ImageViewer should at least display an error message rather than crashing..

Desktop (please complete the following information):

  • OS: Windows 10.0.19045
  • Version: ImageViewer3_6_lite.zip from the Version 3.6 release on the Github page.
@mcclure
Copy link
Author

mcclure commented Mar 10, 2023

Tried it on another viewer and it failed due to an unusual color format (GL_R11F_G11F_B10F). Could have been the same problem here.

@kopaka1822
Copy link
Owner

Hello,
thank you for reporting the issue. I can confirm that the format is the problem. My current library does not have this format and crashed for this reason. I will try to take the official ktx loader to fix this (I already implemented this for the ktx2 format).

@Honya2000
Copy link

Unfortunately the viewer still crashes on those .ktx files.

@Honya2000
Copy link

Tried another format for .ktx file: RGBA16F. Still crashes.
So i guess the problem not in format but in cube-map. It cannot open cube-maps.

@kopaka1822
Copy link
Owner

Hi,
so I tried updating the ktx loader on a different branch and there are still a few formats that do not work correctly.
However, the ibl.ktx with the GL_R11F_G11F_B10F format works at least.
@Honya2000 Can you send me a link to those ktx files so that I can test them?
Once I get them working as well I would like to make a new release with the updated ktx loader

@Honya2000
Copy link

@kopaka1822
Copy link
Owner

Thanks for the additional files. They also seem to work now.
I have added a new Release (3.7) which should include the fixes.
If you encounter any other issues with the ktx files feel free to open the issue and send me a link to the files that do not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants