Closed gravyday closed 1 year ago
It's definitely an issue where the wrong version of libjpeg is being picked up during the build, as I struck this identical problem a few versions back. How this has occurred is the question. I'll see if I can reproduce the issue.
Ok, I figured out how to fix it on my local build. In Short, I went and found the libjpeg that is included in this codebase (/Source/Extras/artoolkitx/Source/depends/ios/lib/libjpeg.a) and dropped it in my Assets folder of my Unity project. Then linked it in the UnityFramework libraries in my Xcode build. It must come before libiphone-lib.a.
Here is a more detailed description:
arunityX.unitypackage
(see Quick Start), copy /Source/Extras/artoolkitx/Source/depends/ios/lib/libjpeg.a from this distro to your Unity project folder under /Assets/ios/SimpleNFTScene
for iosProject Navigator
, click on the project UnityFramework
Build Phases
tabLink Binary With Libraries
to see the libraries linked, you will see libARX.a and a bunch of other stuff, if you see libjpeg.a in this list skip the next step.Add Others...->Add Files...
then navigate to the libjpeg.a and add itThe sample scene runs on my device flawlessly now.
Hope this helps! I think I will have to do something similar to get it working on Android now.
Thanks for the reporting on this. If Unity are exposing libjpeg symbols in their libiphone-lib.a, that is annoying. Still, artoolkitX's libARX.a is supposed to have a single-object prelink step so that the jpeg symbols are already resolved, so it shouldn't have mattered. I'm investigating now...
This will be picked up in artoolkitX for Unity v1.1.11.
Hi! We have an app that works using NFT markers in ARtoolkit5 and I am investigating the upgrade to ARtoolkitX.
I followed the Quick Start and I'm finding a crash when running the SimpleNFTScene natively on IOS.
Might be a problem with libjpeg as the fatal error seems to come from reading the example image: gibraltar.jpg. The crux of the error seems to be 'Error reading JPEG file: JPEG parameter struct mismatch: library thinks size is 600, caller expects 632'. (Full log is below)
Perhaps I am doing something wrong or I have a library config problem but this is a scratch build with provided sample scene and marker named "gibraltar" and no outside code. Any help is appreciated. Thanks!
Using:
Steps to Reproduce:
./build.sh ios macos
in Source directory./package.sh
in packages directoryarunityX.unitypackage
usingAssets > Import Package > Custom Package...
SimpleNFTScene
, this runs and works in Unity on mac, Marker "gibraltar" tracks from laptop camera