-
Notifications
You must be signed in to change notification settings - Fork 408
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
Model does not work in release version #171
Comments
Hello! Could you find out what the problem is? |
can anyone solved this problem? |
i am getting error like [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(Failed to run model, null, java.nio.BufferOverflowException |
Also having this issue. It runs fine on the simulator, and on device when in debug mode. But when you run in release mode / upload to the store nothing is detected |
I had this same issue, and I found that assertions are turned off in release mode, so if you were following an example from Stack overflow that placed the model loading in an assertion as in:
This will not work in release mode Change to something like and surround with try catch:
|
Hi,
I created a TFLite model using google's teachable machine. It is sort of working in the debug version of the flutter app. The only problem is that it finds a lot of false positives along with the true one's. But I think this could be an issue with the model itself. As long as it is finding anything I think the plugin is fine.
However, the model does not work when I use a signed release version of my app which I installed on my device using the bundletool. I don't get any crashes or any error's in the logs. My logs just print that no recognitions happened or return empty response from the tflite recognition code whereas it finds a lot more recognitions while in the debug mode. Can you please let me know what could have gone wrong between the debug and release version? also if there are any special steps that need to be carried out while in release?
Thanks
UPDATE
Digging further, I ran the app in profile mode and found following logs (Note: These only show up in profile mode so I am not sure how far it is from the release version. Also, I don't get these error when running in debug):
As I don't see the behavior in debug mode, I am still confused on what is going on in the app when running the release version.
The text was updated successfully, but these errors were encountered: