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

added debug button #15

Merged
merged 6 commits into from
Jun 5, 2014
Merged

added debug button #15

merged 6 commits into from
Jun 5, 2014

Conversation

dmitrycrocodilys
Copy link

No description provided.

@johannbarbie
Copy link
Member

Hi Dimitry,

I'm having this exception when I try to press the "Debug On" button:

D/StatusBarPolicy( 1377): ABSENT no DATA_CONNECTED
D/WindowManager( 1377): HapticFeedbackConstants.CLICK
V/webcore ( 3683): SET_ACTIVE arg1=0 arg2=0 obj=null
W/dalvikvm( 3683): threadid=1: thread exiting with uncaught exception (group=0x40020ac0)
E/AndroidRuntime( 3683): FATAL EXCEPTION: main
E/AndroidRuntime( 3683): java.lang.NoSuchMethodError: org.btc4all.btc2sms.ui.LogView.invalidateOptionsMenu
E/AndroidRuntime( 3683): at org.btc4all.btc2sms.ui.LogView.onOptionsItemSelected(LogView.java:437)
E/AndroidRuntime( 3683): at android.app.Activity.onMenuItemSelected(Activity.java:2195)
E/AndroidRuntime( 3683): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:741)
E/AndroidRuntime( 3683): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
E/AndroidRuntime( 3683): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
E/AndroidRuntime( 3683): at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
E/AndroidRuntime( 3683): at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
E/AndroidRuntime( 3683): at android.view.View$PerformClick.run(View.java:8960)
E/AndroidRuntime( 3683): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 3683): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 3683): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3683): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 3683): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3683): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3683): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
E/AndroidRuntime( 3683): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
E/AndroidRuntime( 3683): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1377): Force finishing activity org.btc4all.btc2sms/.ui.LogView

@dmitrycrocodilys
Copy link
Author

I've found the problem. Solving now.

@johannbarbie
Copy link
Member

hi Dimitry,

i found another exception when I change the layout (turn phone), i get this:

I/ActivityManager( 1377): Config changed: { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=2/1/1 nav=2/1 orien=1 layout=17 uiMode=17 seq=140}
I/UsageStats( 1377): Unexpected resume of org.btc4all.btc2sms while already resumed in org.btc4all.btc2sms
I/#LGIME ( 1473): ### onConfigurationChanged
D/PhoneApp( 1478): updateProximitySensorMode: state = IDLE
D/brighthy_log: [BRIGHTHY] Enter ACTION_CONFIGURATION_CHANGED
W/dalvikvm( 6716): threadid=1: thread exiting with uncaught exception (group=0x40020ac0)
I/#LGIME ( 1473): #### onStartInput: restarting=true, fieldId=-1
V/xt9input_alpha_data( 1473): alpha_data::setLanguage(0x109):set...ok
E/AndroidRuntime( 6716): FATAL EXCEPTION: main
E/AndroidRuntime( 6716): java.lang.RuntimeException: Unable to destroy activity {org.btc4all.btc2sms/org.btc4all.btc2sms.ui.LogView}: java.lang.IllegalArgumentException: Receiver not registered: org.btc4all.btc2sms.ui.LogView$1@44f0d670
E/AndroidRuntime( 6716): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3655)
E/AndroidRuntime( 6716): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3673)
E/AndroidRuntime( 6716): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3789)
E/AndroidRuntime( 6716): at android.app.ActivityThread.access$2400(ActivityThread.java:125)
E/AndroidRuntime( 6716): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2037)
E/AndroidRuntime( 6716): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6716): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 6716): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 6716): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6716): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 6716): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
E/AndroidRuntime( 6716): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
E/AndroidRuntime( 6716): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 6716): Caused by: java.lang.IllegalArgumentException: Receiver not registered: org.btc4all.btc2sms.ui.LogView$1@44f0d670
E/AndroidRuntime( 6716): at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:793)
E/AndroidRuntime( 6716): at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:847)
E/AndroidRuntime( 6716): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331)
E/AndroidRuntime( 6716): at org.btc4all.btc2sms.ui.LogView.onDestroy(LogView.java:404)
E/AndroidRuntime( 6716): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3642)
E/AndroidRuntime( 6716): ... 12 more
W/ActivityManager( 1377): Force finishing activity org.btc4all.btc2sms/.ui.LogView

any idea what is happening?

@johannbarbie
Copy link
Member

I start the app, wait for load screen, eventually the login screen comes. I click the first input field, but it's not getting focused, I can not type anything and the keyboard does not come up. I researched and found that the problem is related to focus. this article explains it: http://stackoverflow.com/questions/2083909/why-is-android-webview-refusing-user-input

@dmitrycrocodilys
Copy link
Author

When debug mode on in log i've read this message:
Error establishing real-time connection:
java.netUnknowHostException:Host is unresolved: https://37coins.com
I think, you should change AMPQ host, that comes from JS (f.e. for https://www.37coins.com)

@dmitrycrocodilys
Copy link
Author

I can't reproduce bug with focus. So, i made changes as described at stackoverflow

@johannbarbie
Copy link
Member

hi Dimitry,

this looks much better already. The only thing that is strange is the options menu on the debug view.

On the web view, the menu looks good:
2014-05-14

On the debug view, all the buttons that should be removed are back:
2014-05-14 1

@johannbarbie
Copy link
Member

Debugging on an old phone, I found that the app always crashes.

I see one line in there: "Unexpected resume of packagename while already resumed". Which seems to be related to view interaction. I'm not sure yet, will research more.

I/ActivityManager( 1184): Displayed activity org.btc4all.btc2sms/.ui.LogView: 317 ms (total 601 ms)
D/iddd ( 1116): Save start
D/iddd ( 1116): Save end
D/dalvikvm( 1641): GC freed 704 objects / 29392 bytes in 130ms
D/dalvikvm( 3412): GC freed 5373 objects / 305120 bytes in 64ms
D/dalvikvm( 3412): Trying to load lib /system/lib/libDxDrmJava.so 0x0
D/dalvikvm( 3412): Added shared lib /system/lib/libDxDrmJava.so 0x0
D/DxDrmJavaWrap( 3412): enter JNI_OnLoad()
D/DxDrmJavaWrap( 3412): Pool was allocated at address: 0x45594f98
D/DxDrmJavaWrap( 3412): exit JNI_OnLoad(65540)
D/dalvikvm( 1539): GC freed 299 objects / 17664 bytes in 88ms
D/dalvikvm( 1718): GC freed 792 objects / 40232 bytes in 124ms
I/ActivityManager( 1184): Process android.process.media (pid 3314) has died.
I/ActivityManager( 1184): Process com.google.android.apps.uploader (pid 1784) has died.
I/DEBUG ( 3397): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 3397): Build fingerprint: 'SEMC/U20i_1245-6257/U20i/delta:2.1-update1/2.0.2.A.0.24/GABE:user/release-keys'
I/DEBUG ( 3397): pid: 3412, tid: 3419 >>> org.btc4all.btc2sms <<<
I/DEBUG ( 3397): signal 11 (SIGSEGV), fault addr 00000030
I/DEBUG ( 3397): r0 00000000 r1 009023cc r2 00000000 r3 00000000
I/DEBUG ( 3397): r4 4745dab4 r5 00000000 r6 009023cc r7 00000000
I/DEBUG ( 3397): r8 4745eda0 r9 4185ff1c 10 4185ff04 fp 00140e50
I/DEBUG ( 3397): ip 00000000 sp 4745da10 lr aa0fa693 pc aa0fa66a cpsr 00000030
I/DEBUG ( 3397): #00 pc 000fa66a /system/lib/libwebcore.so
I/DEBUG ( 3397): #1 pc 000fa68e /system/lib/libwebcore.so
I/DEBUG ( 3397): #2 pc 00100a72 /system/lib/libwebcore.so
I/DEBUG ( 3397): #3 pc 000fb190 /system/lib/libwebcore.so
I/DEBUG ( 3397): #4 pc 000fa4ae /system/lib/libwebcore.so
I/DEBUG ( 3397): #5 pc 0016432a /system/lib/libwebcore.so
I/DEBUG ( 3397): #6 pc 001651a4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #7 pc 00130f8c /system/lib/libwebcore.so
I/DEBUG ( 3397): #8 pc 00131ba0 /system/lib/libwebcore.so
I/DEBUG ( 3397): #9 pc 00132e62 /system/lib/libwebcore.so
I/DEBUG ( 3397): #10 pc 0012e028 /system/lib/libwebcore.so
I/DEBUG ( 3397): #11 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #12 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #13 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #14 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #15 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #16 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #17 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #18 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #19 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #20 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #21 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #22 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #23 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #24 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #25 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #26 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #27 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #28 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397): #29 pc 00123360 /system/lib/libwebcore.so
I/DEBUG ( 3397): #30 pc 0012d9f4 /system/lib/libwebcore.so
I/DEBUG ( 3397): #31 pc 0012e034 /system/lib/libwebcore.so
I/DEBUG ( 3397):
I/DEBUG ( 3397): code around pc:
I/DEBUG ( 3397): aa0fa658 1c03b510 69401c0a f0001c19 bd10fa81
I/DEBUG ( 3397): aa0fa668 6b03b510 2b001c04 2200d107 fa78f000
I/DEBUG ( 3397):
I/DEBUG ( 3397): code around lr:
I/DEBUG ( 3397): aa0fa680 6b206320 46c0bd10 1c01b510 f7ff6940
I/DEBUG ( 3397): aa0fa690 bd10ffeb 6942b570 1c0c1c05 d0042a00
I/DEBUG ( 3397): aa0fa6a0 30401c10 2b007803 6963d125 d0242b00
I/DEBUG ( 3397):
I/DEBUG ( 3397): stack:
I/DEBUG ( 3397): 4745d9d0 00000001
I/DEBUG ( 3397): 4745d9d4 aa2a7985 /system/lib/libwebcore.so
I/DEBUG ( 3397): 4745d9d8 4745da2c
I/DEBUG ( 3397): 4745d9dc 00000001
I/DEBUG ( 3397): 4745d9e0 00001e00
I/DEBUG ( 3397): 4745d9e4 00000000
I/DEBUG ( 3397): 4745d9e8 009076d0 [heap]
I/DEBUG ( 3397): 4745d9ec 00000105
I/DEBUG ( 3397): 4745d9f0 009023cc [heap]
I/DEBUG ( 3397): 4745d9f4 008a5580 [heap]
I/DEBUG ( 3397): 4745d9f8 00000001
I/DEBUG ( 3397): 4745d9fc 00000000
I/DEBUG ( 3397): 4745da00 00000001
I/DEBUG ( 3397): 4745da04 00000000
I/DEBUG ( 3397): 4745da08 df002777
I/DEBUG ( 3397): 4745da0c e3a070ad
I/DEBUG ( 3397): #00 4745da10 4745dab4
I/DEBUG ( 3397): 4745da14 aa0fa693 /system/lib/libwebcore.so
I/DEBUG ( 3397): #1 4745da18 4745dab4
I/DEBUG ( 3397): 4745da1c aa100a77 /system/lib/libwebcore.so
I/ActivityManager( 1184): Process org.btc4all.btc2sms (pid 3412) has died.
I/WindowManager( 1184): WIN DEATH: Window{45769388 org.btc4all.btc2sms/org.btc4all.btc2sms.ui.LogView paused=false}
I/UsageStats( 1184): Unexpected resume of com.sonyericsson.homescreen while already resumed in org.btc4all.btc2sms
I/DEBUG ( 3397): debuggerd committing suicide to free the zombie!
D/Zygote ( 1097): Process 3412 terminated by signal (11)
I/DEBUG ( 3428): debuggerd: Dec 6 2010 20:48:16
W/InputManagerService( 1184): Got RemoteException sending setActive(false) notification to pid 3412 uid 10080
I/TouchPal( 1262): density = 0.75
I/TouchPal( 1262): scaledDensity = 0.75
I/TouchPal( 1262): widthPixels = 240
I/TouchPal( 1262): heightPixels = 320
I/TouchPal( 1262): xdpi = 160.42105
I/TouchPal( 1262): ydpi = 159.37254
I/TouchPal( 1262): fontScale = 1.0
I/TouchPal( 1262): hardKeyboardHidden = 2
I/TouchPal( 1262): keyboard = 2
I/TouchPal( 1262): keyboardHidden = 1
I/TouchPal( 1262): navigation = 1
I/TouchPal( 1262): orientation = 1
I/TouchPal( 1262): touchscreen = 3
I/TouchPal( 1262): locale = English (United States)
I/TouchPal( 1262): packageName = com.sonyericsson.homescreen
I/TouchPal( 1262): actionId = 0
I/TouchPal( 1262): actionLabel = null
I/TouchPal( 1262): imeOptions= 0
I/TouchPal( 1262): restarting= false
I/TouchPal( 1262): -

@dmitrycrocodilys
Copy link
Author

I thought that this options should appear in debug view. Ok, i'll revome them from menu. Where they should be? Or nowhere?

@johannbarbie
Copy link
Member

nowhere is fine, the views are irrelevant for our usecases. (sry for the late response, I was traveling in Philippines without internet)

@johannbarbie
Copy link
Member

testing on LG-C550, with android 2.2.2 found following exception

E/AndroidRuntime(29244): FATAL EXCEPTION: main
E/AndroidRuntime(29244): java.lang.RuntimeException: Error receiving broadcast Intent { act=org.envaya.sms.LOG_CHANGED } in org.btc4all.btc2sms.ui.LogView$1@44e59190
E/AndroidRuntime(29244): at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:905)
E/AndroidRuntime(29244): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(29244): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(29244): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(29244): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(29244): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(29244): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(29244): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
E/AndroidRuntime(29244): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
E/AndroidRuntime(29244): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(29244): Caused by: java.lang.NullPointerException
E/AndroidRuntime(29244): at org.btc4all.btc2sms.ui.LogView.updateLogView(LogView.java:117)
E/AndroidRuntime(29244): at org.btc4all.btc2sms.ui.LogView$1.onReceive(LogView.java:36)
E/AndroidRuntime(29244): at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:892)
E/AndroidRuntime(29244): ... 9 more
I/global (29244): Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.
I/global (29244): Default buffer size used in BufferedOutputStream constructor. It would be better to be explicit if an 8k buffer is required.
W/ActivityManager( 1389): Force finishing activity org.btc4all.btc2sms/.ui.LogView
W/ActivityManager( 1389): Force finishing activity org.btc4all.btc2sms/.ui.Main

johannbarbie added a commit that referenced this pull request Jun 5, 2014
fixed crashes involving debug button.
@johannbarbie johannbarbie merged commit 0a1e9dc into 37coins:master Jun 5, 2014
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

Successfully merging this pull request may close these issues.

2 participants