AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
591 stars 197 forks source link

Crash: LuceneIndex.find null reference #2099

Open tuomas2 opened 2 years ago

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1281

02-13 07:09:48.396 15737 15737 E AndroidRuntime: FATAL EXCEPTION: main
02-13 07:09:48.396 15737 15737 E AndroidRuntime: Process: net.bible.android.activity, PID: 15737
02-13 07:09:48.396 15737 15737 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.lucene.search.Searcher.search(org.apache.lucene.search.Query, org.apache.lucene.search.Collector)' on a null object reference
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java:331)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.index.query.BaseQuery.find(BaseQuery.java:50)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.index.query.AndQuery.find(AndQuery.java:59)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:96)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:83)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:127)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:112)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at net.bible.android.control.link.LinkControl.checkStrongs(LinkControl.kt:251)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at net.bible.android.control.link.LinkControl.showAllOccurrences(LinkControl.kt:223)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at net.bible.android.view.activity.page.BibleView.openLink(BibleView.kt:813)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at net.bible.android.view.activity.page.BibleView$BibleViewClient.shouldOverrideUrlLoading(BibleView.kt:848)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-Monochrome.aab-stable-469209823:14)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at android.os.MessageQueue.nativePollOnce(Native Method)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at android.os.MessageQueue.next(MessageQueue.java:327)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:189)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6734)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-13 07:09:48.396 15737 15737 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
tuomas2 commented 2 years ago

Asked user for details.

timbze commented 2 years ago

Another report: https://support.andbible.org/scp/tickets.php?id=1292

timbze commented 2 years ago

One more report: https://support.andbible.org/scp/tickets.php?id=1303

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1308

timbze commented 2 years ago

This error occurs right before crash. Though with different modules and different files which cannot be found.

02-23 08:59:53.698 32417 32417 W Slf4jAndroidLogger: java.io.FileNotFoundException: /storage/emulated/0/Android/data/net.bible.android.activity/files/lucene/Sword/ESVS/_l.prx: open failed: ENOENT (No such file or directory)
tuomas2 commented 2 years ago

That is right..

02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger: java.io.FileNotFoundException: /storage/emulated/0/Android/data/net.bible.android.activity/files/lucene/Sword/KJV/_l.fnm: open failed: ENOENT (No such file or directory)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at libcore.io.IoBridge.open(IoBridge.java:512)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:274)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<init>(SimpleFSDirectory.java:71)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java:98)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.<init>(NIOFSDirectory.java:92)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:79)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:345)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:71)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:80)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:116)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:94)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:105)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:78)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:709)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:72)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.index.IndexReader.open(IndexReader.java:273)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:110)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.index.lucene.LuceneIndex.initDirectoryAndSearcher(LuceneIndex.java:273)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.index.lucene.LuceneIndex.<init>(LuceneIndex.java:161)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.index.lucene.LuceneIndexManager.getIndex(LuceneIndexManager.java:95)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.index.search.SearcherFactory.createSearcher(SearcherFactory.java:56)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:121)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:112)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at net.bible.android.control.link.LinkControl.checkStrongs(LinkControl.kt:251)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at net.bible.android.control.link.LinkControl.showAllOccurrences(LinkControl.kt:223)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at net.bible.android.view.activity.page.BibleView.openLink(BibleView.kt:837)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at net.bible.android.view.activity.page.BibleView$BibleViewClient.shouldOverrideUrlLoading(BibleView.kt:872)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-Monochrome.aab-stable-475808720:14)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at android.os.MessageQueue.nativePollOnce(Native Method)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at android.os.MessageQueue.next(MessageQueue.java:325)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at android.os.Looper.loop(Looper.java:142)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at android.app.ActivityThread.main(ActivityThread.java:6723)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at java.lang.reflect.Method.invoke(Native Method)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:449)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at libcore.io.Linux.open(Native Method)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:207)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    at libcore.io.IoBridge.open(IoBridge.java:498)
02-27 06:11:55.527 20234 20234 W Slf4jAndroidLogger:    ... 35 more
02-27 06:11:55.706 20234 20234 I Slf4jAndroidLogger: ParsedQuery- strong:H7225 [LuceneIndex:find:297] Thread[main,5,main]
tuomas2 commented 2 years ago

Let's see if this fixes the issue.

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1368 on v640

tuomas2 commented 1 year ago

https://support.andbible.org/scp/tickets.php?id=1645

It was "Find all occurrences". I think #2211 is duplicate of this.

tuomas2 commented 1 year ago

https://support.andbible.org/scp/tickets.php?id=1655

Asked user to try to re-index the module.