-
Notifications
You must be signed in to change notification settings - Fork 122
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
IndexError (RangeError (byteOffset) ...
error on iOS
#656
Comments
Thanks for reporting! Some basics: it looks like this happens when reading
Then FlatBuffers errors because the byte offset is too large. I tried to run the example app, but it appears it does not support iOS or macOS? Had to run I dragged the fmtc file onto the simulator and tried to select it. However, it is grayed out. Is there something I am missing? Anyhow, I analyzed the data.mdb file with Admin and the |
I don't have any Apple devices, so I didn't include any of those platform files. As @Soap-141 said (thanks :)), the file's probably greyed out because the file picker stuff is quite hard to get right across all platforms. Hopefully that works. |
Hello, any update on this? Can I provide anything else? |
OK, finally had time to try to reproduce this again. @Soap-141 thanks, your suggestion allowed me to import the file! However, running a few times with
And when running through Visual Studio Code (with "Uncaught Exceptions" enabled) I always get Next week at the earliest I'll try to have a look at why FlatBuffers might throw the above exception, maybe that gives a useful hint. |
@greenrobot-team Thanks! Yes I understand, I also had a hard time debugging iOS on my Mac using VS Code and Xcode, by playing around with exception settings and breakpoints I managed to have multiple exceptions and errors similar to this, you are on the right path. Feel free to let me know if I can help more. |
This report is based on a 3rd party private report to https://github.com/JaffaKetchup/flutter_map_tile_caching. As much info is supplied as is known, let me know if more is required!
Is there an existing issue?
Build info
Steps to reproduce
FMTC allows users to export parts of the database, then re-import them. There is practically no difference to a standard read/write operation though. Note that an import is not the same as a complete replacement of the existing 'data.mdb' file with a new one. Both databases are open at the same time, and the needed data is transferred manually between them.
When importing the attached database into the OP's app, or the FMTC example app (https://github.com/JaffaKetchup/flutter_map_tile_caching), the following error is thrown, on iOS only:
Raw ObjectBox file: https://drive.google.com/file/d/133UXCBJDydiN_kYlbQjrHYygdK16S82V/view?usp=sharing (do not distribute)
FMTC compatible file (contains the ObjectBox file, but with extra footer information): https://drive.google.com/file/d/1x5JoqnTvqD_QRr2bpIVcYuh6tQKt3KXu/view?usp=sharing (do not distribute)
To reproduce with the example app, clone the repo, run the example app, then follow the screenshots:
Select to import the FMTC compatible file, choose any conflict resolution mode (skip/merge/etc.), then tap the FAB.
Expected behavior
The same behaviour should occur on the iOS platform as on other platforms: that is, the import operation succeeds without error.
Actual behavior
The error in the screenshot is thrown.
Code
It is difficult to provide an MRE. The import algorithm can be found at https://github.com/JaffaKetchup/flutter_map_tile_caching/blob/9268675e19d246da2a9bb298aa00812e09c5891e/lib/src/backend/impls/objectbox/backend/internal_workers/standard/worker.dart#L874-L1279, but it is somewhat context dependent (note, for example, 'store' in FMTC terminology is not the same as an ObjectBox 'store'). The code runs within an isolate.
Logs, stack traces
As well as the screenshot above, see these screenshots as well - not sure if they're useful or not:
The text was updated successfully, but these errors were encountered: