-
Notifications
You must be signed in to change notification settings - Fork 125
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
Error reading JPEG file #47
Comments
The last line points to the problem. Somehow an old version of libjpeg is being linked in, possibly even by Unity itself. Are you able to test against Unity 2018.2? |
That's Unity causing the problem then? I would like to avoid upgrading the Unity version as best I can since that may cause other problems to the project. |
I've tried Unity2018.2.2 and Unity2017.4.8 but the same error. |
Thanks for testing. I was on it today too but for some reason I can't get arunityX plugin to work :(. @philip-lamb might it be that our libjpeg inside artoolkitX repo is the wrong version? Don't know how to tell the version number. Unity is just pulling in that lib |
Thanks for your effort. |
No the build should work. You might need to run. ‘’’./build.sh iOS’’’ from unityx/Source to pull dependencies. But then replace the ARX.a with your ARX.a.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: chuen1118 <notifications@github.com>
Sent: Wednesday, August 8, 2018 10:46:57 PM
To: artoolkitx/artoolkitx
Cc: Thorsten Bux; Comment
Subject: Re: [artoolkitx/artoolkitx] Error reading JPEG file (#47)
Thanks for your effort.
I tried replacing the libjpeg.a with one from old projects: ARTK 5.3, 5.4, 6, they all looked the same and throws the same error.
Maybe that was some thing else gone wrong.
I didn't mention before, I have rebuilt the libARX.a so that it could skip connecting the calibration server and print out the error message. I am not familiar with this compiling thing and simply do that by running the build.sh. Would the rebuild process affect the linked libraries, like some old version on my machine got dragged into the rebuilt libARX.a?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fartoolkitx%2Fartoolkitx%2Fissues%2F47%23issuecomment-411365007&data=02%7C01%7C%7Cda3ec61fe7664e705e5008d5fd1c43f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636693220191025513&sdata=1BPW%2FlNBsingxkowBZSYuo8TUJnIt1QjpN376C2ucYY%3D&reserved=0>, or mute the thread<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP_uvLcSxEz1Xf0ybiDGD2Sc-6cWH_a4ks5uOsGhgaJpZM4VxmOF&data=02%7C01%7C%7Cda3ec61fe7664e705e5008d5fd1c43f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636693220191025513&sdata=abIrTLUfqOx4t74zr395s5iu7OctTOWTO3xKUEOU3M0%3D&reserved=0>.
|
Tried that, but the same :( |
Yes, these EntryPointNotFoundExceptions are the reason I can’t even get to your error ☹
|
Hm, after building to Android and macOS I can finally build to iOS. Now lets see if I get your error |
I'm at the same stage now. What did you change in the code to get the jpeg error message you are sharing? |
Adding a breakpoint in XCode the line in question is here: artoolkitx/Source/ARX/AR2/imageSet.c Line 512 in 86693f8
|
it's getting strange. In ARX/AR2/jpeg.c, uncomment line 147: Then build for ios and macos. There were errors like this when rebuilding the bundle, but build succeed anyway: |
It ran into the arMalloc line because it failed here artoolkitx/Source/ARX/AR2/imageSet.c Line 116 in 86693f8
and fell back to the old v4.x iset format. Since the iset file is in fact a new one, it failed. The artoolkitx/Source/ARX/AR2/jpeg.c Line 180 in 86693f8
which gives Wrong JPEG library version: library is 62, caller expects 80
|
yes, figured that. I've tried with another libjpeg but no success. |
After some more googling, I found a temp fix by adding This might be irrelevant. |
So basically the libjpeg from artoolkitX works but from somewhere it calls a wrong one on iOS |
I'm now convinced that it is opencv2.framework that caused the mismatch. artoolkitx/Source/depends/ios/include/jpeglib.h Lines 40 to 42 in f8f0666
Would you consider sharing your working opencv2.framework instead of downloading the live version? ======================================================================== |
I fear we don't have a working version with iOS and NFT on Unity3D I've run in the same issues. I can see that we have builds for all platforms except iOS. https://github.com/artoolkitx/opencv/releases |
I've managed to isolate one possible source of the error. We've got multiple libjpeg versions because we're linking a verion of opencv on ios and macos which is a static framework (yes, such a thing exists) and that framework contains the symbols for whatever version of libjpeg is in opencv. I will work on a build of opencv which doesn't expose the libjpeg symbols. |
* commit '68245e9edfea9c86585fc29572f8a8a75e0df1bc': (38 commits) Fix line endings. Sort Windows line-endings. ARTrackableSquare: Fix out of bounds access Minor documentation updates. Bump version for Android. Change onCreate to protected because per default Android Studio create onCreate as protected. Makes integration of lib easier. Android SDK 28. Update Android SDK, NDK versions. Version 1.0.5. Provide accessors for adaptive thresholding parameters. Also, improve bracketing thresholding mode to decelerate rate of change when adjusting brackets. Provide accessors for square parameters. Also, improve bracketing thresholding mode to use actual rather than prospective matches. Add redirect in opencv download from github. Sort out conflicting libjpeg implementations by using the same libjpeg-turbo as used by OpenCV. Fixes artoolkitx#47. Package 1.0.4, with minor fixes. Enforce minimum inlier probability in robust multimarker pose estimation. Also adding accessors. Windows compilation fixes + bump version. Fix memory leak of images read by STBImage by correcting return type to follow RAII. Make JPEG reading consistent. add support for selecting another cmake generator under windows Update bitrise status image URLs. ... # Conflicts: # Source/ARX/AR2/CMakeLists.txt # Source/ARX/ARTrackableSquare.cpp # Source/ARX/ARVideo/CMakeLists.txt # Source/ARX/OCVT/CMakeLists.txt # Source/CMakeLists.txt # Source/build.sh
* commit '3710b8236efb629c30bb189a3e9d7e196a00662e': (44 commits) stb_image in emscripten depends folder only for linux fixing the path in CMakeLists.txt, adding stb_image folder to emscripten fix to be able to build with emscripten fix merge issue gitignote fix for emscripten build with libjpeg Fix line endings. Sort Windows line-endings. ARTrackableSquare: Fix out of bounds access Minor documentation updates. Bump version for Android. Change onCreate to protected because per default Android Studio create onCreate as protected. Makes integration of lib easier. Android SDK 28. Update Android SDK, NDK versions. Version 1.0.5. Provide accessors for adaptive thresholding parameters. Also, improve bracketing thresholding mode to decelerate rate of change when adjusting brackets. Provide accessors for square parameters. Also, improve bracketing thresholding mode to use actual rather than prospective matches. Add redirect in opencv download from github. Sort out conflicting libjpeg implementations by using the same libjpeg-turbo as used by OpenCV. Fixes artoolkitx/artoolkitx#47. Package 1.0.4, with minor fixes. ... # Conflicts: # .gitignore # Source/ARX/AR2/CMakeLists.txt # Source/ARX/ARVideo/CMakeLists.txt # Source/ARX/CMakeLists.txt # Source/ARX/OCVT/CMakeLists.txt # Source/CMakeLists.txt # Source/build.sh # Source/depends/emscripten/libjpeg/liblibjpeg.a
I am using ARToolkitX (iOS) with Unity (5.6.5f1). It works fine in the editor, however it crashed when deployed to iPad. Here is the error log:
I've been using this set of data before (ARTK v5.3) and had no problem.
Regenerate the dataset with artoolkitx_genTexData threw the same error.
Example from arunityx threw this too.
Looks like this line
jpeg_create_decompress(&cinfo);
in jpeg.c throws an errorWrong JPEG library version: library is 62, caller expects 80
The text was updated successfully, but these errors were encountered: