Coder Social home page Coder Social logo

Comments (10)

soneff avatar soneff commented on April 19, 2024

Can you provide a stack trace or some more detailed debugging information to reproduce the issue? Is it an "Application Not Responding" error?

from facebook-android-sdk.

skelink2 avatar skelink2 commented on April 19, 2024

I am attaching the stack trace. I get 'Force-Close' error.

D/dalvikvm( 99): GC freed 32285 objects / 1846432 bytes in 379ms
I/BatteryStatsImpl( 99): notePhoneSignalStrengthLocked: 3->4
W/dalvikvm( 99): disableGcForExternalAlloc: true
I/ActivityManager( 99): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.stream/.App }
I/ActivityManager( 99): Start proc com.facebook.stream for activity com.facebook.stream/.App: pid=1730 uid=10074 gids={3003}
I/dalvikvm( 1730): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38)
I/dalvikvm( 1730): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=42)
D/ViewFlipper( 169): updateRunning() mVisible=false, mStarted=true, mUserPresent=true, mRunning=false
I/global ( 1730): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
I/ActivityManager( 99): Process com.google.android.gm (pid 1716) has died.
D/dalvikvm( 1730): GC freed 1195 objects / 256432 bytes in 96ms
D/dalvikvm( 1730): GC freed 267 objects / 296048 bytes in 83ms
D/dalvikvm( 1730): GC freed 2730 objects / 319568 bytes in 100ms
W/Rosie ( 169): mAddHtcWidgetByOtherActivity = false, mIsOpenSlideWhenLeaveLaunch = true
D/dalvikvm( 1730): GC freed 4003 objects / 289608 bytes in 105ms
D/AndroidRuntime( 1730): Shutting down VM
W/dalvikvm( 1730): threadid=3: thread exiting with uncaught exception (group=0x4001e390)
E/AndroidRuntime( 1730): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 1730): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebook.stream/com.facebook.stream.App}: java.lang.NullPointerException
E/AndroidRuntime( 1730): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
E/AndroidRuntime( 1730): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
E/AndroidRuntime( 1730): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
E/AndroidRuntime( 1730): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
E/AndroidRuntime( 1730): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1730): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1730): at android.app.ActivityThread.main(ActivityThread.java:4595)
E/AndroidRuntime( 1730): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1730): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1730): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 1730): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 1730): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1730): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 1730): at com.facebook.stream.StreamRenderer.renderComment(StreamRenderer.java:488)
E/AndroidRuntime( 1730): at com.facebook.stream.StreamRenderer.renderComments(StreamRenderer.java:475)
E/AndroidRuntime( 1730): at com.facebook.stream.StreamRenderer.renderPost(StreamRenderer.java:163)
E/AndroidRuntime( 1730): at com.facebook.stream.StreamRenderer.doRender(StreamRenderer.java:121)
E/AndroidRuntime( 1730): at com.facebook.stream.StreamRenderer.render(StreamRenderer.java:47)
E/AndroidRuntime( 1730): at com.facebook.stream.StreamHandler.go(StreamHandler.java:58)
E/AndroidRuntime( 1730): at com.facebook.stream.Dispatcher.runHandler(Dispatcher.java:86)
E/AndroidRuntime( 1730): at com.facebook.stream.App.onCreate(App.java:55)
E/AndroidRuntime( 1730): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 1730): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
E/AndroidRuntime( 1730): ... 11 more
I/Process ( 99): Sending signal. PID: 1730 SIG: 3
I/dalvikvm( 1730): threadid=7: reacting to signal 3
I/dalvikvm( 1730): Wrote stack trace to '/data/anr/traces.txt'
I/ActivityManager( 99): Launch activity, postpone broadcast intents
I/Process ( 1730): Sending signal. PID: 1730 SIG: 9
I/ActivityManager( 99): Process com.facebook.stream (pid 1730) has died.
E/ActivityManager( 99): fail to set top app changed!
D/ViewFlipper( 169): updateRunning() mVisible=false, mStarted=true, mUserPresent=true, mRunning=false
D/ViewFlipper( 169): updateRunning() mVisible=true, mStarted=true, mUserPresent=true, mRunning=true
I/UsageStats( 99): Unexpected resume of com.htc.launcher while already resumed in com.facebook.stream
W/InputManagerService( 99): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@447427c8
W/dalvikvm( 99): disableGcForExternalAlloc: false
D/dalvikvm( 150): GC freed 866 objects / 171488 bytes in 325ms
W/dalvikvm( 99): disableGcForExternalAlloc: true

from facebook-android-sdk.

soneff avatar soneff commented on April 19, 2024

Interesting, it looks like the cached stream data is corrupted or incomplete. The easiest way to fix it might be to simply uninstall the app and reload it on the device / emulator, this will clear the cached data.

However, before you do that, to find the root cause of the problem, could you do the following to help debug: add "Log.d("Cached Data", cached);" on line 56 of StreamHandler.java (immediately after "String cached = FileIO.read(getActivity(), CACHE_FILE);" ... then email me the cached data that it prints to the log? (ssoneff at facebook)

Thanks for pointing this out.

from facebook-android-sdk.

skelink2 avatar skelink2 commented on April 19, 2024

I emailed you the .apk.

from facebook-android-sdk.

daen avatar daen commented on April 19, 2024

I have the same issue.

from facebook-android-sdk.

daen avatar daen commented on April 19, 2024

hi soneff ,
I have this issue even when i has remove this application , install , run the application and login again.

But when I add the following code, I found the problem seems to be fixed.

StreamRenderer.renderComment(StreamRenderer.java 488)

if(from != null){
String authorId = from.optString("id");
String authorName = from.optString("name");
String message = comment.optString("message");
append("<div class="comment">");
renderAuthor(authorId, authorName);
String[] chunks = {
" ",
message,
""
};
append(chunks);
}

from facebook-android-sdk.

Aaron80b avatar Aaron80b commented on April 19, 2024

I had the same issue and daen's fix worked for the stream app for me as well!

from facebook-android-sdk.

soneff avatar soneff commented on April 19, 2024

Ya, adding a null check will fix it, but it's not really a general solution (the data shouldn't have null values in the first place). If you could apply the logging trick I mentioned above (Log.d("Cached Data", cached); ... on line 56 of StreamHandler.java, right after reading the cached data) when you reproduce the issue, and can send the log to me, it would be helpful to fix this on the server and prevent the error.

from facebook-android-sdk.

soneff avatar soneff commented on April 19, 2024

I was able to reproduce this and it is a server-side problem: I'll look into a quick fix or will patch the SDK with the null check. Thanks for your feedback.

from facebook-android-sdk.

soneff avatar soneff commented on April 19, 2024

This should be fixed now.

from facebook-android-sdk.

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.