Closed Jiabaokang closed 4 months ago
Additional information iOS-Real machine version:15.8.2 iOS-Simulator version:17.0
It seems the dynamic lib was not loaded correctly, could you please take a look at ~/.pub-cache/hosted/pub.dev/opencv_dart-1.0.10/ios
and see whether the opencv_dart.xcframework
exists and not empty? you can also manually run setup command and try again.
It should looks like
Project in the pub-cache/hosted/pub.dev/opencv_dart-1.0.10/ios
directory, but there is no this file opencv_dart.xcframework
, What command do you need to run to generate theopencv_dart.xcframework
folder?
It will be downloaded and extracted from github releases during flutter build, check whether the .tar.gz file exists and correct.
If your network is unstable, it may not be downloaded successfully, the you can either run setup commands manually (read README carefully) or download .tar.gz manually and move it to the ios directory in pubcache (refer to the structure I posted above), then it will be extracted automatically during flutter build/run.
Note: you need to ensure that wget and tar are installed.
According to your method, the dynamic link library has been successfully loaded and the issue has been fixed. Thank you for your answer. I am not sure if it is an issue with my local development environment, as there are other dynamic libraries loaded in the project, and it seems that the same error did not occur. Thank you for your answer. You can close this bug now.
感谢指导
Describe the bug Used in Flutter projects opencv dart: ^1.0.10 The Android project is working fine, but the following exception occurs on the iOS device. Both the real device and the emulator get the same error message
Error log `[core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" [PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x2807378d0> accessor:<<PAApplication 0x282b777f0 identifierType:auditToken identifier:{pid:912, version:2646}>> identifier:E8F03A6E-7078-4BE7-AA51-51EFD85FE758 kind:intervalEnd timestampAdjustment:0 tccService:kTCCServicePhotos, error=Error Domain=PAErrorDomain Code=10 "Possibly incomplete access interval automatically ended by daemon" [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'Image_IMRead': dlsym(RTLD_DEFAULT, Image_IMRead): symbol not found
0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)
1 CvNative._Image_IMReadPtr (package:opencv_dart/src/opencv.g.dart:5974:34)
2 CvNative._Image_IMReadPtr (package:opencv_dart/src/opencv.g.dart)
3 CvNative._Image_IMRead (package:opencv_dart/src/opencv.g.dart:5975:30)
4 CvNative._Image_IMRead (package:opencv_dart/src/opencv.g.dart)
5 CvNative.Image_IMRead (package:opencv_dart/src/opencv.g.dart:5964:12)
6 imread.. (package:opencv_dart/src/imgcodecs/imgcodecs.dart:26:22)
7 cvRun (package:opencv_dart/src/core/base.dart:66:17)
8 imread. (package:opencv_dart/src/imgcodecs/imgcodecs.dart:26:5)
9 cvRunArena (package:opencv_dart/src/core/base.dart:84:31)
10 imread (package:opencv_dart/src/imgcodecs/imgcodecs.dart:24:10)
11 ImageDetection.detection (package:ai_detection/image_detection.dart:45:21)
12 _MyHomePageState._selectPicture (package:ai_detection/main.dart:61:20)