İ get this crash
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.dar.nclientv2.api.enums.ImageExt.ordinal()' on a null object reference at com.dar.nclientv2.api.SimpleGallery.extToString(SimpleGallery.java:96) at com.dar.nclientv2.api.SimpleGallery.getThumbnail(SimpleGallery.java:176) at com.dar.nclientv2.adapters.ListAdapter.loadGallery(ListAdapter.java:69) at com.dar.nclientv2.adapters.ListAdapter.onBindViewHolder(ListAdapter.java:95) at com.dar.nclientv2.adapters.ListAdapter.onBindViewHolder(ListAdapter.java:35) at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7678) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7761) at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6582) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6848) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6688) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6684) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362) at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:584) at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:687) at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:182) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4604) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4307) at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:2035) at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5743) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1730) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1739) at android.view.Choreographer.doCallbacks(Choreographer.java:1255) at android.view.Choreographer.doFrame(Choreographer.java:1145) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1693) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:249) at android.os.Looper.loop(Looper.java:337) at android.app.ActivityThread.main(ActivityThread.java:9593) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
This is from nhentai changing its image format/CDN: ImageExt comes back null, so SimpleGallery.extToString throws while loading thumbnails. It won't be fixed here - the project is abandoned.
Two maintained NClientV3 forks handle current nhentai:
- maxwai/NClientV3 - the most popular fork (see #785).
- yosefario-dev/NClientV3 - mine, on F-Droid and actively updated. Would love for you to give it a try 🙂
Both build on Dar9586's original work.