Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
04/06/12 01:32 PM (13 years ago)

error report showing in Developer console

here are the lish of error show in android market developer console Old WindowManager$BadTokenException in ViewRoot.setView() 30 reports 30 reports/week Old NullPointerException in BT_viewUtilities.updateBackgroundColorsForScreen() 26 reports 26 reports/week Old IllegalArgumentException in WindowManagerImpl.findViewLocked() 18 reports 18 reports/week Old WindowManager$BadTokenException [12:09:26 AM] Yeshu Agarwal: ANR keyDispatchingTimedOut in BT_screen_menuListSimple [12:09:54 AM] Yeshu Agarwal: NullPointerException in BT_viewUtilities.updateBackgroundColorsForScreen() 21 reports 21 reports/week Old WindowManager$BadTokenException in ViewRoot.setView() 8 reports 8 reports/week Old IllegalArgumentException in WindowManagerImpl.findViewLocked() Please Help, .. . . . . someone had told me that about 50% of those errors are because of poor compiling procedures, the other 50% are more than likely bad setup within buzztouch ............ Please Help i would like you to know that my app "Hackers Home Pro" is in the top 5 list in Appbrain made through buzztouch http://www.appbrain.com/apps/hot/ So please Help, I would very helpful
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 07:18 AM (13 years ago)
I'll take a guess, Your app is BTv1.5 Correct? Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 07:19 AM (13 years ago)
No its 2.0
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 07:24 AM (13 years ago)
Surprising, which screens are you using? Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 07:32 AM (13 years ago)
I am using common screens like custom html / test, menu simple, HTML doc, custom url, splash screen, log-in screen,send email, launch native app. This problem is happening not only in single application. . . my all the application are having same problem. .
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 07:50 AM (13 years ago)
Can you send me the .apk? Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 08:00 AM (13 years ago)
i have send you the mail also you can find it from here http://www.mediafire.com/?qhqknv4e1g6950v
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 08:22 AM (13 years ago)
It's not crashing, do you know what action causes it to crash? Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 08:31 AM (13 years ago)
Below are the situation when the force close appear 1. When the application is un-properly closed 2. to see next force close first go to Advance Learning>Why Activation then go back and select Start Learning Advance (Which Is Locked) there a force close comes
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 08:35 AM (13 years ago)
can we fix above two bugs ?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 12:36 PM (13 years ago)
Tried on a 2.2.1 & 2.3.6 device no problem. Would recommend Wheel of Death and Install to SD card solution. What device are you testing on? Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 12:53 PM (13 years ago)
I have tested in Both 2.3.4 (Xperia Arc S) and 2.3.7 (Xperia ray)showing me same problem after Installation to SD card. what is Wheel of Death ?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 03:00 PM (13 years ago)
Find the solution at www.myskylla.wordpress.com Go to index. If you recently download ed your source code from an up to date configuration it's not necessary. You need it. It solves the Wheel of Death when you access an URL Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 03:26 PM (13 years ago)
ok thanks . . i have followed all the steps but now also same problem Below are the situation when the force close appear 1. When the application is un-properly closed 2. to see next force close first go to Advance Learning>Why Activation then go back and select Start Learning Advance (Which Is Locked) there a force close comes can i give you the source code, so that you can find what is the problem ?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/07/12 03:41 PM (13 years ago)
You could but I'm not a programer so it would not be of much use. I solve problems by seeing patterns in the process. Your problem I haven't seen before and wasn't fixed by the two primary causes. SD card and Wheel of Death Not sure what's the next step. Try running in Eclipse on the emulator using the tools available. Fred
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/07/12 05:14 PM (13 years ago)
ok no problem, just try.. . . may be you can, I have send you the mail, please check it out :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/09/12 10:58 PM (13 years ago)
"Unproperly closed" is the important clue here. In looking at the data pasted in the first post it appears the BT_viewUtilities.updateBackgroundColorsForScreen() is looking for a view or a resource that does not exist (NullPointerException). I'm not sure where this comes from: "someone had told me that about 50% of those errors are because of poor compiling procedures, the other 50% are more than likely bad setup within buzztouch" Poor compiling procedures? Bad setup within buzztouch? Not sure how this is related to a NullPointerException so I'll ignore it. I would debug like this: a) Open the BT_viewUtilities.java file in an editor. b) Look at the updateBackgroundColorsForScreen method. Comment out EVERYTHING in this method so it's an "empty method." Because this method doesn't return anything (void) it can be a simple method description with no body, like this... public static void updateBackgroundColorsForScreen(final Activity theActivity, final BT_item theScreenData){ //commented out code here.. } c) Compile, run. Can you reproduce the problem with this method commented out? If you cannot, then we know the issue is in this method somewhere. If you can, we'll need to figure out a different plan. In looking at this method, it is looking for two views that exist in the Activity that's calling the method. This will be the activity that is visible when the app re-launches. This will be the .java file for the plugin. Like BT_screen_htmlDoc.java or BT_screen_map.java, whatever .java file is used for the plugin that is on the screen when the app is re-launched. So, when this Activity fires the updateBackgroundColorsForScreen() method it passed in two things. Itself (as the Activity) and the apps theme data (the JSON data for the app's theme). The updateBackgroundColorsForScreen() method then determines which colors to use for the background. Once the colors are figured out, it applies those colors to the gradient or solid color view in the Activity. All the activities have these two "empty" views set so they can be colored when screens load. If it cannot find the view to apply the color to, it would produce a NullPointerException. Guessing here but I'll bet that's the case. I say this because of the symptom. "Not shut down" properly is the clue. Android handles all sorts of onResume, onPause, onStart (tons of them) in specific order and it's possible that it's trying to apply a background to an Activities view "too early" before the operating system finishes loading the view. Dunno. Re-post your findings, this is good find and it'll be interesting to sleuth out the fix.
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/10/12 07:19 AM (13 years ago)
@David Thanks for the reply, I have followed the steps which you have given above but no positive result have came. By doing Comment out I have saw that all the custom html screen are turned to black. Now no text are visible. You can find my source code from here http://www.mediafire.com/?npcdsewszqzg9da I have also download fresh source code from BT but same problems are coming so i think that adding external jars does not effect it. Same List of bugs :- 1. Crash Error :- a)Application crashes on starting of the app if there has been an unproper close or running in background more than 20 min. b) to see next force close first go to Advance Learning>Why Activation then go back and select Start Learning Advance (Which Is Locked) there a force close comes, means after opening any a text document (screen_customhtml) when we try to go or open a screen with a popup message. application crashes. you can find another example by going updates logs then go back and select donate option. there you will see a force close. Here is my log .. . . . 04-10 19:25:34.991: E/AndroidRuntime(4365): FATAL EXCEPTION: main 04-10 19:25:34.991: E/AndroidRuntime(4365): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@2b187960 is not valid; is your activity running? 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.view.ViewRoot.setView(ViewRoot.java:546) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.view.Window$LocalWindowManager.addView(Window.java:424) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.app.Dialog.show(Dialog.java:241) 04-10 19:25:34.991: E/AndroidRuntime(4365): at com.hackershome2.BT_activity_base.showAlertFromClass(BT_activity_base.java:308) 04-10 19:25:34.991: E/AndroidRuntime(4365): at com.hackershome2.BT_act_controller.loadScreenObject(BT_act_controller.java:122) 04-10 19:25:34.991: E/AndroidRuntime(4365): at com.hackershome2.BT_screen_menuListSimple$2.onItemClick(BT_screen_menuListSimple.java:430) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.widget.AdapterView.performItemClick(AdapterView.java:288) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.widget.ListView.performItemClick(ListView.java:3514) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1908) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.os.Handler.handleCallback(Handler.java:587) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.os.Handler.dispatchMessage(Handler.java:92) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.os.Looper.loop(Looper.java:130) 04-10 19:25:34.991: E/AndroidRuntime(4365): at android.app.ActivityThread.main(ActivityThread.java:3701) 04-10 19:25:34.991: E/AndroidRuntime(4365): at java.lang.reflect.Method.invokeNative(Native Method) 04-10 19:25:34.991: E/AndroidRuntime(4365): at java.lang.reflect.Method.invoke(Method.java:507) 04-10 19:25:34.991: E/AndroidRuntime(4365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 04-10 19:25:34.991: E/AndroidRuntime(4365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 04-10 19:25:34.991: E/AndroidRuntime(4365): at dalvik.system.NativeStart.main(Native Method) 04-10 19:25:35.061: D/dalvikvm(4365): GC_FOR_MALLOC freed 672K, 48% free 4116K/7815K, external 2220K/2612K, paused 55ms 04-10 19:25:52.661: D/AndroidRuntime(4421): Shutting down VM 04-10 19:25:52.661: W/dalvikvm(4421): threadid=1: thread exiting with uncaught exception (group=0x2aac8578) 04-10 19:25:52.661: E/AndroidRuntime(4421): FATAL EXCEPTION: main 04-10 19:25:52.661: E/AndroidRuntime(4421): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hackershome2/com.hackershome2.BT_screen_menuListSimple}: java.lang.NullPointerException 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread.access$1500(ActivityThread.java:121) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.os.Handler.dispatchMessage(Handler.java:99) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.os.Looper.loop(Looper.java:130) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread.main(ActivityThread.java:3701) 04-10 19:25:52.661: E/AndroidRuntime(4421): at java.lang.reflect.Method.invokeNative(Native Method) 04-10 19:25:52.661: E/AndroidRuntime(4421): at java.lang.reflect.Method.invoke(Method.java:507) 04-10 19:25:52.661: E/AndroidRuntime(4421): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 04-10 19:25:52.661: E/AndroidRuntime(4421): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 04-10 19:25:52.661: E/AndroidRuntime(4421): at dalvik.system.NativeStart.main(Native Method) 04-10 19:25:52.661: E/AndroidRuntime(4421): Caused by: java.lang.NullPointerException 04-10 19:25:52.661: E/AndroidRuntime(4421): at com.hackershome2.BT_viewUtilities.getNavBarForScreen(BT_viewUtilities.java:47) 04-10 19:25:52.661: E/AndroidRuntime(4421): at com.hackershome2.BT_screen_menuListSimple.onCreate(BT_screen_menuListSimple.java:119) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 04-10 19:25:52.661: E/AndroidRuntime(4421): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623) 04-10 19:25:52.661: E/AndroidRuntime(4421): ... 11 more
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/10/12 11:16 AM (13 years ago)
The test DID help, it tells you that the method we were suspect of is indeed where the trouble lies. In other words, the problem is in the updateBackgroundColorsForScreen() method. Notes: Downloading another version of your project will not magically fix anything, the fix is needed in the .java source code, not the download process. If we find the solution we'll happily update the download process so it's "permanent." Error Logs: Don't bother posting the long error reports you're seeing in Eclipse. If the app is crashing, it's because the updateBackgroundColorsForScreen() in your app has the issue - we already know this. At this point it will be a matter of... a) Confirming that commenting out the code in the updateBackgroundColorsForScreen() method prevents the app from crashing (of course you'll also have black screen and no other content, the code is commented out). b) Uncommenting the code in the updateBackgroundColorsForScreen() method strategically while you debug. This could get tedious but it's important to isolate where the trouble is. Each time you make an adjustment you'll need to see if it prevents / causes the crash. The good news is that this method is very very short. In fact, I would start by uncommenting the code in that method again, then making one small adjustment to prevent the code from trying to modify the background color (we think this is crashing it)... On line 59 it reads: if(backgroundColor.length() > 5){ Change this to: if(backgroundColor.length() > 5 && 1 > 2){ And see if it fixes it. All you're doing here is saying "and one is more than two" which will never be true. This in essenence will prevent the background colors from updating. This is what we want. If the background colors don't update, and the app doesn't crash, we'll know in more details that thats the issue. Debugging and tracing .java issues is tough if you don't have an understanding of how this all works. Because I can't replicate the problem on any devices here it's very tough to help. You'll end up learning a bit during the process but that's kinda the point - right?
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/11/12 11:56 AM (13 years ago)
Sorry for late reply . . and thanks for your help but still it is not working. I have changed if(backgroundColor.length() > 5){ to: if(backgroundColor.length() > 5 && 1 > 2){ Still there is same problem . ..
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/11/12 11:36 PM (13 years ago)
@Yash Kumar: Lets do this: Zip up your project (the entire Android Project) and email it to david 'at' buzztouch.com I'll get it figured out ;-)
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/12/12 06:23 AM (13 years ago)
thanks .. . .send the mail . . check it out :)
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/13/12 03:07 AM (13 years ago)
Guys Problem Solved .. . . . Thanks to David Sir I am sharing the way how the problem was fixed . . . . The Problem was in the showAlertFromClass() in the BT_activity_base.java file. a) Find bt_activity_base.java b) Scroll to about line 296 and look at the showAlertFromClass method(). Now Replace .............................................................................. public static void showAlertFromClass(String theTitle, String theMessage){ if(theTitle == "") theTitle = "No Alert Title?"; if(theMessage == "") theMessage = "No alert message?"; final AlertDialog theAlert = new AlertDialog.Builder(thisActivity).create(); theAlert.setTitle(theTitle); theAlert.setMessage(theMessage); theAlert.setIcon(R.drawable.icon); theAlert.setCancelable(false); theAlert.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { theAlert.dismiss(); } }); theAlert.show(); } .............................................................................. to ............................................................................... public static void showAlertFromClass(String theTitle, String theMessage){ if(theTitle == "") theTitle = "No Alert Title?"; if(theMessage == "") theMessage = "No alert message?"; final AlertDialog theAlert = new AlertDialog.Builder(thisActivity).create(); theAlert.setTitle(theTitle); theAlert.setMessage(theMessage); theAlert.setIcon(R.drawable.icon); theAlert.setCancelable(false); theAlert.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { ((DialogInterface) theAlert).dismiss(); } }); try{ theAlert.show(); }catch(Exception e){ BT_debugger.showIt("BT_activity_base:showAlertFromClass " + e.toString()); } } .................................................................................... HOWEVER. The "log in required" message will not show if you navigate in that order.
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
04/21/12 11:44 PM (13 years ago)
I think there is problem in BT_act_controller.java line no. 121 thats why The "log in required" message is now showing !!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.