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

Stream app stopped working #21

Closed
skelink2 opened this issue Jun 4, 2010 · 10 comments
Closed

Stream app stopped working #21

skelink2 opened this issue Jun 4, 2010 · 10 comments

Comments

@skelink2
Copy link

skelink2 commented Jun 4, 2010

I tried relaunching the stream app on my HTC Hero running Android 2.1 and I now get 'Force-Close' error. I think that running both the Facebook HTC App with 'Account Sync' 'On' is causing this issue. I cannot replicate this emulator running 2.1. (Normally I would attach the logcat log but right now I have connectivity issues having it show up.

@soneff
Copy link

soneff commented Jun 4, 2010

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

@skelink2
Copy link
Author

skelink2 commented Jun 4, 2010

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

@soneff
Copy link

soneff commented Jun 4, 2010

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.

@skelink2
Copy link
Author

skelink2 commented Jun 4, 2010

I emailed you the .apk.

@daen
Copy link

daen commented Jun 11, 2010

I have the same issue.

@daen
Copy link

daen commented Jun 11, 2010

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);
}

@Aaron80b
Copy link

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

@soneff
Copy link

soneff commented Jun 14, 2010

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.

@soneff
Copy link

soneff commented Jun 17, 2010

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.

@soneff
Copy link

soneff commented Jun 18, 2010

This should be fixed now.

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

No branches or pull requests

4 participants