Git Product home page Git Product logo

Comments (3)

rjrjr avatar rjrjr commented on August 10, 2024

Oops. Thanks for the report, will dig into it.

On Mon, Apr 27, 2015, 8:11 PM Prashanth Sadasivan [email protected]
wrote:

Hey, I was just poking around the sample, trying to better understand how
flow works. I built the flow-sample app, and it seems to work just fine in
portrait mode, but in landscape mode, when the MasterPathContainerView is
used, the app crashes on startup.

Here's the stack trace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.flow/com.example.flow.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'flow.History flow.Flow.getHistory()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'flow.History flow.Flow.getHistory()' on a null object reference
at com.example.flow.pathview.MasterPathContainerView.dispatch(MasterPathContainerView.java:21)
at com.example.flow.view.TabletMasterDetailRoot.dispatch(TabletMasterDetailRoot.java:76)
at com.example.flow.MainActivity.dispatch(MainActivity.java:146)
at flow.Flow$PendingTraversal.dispatch(Flow.java:315)
at flow.Flow$1.doExecute(Flow.java:141)
at flow.Flow$PendingTraversal.execute(Flow.java:323)
at flow.Flow.move(Flow.java:232)
at flow.Flow.setHistory(Flow.java:139)
at flow.Flow.setDispatcher(Flow.java:107)
at flow.FlowDelegate.onCreate(FlowDelegate.java:104)
at com.example.flow.MainActivity.onCreate(MainActivity.java:72)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)

I haven't changed any source files, just the gradle-mvn-push.gradle file
to get rid of some gradle warnings (missing POM_DEVELOPER_ID). I tried
digging into it for an hour or so, but I couldn't find a trivial solution
to the problem. Am I doing anything wrong?


Reply to this email directly or view it on GitHub
#82.

from flow.

prashanthsadasivan avatar prashanthsadasivan commented on August 10, 2024

Awesome, thanks a ton. I figured out why it's occurring. FlowDelegate.onCreate triggers a traversal, which eventually yields a Flow.get(getContext()) in MasterPathContainerView. But since we're still creating the FlowDelegate, the MainActivity's flowSupport field is null, which causes the call to Flow.get() to return null in the MasterPathContainerView. Unfortunately I wasn't sure what the intent was of that code, so I couldn't figure out a fix for it. Hope that helps!

from flow.

asifali9145 avatar asifali9145 commented on August 10, 2024

(MainActivity.java:146)
I'm facing this error plz help to resolve it

from flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.