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

【HELP】JNA is not stable【WANTED】 #1

Closed
umjammer opened this issue Oct 7, 2022 · 1 comment
Closed

【HELP】JNA is not stable【WANTED】 #1

umjammer opened this issue Oct 7, 2022 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@umjammer
Copy link
Owner

umjammer commented Oct 7, 2022

JNI version

test:org.jpeg.jpegxl.wrapper.DecoderTest#test2 works well always.

JNA version

test:vavi.image.jpegxl.Test2#main succeeds sometimes and fails sometimes, not 100%

WHY?

i tried

  • JxlDecoderCreate: PointerByReference -> Pointer . . . . . . nothing has been changed
  • void*: char[] -> BufferedReader#allocateDirect -> Pointer . . . . . . nothing has been changed
  • size_t*: long[] -> LongReference -> NativeLong . . . . . . nothing has been changed
  • threading: none -> JxlResizableParallelRunner -> JxlThreadParallelRunner . . . . . . nothing has been changed

log

when succeeded

2022-10-07 11:27:32,337 [INFO] runner: native@0x7fc8cdd24d10
	at vavi.image.jpegxl.Test2.main(Test2.java:52)
2022-10-07 11:27:32,382 [INFO] dec: null@0x7fc8ce04d600
	at vavi.image.jpegxl.Test2.main(Test2.java:55)
2022-10-07 11:27:32,382 [INFO] JxlResizableParallelRunner: native@0x117f1d7b6
	at vavi.image.jpegxl.Test2.main(Test2.java:65)
2022-10-07 11:27:32,404 [INFO] JXL_DEC_BASIC_INFO
	at vavi.image.jpegxl.Test2.main(Test2.java:97)
2022-10-07 11:27:32,407 [INFO] size: 4032x3024
	at vavi.image.jpegxl.Test2.main(Test2.java:104)
2022-10-07 11:27:32,423 [INFO] JXL_DEC_COLOR_ENCODING
	at vavi.image.jpegxl.Test2.main(Test2.java:109)
2022-10-07 11:27:32,424 [INFO] icc_profile: 596
	at vavi.image.jpegxl.Test2.main(Test2.java:119)
2022-10-07 11:27:32,424 [INFO] JXL_DEC_NEED_IMAGE_OUT_BUFFER
	at vavi.image.jpegxl.Test2.main(Test2.java:128)
2022-10-07 11:27:32,425 [INFO] buffer_size: 48771072
	at vavi.image.jpegxl.Test2.main(Test2.java:134)
2022-10-07 11:27:32,563 [INFO] JXL_DEC_FULL_IMAGE
	at vavi.image.jpegxl.Test2.main(Test2.java:151)
2022-10-07 11:27:32,563 [INFO] JXL_DEC_SUCCESS
	at vavi.image.jpegxl.Test2.main(Test2.java:155)
2022-10-07 11:27:32,563 [INFO] pixel: 48771072, 48771072
	at vavi.image.jpegxl.Test2.main(Test2.java:166)

when failed

2022-10-07 11:40:19,145 [INFO] runner: native@0x7f987bb1bd40
	at vavi.image.jpegxl.Test2.main(Test2.java:52)
2022-10-07 11:40:19,184 [INFO] dec: null@0x7f985b885c00
	at vavi.image.jpegxl.Test2.main(Test2.java:55)
2022-10-07 11:40:19,186 [INFO] JxlResizableParallelRunner: native@0x1117387b6
	at vavi.image.jpegxl.Test2.main(Test2.java:65)
2022-10-07 11:40:19,200 [INFO] JXL_DEC_BASIC_INFO
	at vavi.image.jpegxl.Test2.main(Test2.java:97)
2022-10-07 11:40:19,204 [INFO] size: 4032x3024
	at vavi.image.jpegxl.Test2.main(Test2.java:104)
2022-10-07 11:40:19,222 [INFO] JXL_DEC_COLOR_ENCODING
	at vavi.image.jpegxl.Test2.main(Test2.java:109)
2022-10-07 11:40:19,222 [INFO] icc_profile: 596
	at vavi.image.jpegxl.Test2.main(Test2.java:119)
2022-10-07 11:40:19,223 [INFO] JXL_DEC_NEED_IMAGE_OUT_BUFFER
	at vavi.image.jpegxl.Test2.main(Test2.java:128)
2022-10-07 11:40:19,223 [INFO] buffer_size: 2998486337924014416                             # <-- WTF ???
	at vavi.image.jpegxl.Test2.main(Test2.java:134)
2022-10-07 11:40:19,224 [INFO] sizes: 198353232, 48771072
	at vavi.image.jpegxl.Test2.main(Test2.java:138)
Exception in thread "main" java.lang.IllegalStateException: JxlDecoderSetImageOutBuffer failed: 1
	at vavi.image.jpegxl.Test2.main(Test2.java:148)
@umjammer umjammer added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 7, 2022
@umjammer umjammer pinned this issue Oct 7, 2022
@umjammer umjammer unpinned this issue Oct 11, 2022
@umjammer
Copy link
Owner Author

dac344f

libjxl 0.6.x was wrong, w/ 0.7.x works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant