FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
01/22/15 11:34 AM (9 years ago)

App Crashing

im getting problem with my app on live device galaxy s3, keeps crashing when refreshing all data, tried it on galaxy s5, works fine, been all through the images, put them all in all folders, made sure nothing over 100kb, heres the logcat, all in red, 01-22 15:54:16.928: E/WindowManager(4296): Activity com.uktheatres.BT_activity_host has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41429840 V.E..... R.....ID 0,0-480,243} that was originally added here 01-22 15:54:16.928: E/WindowManager(4296): android.view.WindowLeaked: Activity com.uktheatres.BT_activity_host has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41429840 V.E..... R.....ID 0,0-480,243} that was originally added here 01-22 15:54:16.928: E/WindowManager(4296): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:409) 01-22 15:54:16.928: E/WindowManager(4296): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:218) 01-22 15:54:16.928: E/WindowManager(4296): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.Dialog.show(Dialog.java:281) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.ProgressDialog.show(ProgressDialog.java:116) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.ProgressDialog.show(ProgressDialog.java:99) 01-22 15:54:16.928: E/WindowManager(4296): at com.uktheatres.BT_fragment.showProgress(BT_fragment.java:306) 01-22 15:54:16.928: E/WindowManager(4296): at com.uktheatres.BT_fragment_load_config_data.loadAppConfigDataAfterDelay(BT_fragment_load_config_data.java:102) 01-22 15:54:16.928: E/WindowManager(4296): at com.uktheatres.BT_fragment_load_config_data.onCreateView(BT_fragment_load_config_data.java:88) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.Fragment.performCreateView(Fragment.java:1699) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:885) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.BackStackRecord.run(BackStackRecord.java:694) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1435) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:441) 01-22 15:54:16.928: E/WindowManager(4296): at android.os.Handler.handleCallback(Handler.java:800) 01-22 15:54:16.928: E/WindowManager(4296): at android.os.Handler.dispatchMessage(Handler.java:100) 01-22 15:54:16.928: E/WindowManager(4296): at android.os.Looper.loop(Looper.java:194) 01-22 15:54:16.928: E/WindowManager(4296): at android.app.ActivityThread.main(ActivityThread.java:5371) 01-22 15:54:16.928: E/WindowManager(4296): at java.lang.reflect.Method.invokeNative(Native Method) 01-22 15:54:16.928: E/WindowManager(4296): at java.lang.reflect.Method.invoke(Method.java:525) 01-22 15:54:16.928: E/WindowManager(4296): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 01-22 15:54:16.928: E/WindowManager(4296): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 01-22 15:54:16.928: E/WindowManager(4296): at dalvik.system.NativeStart.main(Native Method) any pointers would be appreciated guys thanks sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/22/15 12:30 PM (9 years ago)
If this is the same thing, I hope somebody else knows how to fix it; I don't! http://stackoverflow.com/questions/2850573/activity-has-leaked-window-that-was-originally-added
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/23/15 02:09 AM (9 years ago)
hi guys, ive taken all images out of the first screen in my app, the plugin is menu with image,but im atill getting the crash on refreshing, has anybody any idea where im going wrong, 01-23 08:58:58.579: E/WindowManager(11333): Activity com.uktheatres.BT_activity_host has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{4447ec00 V.E..... R.....ID 0,0-684,324} that was originally added here 01-23 08:58:58.579: E/WindowManager(11333): android.view.WindowLeaked: Activity com.uktheatres.BT_activity_host has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{4447ec00 V.E..... R.....ID 0,0-684,324} that was originally added here 01-23 08:58:58.579: E/WindowManager(11333): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:452) 01-23 08:58:58.579: E/WindowManager(11333): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:258) 01-23 08:58:58.579: E/WindowManager(11333): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:73) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.Dialog.show(Dialog.java:287) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.ProgressDialog.show(ProgressDialog.java:116) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.ProgressDialog.show(ProgressDialog.java:99) 01-23 08:58:58.579: E/WindowManager(11333): at com.uktheatres.BT_fragment.showProgress(BT_fragment.java:306) 01-23 08:58:58.579: E/WindowManager(11333): at com.uktheatres.BT_fragment_load_config_data.loadAppConfigDataAfterDelay(BT_fragment_load_config_data.java:102) 01-23 08:58:58.579: E/WindowManager(11333): at com.uktheatres.BT_fragment_load_config_data.onCreateView(BT_fragment_load_config_data.java:88) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.Fragment.performCreateView(Fragment.java:1699) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:903) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1075) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.BackStackRecord.run(BackStackRecord.java:682) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1455) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:441) 01-23 08:58:58.579: E/WindowManager(11333): at android.os.Handler.handleCallback(Handler.java:730) 01-23 08:58:58.579: E/WindowManager(11333): at android.os.Handler.dispatchMessage(Handler.java:92) 01-23 08:58:58.579: E/WindowManager(11333): at android.os.Looper.loop(Looper.java:176) 01-23 08:58:58.579: E/WindowManager(11333): at android.app.ActivityThread.main(ActivityThread.java:5419) 01-23 08:58:58.579: E/WindowManager(11333): at java.lang.reflect.Method.invokeNative(Native Method) 01-23 08:58:58.579: E/WindowManager(11333): at java.lang.reflect.Method.invoke(Method.java:525) 01-23 08:58:58.579: E/WindowManager(11333): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 01-23 08:58:58.579: E/WindowManager(11333): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 01-23 08:58:58.579: E/WindowManager(11333): at dalvik.system.NativeStart.main(Native Method) cheers sean ps this is the error report from google play crashes and anrs java.lang.OutOfMemoryError at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:94) at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:145) at java.lang.StringBuilder.append(StringBuilder.java:216) at com.uktheatres.BT_fileManager.readTextFileFromAssets(BT_fileManager.java:371) at com.uktheatres.BT_fragment_load_config_data$3.run(BT_fragment_load_config_data.java:148)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/23/15 05:04 AM (9 years ago)
Just thinking Sean, are both your devices running the same version of Android? I just started using the genymotion simulator and I found one of my apps behaved a bit differently with 4.4 compare to my devices which is 4.2.2. Alan
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/23/15 05:34 AM (9 years ago)
ive got 3 devices, (live) tablet and 2 phones, there all now crashing on refresh, cant get simulator to work on either geny or eclipse, ive taken all the images out of first screen, but there all still crashing, sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/23/15 09:55 AM (9 years ago)
My quick google, based on "has leaked window" (which comes up a few times in your logs), suggests that something in Buzztouch is trying to show a Dialog after exiting an Activity. I can't debug code I am afraid, but if you see anything that you think is trying to display dialog, try commenting it out maybe?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/23/15 10:01 AM (9 years ago)
Thanks alan, i took everything out of the screen, so all that's showing is text, its only just started doing it, so im presuming its a conflict somewhere in the code, but i wouldn't know where to even start lol, ive loaded up studio and transferred the eclipse project over, but now my windows machine has started to not recognize my usb devices lol, will keep plodding on and see if i can sort it, will post back if and when i do . cheers dude sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/23/15 10:27 AM (9 years ago)
If you have a version of your app that wasn't doing it, might be worth going back to it and making changes slowly until you pin down what you did to make it burst?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/23/15 10:30 AM (9 years ago)
cheers dude, back to the drawing board lol sean
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
01/23/15 10:06 PM (9 years ago)
what plugins are you using?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/24/15 04:04 AM (9 years ago)
its the menu with image plugin the app runs and works great, its just when you press refresh on certain devices,
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/25/15 05:13 AM (9 years ago)
Hi guys, ive tried everything to sort the above error, tried on android studio, still the same, changed the first screen, to other plugins, still the same same, can anyone help me with this, quite happy to pay someone to show me where im going wrong cheers sean ps ive also removed every image from project and im still getting crash when refreshing, tried to take out refresh url to stop the option, but still crashes in both eclipse and studio, app works great exept for the crash when trying to refresh. i have also downloaded fresh pacage from buzz, and tried to launch without changing anything, and left all images out, but still crashing on refresh. cheers sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 02:53 AM (9 years ago)
Hi guys, ive posted on stackflow to try and solve the above, and they say my config file is 2 large (4mb) and thats why its crashing, is there any way of making the app load a smaller config file, ive tried to stop the android one from updating, but soon as i take out the data and cloud url, the app crashes on startup, as it seams to want access online while its starting . ps is there anybody out there who would load my app on there eclipse and see if its my settings that are causing it to crash on refresh. cheers guys.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 04:27 AM (9 years ago)
He Sean, I am running eclipse and I could load it up. Send me a direct message with the details. Cheers, Alan
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 04:59 AM (9 years ago)
cheers dude, i have pm,d you on here with link to file. thanks sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 06:03 AM (9 years ago)
I think you may have some sort of timeout issue - the config.txt is large and it takes a long time to refresh. Also refresh sometimes it works, sometimes it doesn't. It always loads from a local file which is quicker than refresh, so I'm going with a timeout theory. You could load each menu from an individual textfile instead of having all of them in a config.txt, which would cut down the size of the . Effectively this loads a file each time you go into a menu instead of loading everything in one go. I sent you a note with a bit more detail. Let us know how it goes, Alan
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 06:17 AM (9 years ago)
replied alan, got the front screen as text file and valid jason, do i just host that , then point the screen to that url can i change the data url in that screen on a live app, ie it wont break the ios version will it, i know read somewhere if you remove the data or cloud url, you have to sudmit new binary to store,
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 06:22 AM (9 years ago)
ps what do i call the .text file for that screen
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 06:31 AM (9 years ago)
It will work on both, if the live IOS version is running off the same control panel, you need to be careful. As for what you call the text file, it doesn't matter, but I would not use spaces in the name.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 06:53 AM (9 years ago)
hi dude, i uploaded the .text file (jason Checked) called it the name of the first screen (55DDA9703E364DB313F66E0) Checked the url worked, then put the url, in screen data url section of the first screen, refreshed and checked it on the ios version, didnt do anything, tried to change some text in the url text file, but nothing changed when i refreshed and its taking same time about 20 secs, what am i doing wrong dude thanks sean ps, just thinking, when the app refreshes, wont it always look at the main data url, in the core settings, or is that where you want me to put the new url text file in, if so does that mean every screen will have to have a text file. (5544 Screens and growing)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 07:52 AM (9 years ago)
When the app refreshes, it looks for a new config.txt. Your app will always have one of those and if you look in it, you will see the data url pointing to the text file for the screen menu you edited. Every menu will need to have its own text file and you will not notice much performance effect until you do a few. If you do it wrong, you don't get a menu, if you did it correctly, it should look exactly the same as before. I suspect the reason nothing changed may be to do with caching. I would delete the data from the app from your phone and refresh again, or reinstall and try again.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 08:10 AM (9 years ago)
so i put the new url text file (for first screen) in the core settings data url, or do i just put each screens new url, in the data url for that screen and leave the main config file in the core settings. i will play around with the texts files and keep on trying, thanks for your help dude, sean one last this dude, heres the text file for front screen, in the url field should it point to the new text file or leave it pointing to the master in core settings. { "itemId": "55DDA9703E364DB313F66E0", "itemType": "WB_screen_menuImage", "itemNickname": "Welcome", "navBarTitleText": "Welcome to UK Theatres", "navBarStyle": "solid", "imageFileName": "homepage.png", "headerImageSize": "Medium", "headerBackgroundColor": "#CC3300", "backgroundColor": "clear", "listBackgroundColor": "clear", "listRowBackgroundColor": "#CC3300", "listTitleFontColor": "#FFFFFF", "listDescriptionFontColor": "#FFFFFF", "listRowSeparatorColor": "#FFFFFF", "listStyle": "plain", "preventAllScrolling": "0", "listRowSelectionStyle": "gray", "listRowHeightSmallDevice": "60", "listTitleHeightSmallDevice": "30", "listTitleFontSizeSmallDevice": "22", "listDescriptionFontSizeSmallDevice": "15", "listRowHeightLargeDevice": "120", "listTitleHeightLargeDevice": "65", "listTitleFontSizeLargeDevice": "55", "listDescriptionFontSizeLargeDevice": "35", "dataURL": "https://www.buzztouch.com/api/app/?command=getChildItems&appGuid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "hideTabBarWhenScreenLoads": "1", "backgroundImageNameSmallDevice": "back.png", "backgroundImageNameLargeDevice": "back.png", "childItems": [ { "itemId": "41549EB8B1103521AC3D090", "itemType": "BT_menuItem", "titleText": "Find A Theatre", "descriptionText": "Shows,Tickets & More", "loadScreenWithItemId": "F04551DA6F415D0CD10B02C", "iconName": "redfind.png", "rowAccessoryType": "details" }, { "itemId": "EE9EE1C1FAA9D7873F918CF", "itemType": "BT_menuItem", "titleText": "Find a Hotel", "descriptionText": "The Concierge", "loadScreenWithItemId": "B170DB15F537CDE63CDDEAC", "iconName": "redfind.png", "rowAccessoryType": "details" }, { "itemId": "D93BC71B26158E83D5B36EA", "itemType": "BT_menuItem", "titleText": "Dinner & Show", "descriptionText": "Dinner + Show Deals", "loadScreenWithItemId": "199E2D9CD3225AAAFB811C4", "iconName": "redmenu.png", "rowAccessoryType": "details" }, { "itemId": "B07D4660902A0ED7E3A38A9", "itemType": "BT_menuItem", "titleText": "Show Guides", "descriptionText": "A Guide to the UK's Shows", "loadScreenWithItemId": "163BACD8BF97F4F2047122B", "iconName": "redbook.png", "rowAccessoryType": "details" }, { "itemId": "585A96CFDB04A980032D49E", "itemType": "BT_menuItem", "titleText": "Contact Us", "descriptionText": "All Our Contact Details", "loadScreenWithItemId": "8AEB90DF6ACB36039BFAD07", "iconName": "redemail.png", "rowAccessoryType": "details" } ] } Reply The recipient may or may not recieve an email about these comments, it depends on their email settings.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 08:51 AM (9 years ago)
In the screen with the menu plugin that you want to change, set the data url to point to the url for your new text file. You do that for each screen that you modify this way. This has nothing to do with core settings.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 12:39 PM (9 years ago)
ive got as far as getting the app to refresh once, that's with the first screen url hosted elsewhere, gonna try adding 2nd screen and so on, i have noticed that my config file from buzz, has tons of references to stuff, that isn't on there anymore, stuff ive added, then deleted, is that normal dude, cheers al Sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 01:23 PM (9 years ago)
Not sure. If you can still see it in the control panel (like the old menu line items), even if you are not using it, it will still be in the config.txt. Glad you got the hang of the menu data url. Your config.txt was massive, load times should start to improve once you've done a few more.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 01:29 PM (9 years ago)
ive hosted the text file externally from buzz for the first screen, didnt stop the crashing, when i then added the external text file url to the config file in eclipse, it lets the app refresh once, ive now added the 2nd screen jason url to 2nd screen settings, but its not letting it refresh more than once, with all attempts im, uninstalling app, refreshing and cleaning eclipse,
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/26/15 01:42 PM (9 years ago)
How many menus do you have?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/26/15 01:56 PM (9 years ago)
Guessing 400 Every town in uk + 1 i put the buzz data url back in the config file in eclipse, restarted and cleaned everything, even with each screen url held separately, its still crashing on refresh. even if every screens url is held separately and reduced to just that screens details, when pressing refresh all data, wouldn't that still load the main large config file from buzz, so holding each screen data url externally isnt gonna help with the refesh all data problem, am i correct with this alan cheers
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/27/15 04:37 AM (9 years ago)
All sorted dude, i posted on stack , even though they all talk foriegn language to me lol, i managed to read between the lines, changed the option in manifest on large heap to true, and all the crashing stopped, thanks for your help dude, i do notice change in the screens, ie loading faster. thanks dude
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/27/15 01:57 PM (9 years ago)
Glad you got there in the end Sean. I have one app that would not work on certain Samsung Android devices, so I ended up keeping it on Buzztouch 2.x; I might have to try that large heap trick myself.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/27/15 02:10 PM (9 years ago)
Quadruple checked on 3 diff android devices, no crashes, it amazed me when it worked lol
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
01/27/15 04:04 PM (9 years ago)
cool stuff.I could tell from the log reports it was crashing because it couldnt build the config file but was thinking there wasnt enough storage space on the device or something. thanks for the cool tip!
 

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.