Skip to content

[fix] issue (#12) 初始化偶现崩溃问题#13

Merged
shixinzhang merged 1 commit into
shixinzhang:masterfrom
yibaoshan:master
Apr 9, 2023
Merged

[fix] issue (#12) 初始化偶现崩溃问题#13
shixinzhang merged 1 commit into
shixinzhang:masterfrom
yibaoshan:master

Conversation

@yibaoshan
Copy link
Copy Markdown
Contributor

崩溃原因:

loadAllFileToMemory() 函数使用的成员变量 mRootDirectoryPath 为空

在 class BitmapFileWatcher 静态代码块中,向线程池提交了执行 loadAllFileToMemory() 函数的任务

该任务可能会在 mRootDirectoryPath 未赋值之前执行,导致发生空指针异常

解决方案:

loadAllFileToMemory() 函数的调用时机,修改到 init() 函数执行以后

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants