views:

63

answers:

2

Hey, Sorry if this is a dumb question. I'm an amateur programmer and new to Android, though I've prided myself on not having to bother anyone for help until this point.

The problem I'm having is that my program randomly seems to hang on startup. It doesn't happen all the time, and when does happen, it sometimes unfreezes within several seconds. I haven't been able to see any pattern to the crashing.

I've looked at several LogCats and this seems to be the key error, as it always throws before I run the program (sometimes twice), freeze or no:

Failure getting entry for 0x7f03001c (t=2 e=28) in package 0: 0xffffffb5
updateAppWidget couldn't find any view, using error view
android.content.res.Resources$NotFoundException: Resource ID #0x7f03001c
    at android.content.res.Resources.getValue(Resources.java:891)
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:1865)
    at android.content.res.Resources.getLayout(Resources.java:730)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
    at android.widget.RemoteViews.apply(RemoteViews.java:900)
    at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:209)
    at android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java:243)
    at android.appwidget.AppWidgetHost$UpdateHandler.handleMessage(AppWidgetHost.java:72)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:4425)
    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:860)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    at dalvik.system.NativeStart.main(Native Method)
showStatusIcon on inactive InputConnection

I'm working in Eclipse with the Android-plug-in. Tried searching for that string 0x7f03001c, but can't find it in my generated R file or anywhere. I'm not using any XML, or at least I still get this error when I skip the parts that do use it, so I have no idea where these errors are coming from.

Lastly, I think this has only started recently, though since I've been an idiot and haven't been doing version control (hopefully learnt my lesson, this time) I don't see how to test whether it's even coming from my code, or not.

Thanks in advance for any responses.

-Sam

A: 

Do you have any calls to updateAppWidget? If not, it's probably not your code.

In that case, try to use a brand new simulator and see if your app will launch.

Brandon
No, and it looks like you're right that the Log result above isn't from my code. I investigated and found that the same error throws when I start other apps (including the Marketplace app), so it looks like it's probably unconnected to my freezing problem.By the way, the only widgets I have up are those that came installed with the phone.
Sam L.
A: 

There isn't much to go on, but there are two methods I would use to find it.

One - step through the code, line-by-line to identify if you can repeat this error reliably around a part of the code

Two - it looks like you're using an object based on a resource that isn't loading properly - check the most recent resources to insure they're what you AND the API are expecting. Try taking out the code that is using resources one-line-at-a-time.

Of course, you already said version control would be helpful :-)

Tom Slick