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

Backtrace Support #80

Open
namse opened this issue Aug 29, 2024 · 4 comments
Open

Backtrace Support #80

namse opened this issue Aug 29, 2024 · 4 comments

Comments

@namse
Copy link

namse commented Aug 29, 2024

Hello, even when an error occurs due to incorrect settings, I only receive the message "The encoder API is used in an incorrect way" without any backtrace. Of course, I have set RUST_BACKTRACE=1.

Is the backtrace disabled by default? If possible, could you enable it so that I can identify which configuration value is causing the issue?

@inflation
Copy link
Owner

inflation commented Aug 30, 2024

That message is coming from the internal libjxl library:

  /** The encoder API is used in an incorrect way.
   *  In this case, a debug build of libjxl should output a specific error
   * message. (if not, please open an issue about it)
   */
  JXL_ENC_ERR_API_USAGE = 0x81,

You could enable vendored feature to build libjxl in debug mode and libjxl should print any error message to stderr.

@namse
Copy link
Author

namse commented Aug 30, 2024

What I mean is that the Rust backtrace didn't work. If I could identify which line in this library caused the error, it would naturally be easier to diagnose the problem.

@inflation
Copy link
Owner

Then I'm not doing anything particular.

@inflation
Copy link
Owner

I could include a backtrace in the corresponding error types, but that would change the enum to a struct with a kind, which would be a major break. So I don't think it's worth it.

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

2 participants