Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It crashes, says progressBar is null #39

Closed
khalidlevz opened this issue May 24, 2022 · 3 comments
Closed

It crashes, says progressBar is null #39

khalidlevz opened this issue May 24, 2022 · 3 comments
Labels
Fixed Scheduled to release

Comments

@khalidlevz
Copy link

It crashes upon starting activity.
Log states that progressBar is null.

@afreakyelf
Copy link
Owner

Can you please provide reproduction steps?

@hemrajKumawat1
Copy link

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rsmssb.oldpaper/com.rajat.pdfviewer.PdfViewerActivity}: java.lang.IllegalStateException: progressBar must not be null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3751)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3919)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8089)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
Caused by: java.lang.IllegalStateException: progressBar must not be null
at com.rajat.pdfviewer.PdfViewerActivity.showProgressBar(PdfViewerActivity.kt:304)
at com.rajat.pdfviewer.PdfViewerActivity.onPdfError(PdfViewerActivity.kt:299)
at com.rajat.pdfviewer.PdfViewerActivity.initPdfViewer(PdfViewerActivity.kt:226)
at com.rajat.pdfviewer.PdfViewerActivity.loadFileFromNetwork(PdfViewerActivity.kt:209)
at com.rajat.pdfviewer.PdfViewerActivity.init(PdfViewerActivity.kt:122)
at com.rajat.pdfviewer.PdfViewerActivity.onCreate(PdfViewerActivity.kt:112)
at android.app.Activity.performCreate(Activity.java:8232)
at android.app.Activity.performCreate(Activity.java:8212)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1331)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3919) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loopOnce(Looper.java:238) 
at android.os.Looper.loop(Looper.java:357) 
at android.app.ActivityThread.main(ActivityThread.java:8089) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026) 

                                                                                                Showing the same error 
                                                                                                
                                                                                                    implementation 'com.github.afreakyelf:Pdf-Viewer:1.0.7'

startActivity(PdfViewerActivity.Companion.launchPdfFromUrl(mContext, path, "PDF", "", false)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));

@afreakyelf afreakyelf added the Fixed Scheduled to release label Nov 26, 2023
@afreakyelf
Copy link
Owner

Hi, Thank you for using this library. Above issue has been fixed in latest version.
https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Scheduled to release
Projects
None yet
Development

No branches or pull requests

3 participants