-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
EXC_BAD_ACCESS on ROCKSDB_LITE, iOS Simulator #325
Comments
I think there are multiple issues with the LITE builds. First, when I clone the current repo and run this:
Is anyone else seeing this? |
You also need to compile simple_example using -DROCKSDB_LITE |
Ok, I just tried that. Same error with assertion failed.
|
I added a bit more debugging:
|
Earlier I did some digging to try and figure out why S_ISDIR was returning 0 for the mode of the directory. I'm still not sure why building with ROCKSDB_LITE makes a difference. From util/env_posix.cc:1474
|
Are you running on mac OS or ios simulator? |
This is a complex issue with at least 3 bugs affecting different runtimes (e.g. simulator vs. OSX command line). The original issue of EXC_BAD_ACCESS occurs on the iOS Simulator as well as on physical iOS devices. When I try to replicate the issue on the OSX command line (compiled using ROCKSDB_LITE), I am struck with the other bugs such as "IO error: `/tmp/rocksdb_simple_example' exists but is not a directory." The show-stopper for me is the original crash... but the other bugs makes troubleshooting difficult, if not impossible. |
Can you try compiling your project with ROCKSDB_LITE and running it on iOS simulator? I'm 99% confident that EXC_BAD_ACCESS occurs because you didn't compile your project with ROCKSDB_LITE. I can repro the other issue on my mac. It looks like fs system calls are funky when running iOS binaries on OSX. I don't have much experience here and can't help unfortunately. |
When you say "project" do you mean the Xcode project? Which build setting should I modify? Can you post a screenshot? Caylan
|
There must be some sort of compile flags, right? Just add -DROCKSDB_LITE to compile flags in Xcode. |
Maybe try "preprocessor macros"? |
Also add IOS_CROSS_COMPILE. |
Added this to our INSTALL.md: https://github.com/facebook/rocksdb/blob/master/INSTALL.md |
I cleaned both the project build, and I cleaned and rebuilt the static lib. |
Any news? |
This issue is likely fixed by fa50abb. Feel free to reopen if you are still seeing this. |
⬆️ bump prebuild
Summary: This linker flag does not seem to be needed, and prevents use of gold or lld at link time. Test Plan: * build using llvm thinLTO
I'm testing RocksDB on iOS and a simple test app is crashing on simple iteration.
Console:
Stack trace:
Debugger
The text was updated successfully, but these errors were encountered: