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

闪退问题 #140

Closed
chrissen0814 opened this issue Nov 21, 2019 · 25 comments
Closed

闪退问题 #140

chrissen0814 opened this issue Nov 21, 2019 · 25 comments
Labels

Comments

@chrissen0814
Copy link

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.previewlibrary.wight.SmoothImageView.transformIn(com.previewlibrary.wight.SmoothImageView$onTransformListener)' on a null object reference
at com.previewlibrary.view.BasePhotoFragment.transformIn(BasePhotoFragment.java:269)
at com.previewlibrary.GPreviewActivity$2.onGlobalLayout(GPreviewActivity.java:185)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:945)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2454)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1530)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7533)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1017)
at android.view.Choreographer.doCallbacks(Choreographer.java:829)
at android.view.Choreographer.doFrame(Choreographer.java:764)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1003)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6854)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)

@yangchaojiang
Copy link
Owner

好的,谢谢反馈

@yangchaojiang
Copy link
Owner

下午发布版本

@yangchaojiang
Copy link
Owner

试试2.2.8

yangchaojiang added a commit that referenced this issue Nov 25, 2019
@tomloveyou
Copy link

不行,还是报错
image

@yangchaojiang
Copy link
Owner

使用那个版本?

@yangchaojiang
Copy link
Owner

最新的版本 代码行已经不一样

@tomloveyou
Copy link

2.2.8

@tomloveyou
Copy link

image

@tomloveyou
Copy link

你居然还没回老家过年,居然还回我了,牛掰啊,大神

@tomloveyou
Copy link

image
这个是最新代码吗?

@tomloveyou
Copy link

imageView怎么会报空指针呢,奇怪

@tomloveyou
Copy link

image
也有可能是这个frament为空了

@tomloveyou
Copy link

这问题不好复现,因为我也是bugly上面看到的,我手机一次都没出现过

@yangchaojiang
Copy link
Owner

你理解错了 是imageView 对象为空。不是frament

@yangchaojiang
Copy link
Owner

2.3.1版本

@tomloveyou
Copy link

为啥imgview对象会为空呢,照理说已经findviewbyid,又没有把imgview赋值为null,不理解,我太菜了,

@yangchaojiang
Copy link
Owner

释放资源不对,

@tomloveyou
Copy link

好,感谢大神及时回复我,还及时发版修复

@sing1ee
Copy link

sing1ee commented Jan 19, 2020

@yangchaojiang 2.3.1的版本,还有这个问题

    java.lang.RuntimeException: Unable to destroy activity {com.previewlibrary.GPreviewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void uk.co.senab2.photoview2.PhotoViewAttacher.setOnViewTapListener(uk.co.senab2.photoview2.PhotoViewAttacher$OnViewTapListener)' on a null object reference
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4559)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4578)
        at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6864)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void uk.co.senab2.photoview2.PhotoViewAttacher.setOnViewTapListener(uk.co.senab2.photoview2.PhotoViewAttacher$OnViewTapListener)' on a null object reference
        at uk.co.senab2.photoview2.PhotoView.setOnViewTapListener(PhotoView.java:199)
        at com.previewlibrary.view.BasePhotoFragment.release(BasePhotoFragment.java:115)
        at com.previewlibrary.view.BasePhotoFragment.onDestroyView(BasePhotoFragment.java:97)
        at androidx.fragment.app.Fragment.performDestroyView(Fragment.java:2908)
        at androidx.fragment.app.FragmentManager.destroyFragmentView(FragmentManager.java:1370)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1290)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1382)
        at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1460)
        at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:442)
        at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2316)
        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2103)
        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2058)
        at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1929)
        at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:303)
        at androidx.fragment.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:262)
        at androidx.viewpager.widget.ViewPager.setAdapter(ViewPager.java:513)
        at com.previewlibrary.GPreviewActivity.onDestroy(GPreviewActivity.java:70)
        at android.app.Activity.performDestroy(Activity.java:7532)
        at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1307)
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4544)

@yanghuabang05
Copy link

好,感谢大神及时回复我,还及时发版修复

2.3.1版本

你好,根据我项目上bugly还会出现这个问题, 2.3.5版本。

@yangchaojiang
Copy link
Owner

@yanghua0726 参看demo 代码使用

@yanghuabang05
Copy link

你好,我已经根据demo上的方法进行操作,上线了一段时间观察了bugly,但是还是会出现这个问题,2.3.5的版本。

@yangchaojiang
Copy link
Owner

系统版本是多少

@yanghuabang05
Copy link

yanghuabang05 commented Jan 5, 2021 via email

@yangchaojiang
Copy link
Owner

??

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

No branches or pull requests

5 participants