PDA

View Full Version : Pocket Legends Broken - Logcat/potential fix inside



thetruth
12-21-2010, 11:14 PM
I/ActivityManager( 967): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=sts.pl/.PocketLeg
ends bnds=[582,45][668,118] }
I/ActivityManager( 967): Start proc sts.pl for activity sts.pl/.PocketLegends:
pid=2910 uid=10038 gids={3003, 1015}
W/ApplicationContext( 2910): Attempt to read preferences file /data/data/sts.pl/
shared_prefs/PocketLegends.xml without permission
E/ApplicationContext( 2910): Couldn't rename file /data/data/sts.pl/shared_prefs
/PocketLegends.xml to backup file /data/data/sts.pl/shared_prefs/PocketLegends.x
ml.bak
D/AndroidRuntime( 2910): Shutting down VM
W/dalvikvm( 2910): threadid=1: thread exiting with uncaught exception (group=0x4
001d848)
E/AndroidRuntime( 2910): FATAL EXCEPTION: main
E/AndroidRuntime( 2910): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{sts.pl/sts.pl.PocketLegends}: java.lang.NullPointerException
E/AndroidRuntime( 2910): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 2910): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 2910): at android.app.ActivityThread.access$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 2910): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 2910): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 2910): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2910): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 2910): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 2910): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 2910): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 2910): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime( 2910): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2910): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 2910): at com.tapjoy.TapjoyConnect.initMetaData(TapjoyC
onnect.java:248)
E/AndroidRuntime( 2910): at com.tapjoy.TapjoyConnect.<init>(TapjoyConnect
.java:152)
E/AndroidRuntime( 2910): at com.tapjoy.TapjoyConnect.getTapjoyConnectInst
ance(TapjoyConnect.java:137)
E/AndroidRuntime( 2910): at sts.pl.PocketLegends.onCreate(PocketLegends.j
ava:137)
E/AndroidRuntime( 2910): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 2910): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 2910): ... 11 more
W/ActivityManager( 967): Force finishing activity sts.pl/.PocketLegends
W/ActivityManager( 967): Activity pause timeout for HistoryRecord{4aa840f0 sts.
pl/.PocketLegends}
W/ActivityManager( 967): Activity destroy timeout for HistoryRecord{4aa840f0 st
s.pl/.PocketLegends}


here ya go devs - this is the problem with the update... nothing to deal with tablets not being "cell phones" as someone had suggested - a simple problem with permissions...

i am setting proper permissions as we speak to see if that fixes things... but really, let's get a solution ASAP to those of us who pay for this little time-killing app Pocket Legends.

after some quick research it seems that this was a problem caused by the devs (obv) and not our specific devices:

http://groups.google.com/group/android-developers/browse_thread/thread/246aae66e0caf302/908be552b1d86158?lnk=gst&q=Shared+Preferences&pli=1

http://code.google.com/p/android/issues/detail?id=2047

it seems as if the app was originally published with copy protection on and then switched to off (or the opposite) and this is now causing the problems we have:



I noticed the same thing and did some research. It appears that what happens is
during the upgrade process for a non copy protected app to a protected app (or vice
versa), the program responsible for the upgrade does preserve the data directories
for the previous app, however it generates a new user/group id for the newer version.
Because the data directories are associated not with the user/group id of the new
version, they are inaccessible


so this is a KNOWN issue with absolutely no real "fix" from google as it was supposed to be baked into froyo - obviously the devs complaining on google in september means it wasnt really fixed. so it seems spacetimestudios has been caught up in a problem with google's flaws, and not their own. i think the fix for this is to switch back the copy protected status of the app - whether that was on or off - this is also assuming i am right in why sts.pl is failing for us.

but since there is absolutely no word from the devs on what the status of this problem is, someone has to get the ball rolling in a direction towards a solution!

sniffs
12-21-2010, 11:21 PM
What perms are you setting and how you doin it?

I'm looking at /data/app and see the sts.pl-1.apk and it's perms are set just like every other app in that folder.

EDIT: Nm.. I see that line about the .XML

it doesn't have the execute perm. I'll try it also..

EDIT2: Gave it full perms and still crashes.. :(

EDIT3: Even gave the folder full perms.. no go.

EDIT4: Interesting.. on my Gtab, the file is called PocketLegends.XML on my rooted DroidX, the same file is called tjcPrefrences.xml eh????????

My DroidX also has a "Databases" folder, inside my Files folder is a codeversion.txt and a preferences.xml and on my gtab that folder is blank. Cache folder has another folder called webviewCache, gtab Cache folder is blank.

I going to copy all these foldes/files from my DX to my gtab and let you know how it goes.

EDIT5: Nope, deleted the original sts.pl and copied over the one from my DX and still will not run. :(

thetruth
12-21-2010, 11:42 PM
same thing.. none of that worked... i did find that the stock uninstaller and titanium backup do NOT completely remove all PL items - the shared prefs were still there after an uninstall... manually deleted them and got rid of the davlik vm refs, rebooting and reinstalling now... will be back in a few


well, that was a no-go too :/

sniffs
12-21-2010, 11:57 PM
I still have the 1.6 installer too.. installs fine, runs fine.. log in and it tells you there's an update. Attempt to update and subsequently crashes like a fresh 1.6.1 install.. bah!!

The 1.6 install has all the same files, folders as my DX does on 1.6.1

when you update to 1.6.1 on the gtab, all those files are removed.

thetruth
12-22-2010, 12:00 AM
I still have the 1.6 installer too.. installs fine, runs fine.. log in and it tells you there's an update. Attempt to update and subsequently crashes like a fresh 1.6.1 install.. bah!!

yeah, its going to do that... 1.6.1 is broke for us - i am stumped as to what is causing the program to NOT have proper permissions for read/write - i've forced install to device with no SD card mounted and still got the same error..

sniffs
12-22-2010, 12:02 AM
I at least got it installed and running on my Dell Streak which is much more tollerable to play than on my DroidX, but still.. that leaves everyone else in the dust and myself who has a Gtab, I'd really like to get it working!

thetruth
12-22-2010, 12:10 AM
hmm... odd thing is that on my fiance's evo, there is no shared_prefs folder... maybe this is a storage mapping thing...

sniffs
12-22-2010, 12:16 AM
In response to your edit on the OP, why would it work for some phones and not others then?

It installed perfectly fine on my DX and runs fine. After I unmounted my sdcard on my Dell Streak it installs and and runs fine..

sniffs
12-22-2010, 12:20 AM
Also.. isn't turning on/off copy protection done at the type of the market upload?

That wouldn't have any effect on the direct download via their web server would it?

thetruth
12-22-2010, 12:26 AM
In response to your edit on the OP, why would it work for some phones and not others then?

It installed perfectly fine on my DX and runs fine. After I unmounted my sdcard on my Dell Streak it installs and and runs fine..

not a clue - i'm an administrator of a skilled nursing facility, so my knowledge of java and AOSP is rather small (as this sort of dev/tech stuff does not pertain to my job)... permissions got messed up in some way with this update causing the program to crash as we can obviously not call out to a "null" item and expect the program to move forward... that is where the nullpointer.exception is telling us.

this is what happens when the company doesn't respond to e-mails or posts on this forum - the community attempts to fix things themselves.



Also.. isn't turning on/off copy protection done at the type of the market upload?

That wouldn't have any effect on the direct download via their web server would it?


they would then have to maintain two different builds if it worked that way (in addition to the iPhone API)... one for the market and one for those without the market - not going to happen, since the vast majority of people have access to the market anyway... rather, the copy protection function is just something that is coded for android apps in general, doesn't have anything to deal with the market as you are thinking.

as seen in the two links i posted, devs having trouble with their apps after changing copy protection flags produced the same exact errors we have after this update to PL. although, since it IS working for most devices, i am inclined to believe that there might be something unique to the builds of android we use... nonetheless, whatever spacetime did from 1.6 to 1.6.1 borked it for us!

sniffs
12-22-2010, 12:42 AM
What's odd is I've emailed them twice now with questions on features, support devices, etc and I see responses back in a few hours. I emailed this to them this morning and not a word.

I guess all we can look forward to is the 23rd.. for this! http://dungeondefenders.com/

thetruth
12-22-2010, 12:09 PM
well, spacetime finally emailed me back regarding this issue... what a bad response it was...

they did not bother to read this thread prior to sending a reply to my message.

spacetime's solution? uninstall, unmount SD card, wipe market data (pocket legends doesnt even show in the market for me, i get it via the web), install pocket legends, remount sd card, move app to sd card if desired...

THE "FIX" DOES NOT WORK SPACETIME!

take the time, read the logcat, read the posts here and then come up with a solution.

i wrote them back and requested that someone read the threads here and respond to the unhappy, paying customers. we shall see if they respond.

thetruth
12-22-2010, 02:06 PM
here is a logcat of pocket legends 1.6.0 working just fine:



I/ActivityManager( 972): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=sts.pl/.PocketLeg
ends }
I/ActivityManager( 972): Start proc sts.pl for activity sts.pl/.PocketLegends:
pid=6701 uid=10038 gids={3003, 1015}
D/WifiService( 972): ACTION_BATTERY_CHANGED pluggedType: 0
D/dalvikvm( 6701): Trying to load lib /data/data/sts.pl/lib/libpocketlegends.so
0x4a95f1c8
D/dalvikvm( 6701): Added shared lib /data/data/sts.pl/lib/libpocketlegends.so 0x
4a95f1c8
I/sts.pl ( 6701): jvm set to 0xaa00
I/sts.pl ( 6701):
D/libEGL ( 6701): loaded /system/lib/egl/libGLES_android.so
D/libEGL ( 6701): loaded /system/lib/egl/libEGL_tegra.so
D/libEGL ( 6701): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL ( 6701): loaded /system/lib/egl/libGLESv2_tegra.so
D/sts.pl ( 6701): gl_renderer: NVIDIA AP
I/sts.pl ( 6701): app context set to 0x4a9981c0
I/sts.pl ( 6701):
I/sts.pl ( 6701): app init (1024x600)
I/sts.pl ( 6701):
I/sts.pl ( 6701): getConfigPath()=[/data/data/sts.pl/files]
I/sts.pl ( 6701):
I/sts.pl ( 6701): getCachePath()=[/mnt/sdcard/Android/data/sts.pl/cache]
I/sts.pl ( 6701):
I/sts.pl ( 6701): /cygdrive/c/work/pocketlegends/test/src/build/android/jni/../
../../engine/shared/library/sharedEngine/src/shared/file/FileSystem.cpp(329) : W
ARNING [pak.cfg] not found
I/sts.pl ( 6701):
I/sts.pl ( 6701): /cygdrive/c/work/pocketlegends/test/src/build/android/jni/../
../../engine/shared/library/sharedEngine/src/shared/file/FileSystem.cpp(329) : W
ARNING [pak.cfg] not found
I/sts.pl ( 6701):
I/sts.pl ( 6701): /cygdrive/c/work/pocketlegends/test/src/build/android/jni/../
../../engine/shared/library/sharedEngine/src/shared/file/FileSystem.cpp(329) : W
ARNING [pak.cfg] not found
I/sts.pl ( 6701):
I/sts.pl ( 6701): version = [OpenGL ES-CM 1.1]
I/sts.pl ( 6701):
I/sts.pl ( 6701): renderer = [NVIDIA AP]
I/sts.pl ( 6701):
I/sts.pl ( 6701): Using AndroidAudio3
I/sts.pl ( 6701):
I/sts.pl ( 6701): CodeVersion: 52754
I/sts.pl ( 6701):
I/sts.pl ( 6701): /cygdrive/c/work/pocketlegends/test/src/build/android/jni/../
../../engine/shared/library/sharedEngine/src/shared/file/FileSystem.cpp(329) : W
ARNING [android-dataversion.txt] not found
I/sts.pl ( 6701):
I/sts.pl ( 6701): DataVersion: 0
I/sts.pl ( 6701):
I/ActivityManager( 972): Displayed activity sts.pl/.PocketLegends: 656 ms (tota
l 81012 ms)
D/dalvikvm( 1066): GC_EXPLICIT freed 5630 objects / 327752 bytes in 33ms
D/WifiService( 972): ACTION_BATTERY_CHANGED pluggedType: 0
D/dalvikvm( 1112): GC_EXPLICIT freed 2895 objects / 175928 bytes in 96ms


i see other "official" spacetime staffers posting in other threads, but no response here... not even a "hey we're sorry we screwed up support on all these devices... we see the issue, we're looking at the logcat, and we will try to come up with a solution asap"

too bad they don't have a tech support number, at least we could flood something with complaints regarding the shoddy support and fact the latest update broke things for us!

thetruth
12-22-2010, 02:11 PM
oh, and here is a VERY simple solution... take the pocket legends APK that worked/works perfectly for all of us and edit the manifest.xml and client.cfg files to reflect the build as 1.6.1 and version as 53185 and all should be well... seriously, how long does it take to resign an apk file to NOT include whatever changes you made in the new update?

trust me, i have no interest in gaining "free" plat - i just want to use the 800 plat i purchased already... otherwise, i expect a full refund spacetime!

sniffs
12-22-2010, 02:27 PM
Did that work for you?

thetruth
12-22-2010, 02:32 PM
Did that work for you?

no matter what i do i cannot find a program that can properly read the manifest.xml - dreamweaver cant, excel cant, word cant, notepad ++ cant... each come up with specific errors as the xml file is not in proper form... attempted to just edit the client.cfg and repackage but that throws out another error with manifest.mf or something - meaning that the signature no longer matches... but there is no point in me trying to resign the apk as i cannot properly edit the manifest.xml file on my pc.

but this is something the DEVS should be working on - not me.

edit: nevermind... androidmanifest.xml is fine, must have been the fact i was using winrar - switched to 7zip and all was okay... now i am getting a problem with parsing the package... ugggh, why wont this thing sign properly!!??

asommers
12-22-2010, 07:07 PM
Looking into this.

-ALS

sniffs
12-22-2010, 08:36 PM
Holy moly.. If you need a tester, there's plenty of people no here that have the Gtab.. I myself are one of them and would gladly assist with this and future tablet attempts.

asommers
12-22-2010, 10:32 PM
The absolute worst thing you can do is tell the server you're running a version you're not. You'll cloud our crash reports collected by Google per version, you won't get the correct pak files downloaded, and network messages may be in the wrong format.

There are a zillion different Android devices and we can't test them all. All of this appears to be related the recently added Tapjoy library and we're working on a fix.

-ALS

asommers
12-22-2010, 11:52 PM
I have found the problem. It has nothing to do with copy protection (that was fixed by Google well before Android OS 2.0 and we require Android OS 2.0), and we always shipped with copy protection off (so users can copy the .APK around).

There's actually a bug in the Tapjoy library that we're using. I'll be putting up 1.6.2 shortly which hopefully addresses the issue.

-ALS

thetruth
12-23-2010, 12:03 AM
thanks for the progress update!! cannot wait to see sandy claws or the droid around! i get the facebook updates and its a shame i had to miss em today lol... you guys sure have made an addictive game that spans generations (and platforms) for its user base!!

edit:

also, i have quite a few different android devices - ranging from snapdragon with adreno to tegra2 - and am more than willing to help test for you guys.

Darkbulb
12-23-2010, 01:44 AM
Thanks for the update - any ETA on when the new version will be made available?

asommers
12-23-2010, 01:53 AM
I just published it to the Android Market. Make sure it says 1.6.2 before you download it.

-ALS

Darkbulb
12-23-2010, 02:05 AM
Thanks!
For those of us that will have to download the .apk file directly from the pocket legends site (http://pocketlegends.com/android-download/) when will the updated file be available there?

asommers
12-23-2010, 02:07 AM
Yes, the .APK should already be updated. Please let me know if it works (and I'm sure you'll let me know if it doesn't).

-ALS

Darkbulb
12-23-2010, 02:17 AM
Yes, the .APK should already be updated. Please let me know if it works (and I'm sure you'll let me know if it doesn't).

-ALS

Thanks, will be at my Archos 70 in an hour and will try.
Really do appreciate the work on getting it resolved.

thetruth
12-23-2010, 02:25 AM
Yes, the .APK should already be updated. Please let me know if it works (and I'm sure you'll let me know if it doesn't).

-ALS

works perfectly!! staying up until 2:30am was definately worth it!!

sniffs
12-23-2010, 02:42 AM
Yep..works again..muuuchas gracias

col
12-23-2010, 03:45 AM
Yes all working again on Advent Vega. Thanks.:cool:
Col.

pinksocked
12-23-2010, 04:34 PM
Yes worked on my archos 10, Thanks a lot you guys rock.

Darkbulb
12-23-2010, 05:05 PM
Working well on my Archos 70 (which btw is an awesome tablet) - thanks for fixing this!