theotherp / nzbhydra2

Usenet meta search
Other
1.27k stars 76 forks source link

NullPointerException when searching with Animetosho preset #854

Closed imran-iq closed 1 year ago

imran-iq commented 1 year ago

Steps to reproduce

  1. Add usenet preset Animetosho
  2. Go to main page, select Anime category
  3. Search for "test"

Expectation

Results to be shown

Actual Result

You get an error message, with the following stack trace

2023-02-22 21:09:00.156 ERROR --- [pool-1942-thread-1] org.nzbhydra.indexers.Newznab            : [ID: 68253, Host: <hidden>] Animetosho (Newznab): Unexpected error while searching

java.lang.NullPointerException: null
    at org.nzbhydra.indexers.Newznab.calculateAndAddCategories(Newznab.java:227)
    at org.nzbhydra.indexers.Newznab.addFurtherParametersToUri(Newznab.java:215)
    at org.nzbhydra.indexers.Newznab.buildSearchUrl(Newznab.java:155)
    at org.nzbhydra.indexers.Indexer.searchInternal(Indexer.java:203)
    at org.nzbhydra.indexers.Indexer.search(Indexer.java:144)
    at org.nzbhydra.searching.Searcher.lambda$getIndexerCallable$12(Searcher.java:415)
    at java.base@17.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.nzbhydra.logging.MdcThreadPoolExecutor$1.run(MdcThreadPoolExecutor.java:111)
    at java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base@17.0.5/java.lang.Thread.run(Thread.java:833)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)

Additional info

This does not happen when using the All category, but only the Anime one

theotherp commented 1 year ago

Works fine for me. Please post your debug infos zip.

imran-iq commented 1 year ago

Here you go nzbhydra-debuginfos-2023-02-22-21-36.zip

theotherp commented 1 year ago

You should be able to fix it by checking the caps in the indexer config. I'll add a fix to have it running without that.