Comments (4)
原则上与本库没有关系的。只是格式化一下打印而已啊!调用db做了些什么?代码放出来看看!
原始邮件
发件人:[email protected]
收件人:CoderJackyHuang/[email protected]
发送时间:2016年5月31日(周二) 16:14
主题:[CoderJackyHuang/HYBUnicodeReadable] 新版1.2引入后会导致FMDB报错 (#6)
更新到1.2之后引起fmdb初始化错误,如果将库移除了fmdb初始化就正常了
错误日志:
2016-05-31 16:12:30.878 dituwuyou[661:200721] -DBModel init: /var/mobile/Containers/Data/Application/B95688FA-57B3-44DC-8148-750E39FDB8FC/Documents/dituwuyou.sqlite
2016-05-31 16:12:30.895 dituwuyou[661:200721] _path
2016-05-31 16:12:30.895 dituwuyou[661:200721] _queue
2016-05-31 16:12:30.895 dituwuyou[661:200721] _db
2016-05-31 16:12:30.895 dituwuyou[661:200721] -[FMDatabaseQueue db]: unrecognized selector sent to instance 0x12df5bcc0
2016-05-31 16:12:30.896 dituwuyou[661:200721] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FMDatabaseQueue db]: unrecognized selector sent to instance 0x12df5bcc0'
*** First throw call stack:
(0x18201adb0 0x18167ff80 0x182021c4c 0x18201ebec 0x181f1cc5c 0x1005c6a58 0x1828fe3cc 0x181fe455c 0x181fe2464 0x1828fe320 0x1828fe1f0 0x1004850d8 0x1004852e0 0x100484ddc 0x100371240 0x10036e7f4 0x10038e864 0x1871ee9c0 0x18741e184 0x1874225f0 0x18741f764 0x1839bb7ac 0x1839bb618 0x1839bb9c8 0x181fd109c 0x181fd0b30 0x181fce830 0x181ef8c50 0x1871e794c 0x1871e2088 0x1004014b8 0x181a968b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from hybunicodereadable.
NSString* docsdir = [NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *dbpath = [docsdir stringByAppendingPathComponent:@"dituwuyou.sqlite"];
FMDatabaseQueue* queue =[FMDatabaseQueue databaseQueueWithPath:dbpath];
[queue inTransaction:^(FMDatabase *db, BOOL *rollback){
.....
}
from hybunicodereadable.
到FMDB内部初始化就报错了
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName {
self = [super init];
if (self != nil) {
_db = [[[self class] databaseClass] databaseWithPath:aPath];
FMDBRetain(_db);
#if SQLITE_VERSION_NUMBER >= 3005000
BOOL success = [_db openWithFlags:openFlags vfs:vfsName];
#else
BOOL success = [_db open];
#endif
if (!success) {
NSLog(@"Could not create database queue for path %@", aPath);
FMDBRelease(self);
return 0x00;
}
_path = FMDBReturnRetained(aPath);
/*************这句崩溃了***************/
_queue = dispatch_queue_create([[NSString stringWithFormat:@"fmdb.%@", self] UTF8String], NULL);
/******************************/
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
_openFlags = openFlags;
}
return self;
}
from hybunicodereadable.
和self的description有关,如 NSLog(@"%@", self); 就会出错
from hybunicodereadable.
Related Issues (18)
- 执行的效率问题 HOT 2
- ReadMe 网址需要变一下了 HOT 1
- 在8.3真机中会打印出很多属性
- 真机使用相机时会崩溃 HOT 1
- 找到一个简化版 HOT 1
- 不能使用lldb命令
- iPhone 5s , v10.2.1, Crash HOT 1
- Thread 1: EXC_BAD_ACCESS (code=1, address=0x18)造成系统崩溃问题 HOT 1
- 没有网络时,调用触发闪退,日志如下,调试时也发现,( value = [self valueForKey:propertyName];) propertyName为nil 导致的crash HOT 1
- 启动奔溃 HOT 3
- 打印字符串的问题 HOT 1
- 一进入断点,控制台就疯狂log两个日志,点击继续运行无反应,设置关闭xcode都不行,一直强退xcode才可以 HOT 1
- 标哥,打印NSURLResponse对象,在httpInternal这个属性的时候会遇到问题 HOT 3
- 9.3会崩溃 HOT 1
- UItextField获得焦点时,使用系统键盘以外第三方键盘导致App闪退 HOT 1
- 标哥,在iOS 5s(9.2)的模拟器、ipad(9.2)模拟器上面运行始终会崩溃 HOT 6
- iOS8.3调试,出现问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hybunicodereadable.