Comments (4)
Environment
OS: Android 5.1
Model: FREETEL FTJ152C
from conference-app-2017.
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.FragmentActivity.finish()' on a null object reference
io.github.droidkaigi.confsched2017.view.fragment.SessionDetailFragment.onOverScroll (SourceFile:175)
io.github.droidkaigi.confsched2017.viewmodel.SessionDetailViewModel.onOverScroll (SourceFile:168)
io.github.droidkaigi.confsched2017.databinding.FragmentSessionDetailBinding$OnOverScrollListenerImpl.onOverScroll (SourceFile:332)
io.github.droidkaigi.confsched2017.view.customview.OverScrollLayout$1.onAnimationEnd (SourceFile:120)
android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd (ViewPropertyAnimator.java:1114)
android.animation.ValueAnimator.endAnimation (ValueAnimator.java:1239)
android.animation.ValueAnimator$AnimationHandler.doAnimationFrame (ValueAnimator.java:766)
android.animation.ValueAnimator$AnimationHandler$1.run (ValueAnimator.java:801)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:920)
android.view.Choreographer.doCallbacks (Choreographer.java:695)
android.view.Choreographer.doFrame (Choreographer.java:628)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:906)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:158)
android.app.ActivityThread.main (ActivityThread.java:7229)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
from conference-app-2017.
It seems that continuous swipes make multiple onOverScroll
calls.
The second one is called after its activity has been finished, so getActivity()
returns null and it causes NPE 😨
We can fix this by checking activity existence in SessionDetailFragment#onOverScroll
.
But is it an intended behavior that onOverScroll
is called multiple times?
Should we fix OverScrollLayout
?
from conference-app-2017.
We can fix this by checking activity existence in
SessionDetailFragment#onOverScroll
.
Setting null to its view model's callback in the beginning of SessionDetailFragment#onOverScroll
also works 😉
from conference-app-2017.
Related Issues (20)
- Up button of session detail view always navigate to the MainActivity HOT 2
- My session list does not be shown in Nougat.
- Why use "Iterator" for Adapter? HOT 3
- New object allocation in onDraw HOT 3
- Bottom half of Sessions screen becomes white after rotating at Splash screen HOT 1
- User is able to return to Splash screen when tapping on back button immediately after Sessions screen is launched HOT 1
- Show icon of speakers HOT 1
- AppIndexing Support
- Should I use Android Studio 2.3? HOT 1
- Release to GooglePlayStore
- MainActivity launch mode should be singleTask.
- Introduce Firebase RemoteConfig
- Remove fps view in splash page
- konifar's session cell position is wrong
- Remove person icon in after party cell.
- Change the logo in splash page HOT 1
- Crash reports HOT 3
- Release 1.1.0
- Crush on SessionDetailFragment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conference-app-2017.