-
Notifications
You must be signed in to change notification settings - Fork 18
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
frameBufferToMat maybe crashes app #50
Comments
Hi @oscarlundberg-sthlm, please provide code example and details about used additional libraries (Vision Camera). |
Hi! Absolutely. Sorry for all the error-checks below, I've needed them, but they make the code a bit bloated to read. These are my related imports besides react-native-fast-opencv:
"react-native-vision-camera": "^4.6.3", I call react-native-fast-opencv using a hook within a frameProcessor, the frameProcessor looks like this:
The hook using react-native-fast-opencv I call useDetectMotion, and it looks like this:
Hope this clarifies things =) |
@oscarlundberg-sthlm Sorry, for delay. I checked it using const previousFrame = useSharedValue<number[] | null>(null); from Can you check it on more time on version |
Great! It does seem to work now. Just out of curiosity, was there a memory issue you fixed in the source code, or just my use of useRef that messed things up? |
@oscarlundberg-sthlm Great! It was fixed in #44 - there was a bug related to converting buffers to mat objects. |
Hi,
I'm using:
"react-native-fast-opencv": "^0.3.4"
Trying to develop for a physical iPhone using Expo. Sometimes the app works, but mostly it crashes on start up.
I've been looking like crazy, but manage to notice that commenting out the lines that uses OpenCV.frameBufferToMat() seemed to make the crash go away.
Upon searching a crash report from the iPhone, I found what's displayed in the attached image.
I'm more of a web developer, so I don't know much about this. But it seems there might be a memory issue?
The text was updated successfully, but these errors were encountered: