Discussion Forums  >  Crashes, Memory Warnings

Replies: 11    Views: 158

johnnylonz
Aspiring developer
Profile
Posts: 26
Reg: Aug 11, 2011
Florida
260
08/14/12 08:52 AM (11 years ago)

App Crashes loading Image Gallery

I'm working on an Android app (BT 1.5). There is an image gallery on the app with 10 remotely hosted images. As soon as I click the menu item to launch the image gallery, the app crashes. It does this in both the emulator and a real device. I know the images should be fine, because I built an iOS version of this same app and it works fine on any iOS device. I already tried redownloading the BT Config file but no luck. This is the message from the console that I get when the app crashes: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lakesumtermarketsquare/com.lakesumtermarketsquare.BT_screen_images}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.lakesumtermarketsquare.BT_screen_images.setTitleBarAndDescriptionText(BT_screen_images.java:411) at com.lakesumtermarketsquare.BT_screen_images.resetImage(BT_screen_images.java:941) at com.lakesumtermarketsquare.BT_screen_images.parseScreenData(BT_screen_images.java:497) at com.lakesumtermarketsquare.BT_screen_images.onStart(BT_screen_images.java:280) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129) at android.app.Activity.performStart(Activity.java:3781) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2636) ... 11 more If anyone has any idea of what might be going on or could point me in the right direction I would greatly appreciate it.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/14/12 09:01 AM (11 years ago)
Self hosted plugin? I'm not sure if that plugin is android compatible. Let me look into it.. David buzztouchmods.com
 
johnnylonz
Aspiring developer
Profile
Posts: 26
Reg: Aug 11, 2011
Florida
260
like
08/14/12 09:01 AM (11 years ago)
Also just in case it might be helpful, this is the code leading up to the crash (from the moment you click the image gallery button to the moment it crashes): BT_screen_menuList:setBackgroundImage: setting background image BT_screen_menuList:handleItemTap loads screen with itemId: "06BFAE01C49C1EDD66F0BC3" BT_application:getScreenDataByItemId 06BFAE01C49C1EDD66F0BC3 BT_application:getScreenDataByItemId screenType is BT_screen_images for screen with nickname: Images of Brownwood BT_act_controller:loadScreenObject for screen with nickname "Images of Brownwood" and type "BT_screen_images" BT_screen_images:onCreate BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "Images of Brownwood" BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#FFFFFF" BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "Images of Brownwood" BT_viewUtilities:getNavBarForScreen: setting nav-bar color to: "#0C2708" BT_screen_images:backgroundWorkerThread using image from project bundle: "bgip2.png" BT_screen_images: start GPS is set to YES in the applications configuration data, trying to start GPS BT_screen_images: user has not prevented the GPS from starting using a BT_screen_settingsLocation screen BT_screen_images:startListening (started listening for location changes) BT_screen_images:startListening asking for GPS locations updates... BT_screen_images:onStart using cached screen data BT_fileManager: readTextFileFromCache: "06BFAE01C49C1EDD66F0BC3_screenData.txt" Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. BT_screen_images:parseScreenData BT_strings:getSaveAsFileNameFromURL from: "http://www.app.villagesphonebook.com/images/brownwood/concept.png" file name: "concept.png" BT_fileManager:doesProjectAssetExist: NO assets/BT_Images/concept.png BT_screen_images:getChildItemDrawable not caching image after download. BT_downloader:downloadDrawable from URL: http://www.app.villagesphonebook.com/images/brownwood/concept.png BT_screen_images:resetImage D/AndroidRuntime(345): Shutting down VM W/dalvikvm(345): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
 
johnnylonz
Aspiring developer
Profile
Posts: 26
Reg: Aug 11, 2011
Florida
260
like
08/14/12 09:02 AM (11 years ago)
@ Mr David - I'm running the app directly from BT, not self hosted.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/14/12 09:02 AM (11 years ago)
Hi Johnny, Unfortunately, the Image Gallery isn't fully supported on BT V1.5 for Android. Works fine for iOS, but isn't complete for Android. Mark
 
johnnylonz
Aspiring developer
Profile
Posts: 26
Reg: Aug 11, 2011
Florida
260
like
08/14/12 09:04 AM (11 years ago)
Ok, well I suppose that solves it! Kind of a bummer because I was hoping to use the same code for both an iOS and Android version of my app (without having to build 2 separate apps, because it has a TON of screens.) Thank you very much for your help GoNorthWest and MrDavid.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/14/12 09:05 AM (11 years ago)
Mark answered it then ;) Try looking into this for your android version: http://www.photoswipe.com/ Free, easy, beautiful. Cheers, David buzztouchmods.com
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/14/12 09:07 AM (11 years ago)
Yep. There are some alternatives, and I agree it would be nice to have. It is supported in v2.0 I believe, for both platforms. Mark
 
johnnylonz
Aspiring developer
Profile
Posts: 26
Reg: Aug 11, 2011
Florida
260
like
08/14/12 09:10 AM (11 years ago)
@MrDavid - Do I mark it answered by clicking the thumbs up button? Thanks again
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/14/12 09:17 AM (11 years ago)
The thumbs up is for a good answer that you'd like to acknowledge. No current way to mark a thread as Resolved yet. Mark
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/14/12 10:36 AM (11 years ago)
You should read my Guide to BTv1.5 (Android) Go to www.MySkylla.com Buzztouch Screens & plugins Fred
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
08/14/12 11:06 AM (11 years ago)
@mrdavid that photoswipe is good struggling to get it to work on ios get confused adding all the html stuff in the folder. It would be perfect if it was dynamic and could stream from Flickr.
 

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.