Android

GScript / LLama and “Unmarshalling unknown type code 7077998 at offset 12”

I am using a combination of LLama and GScript so I can trigger a rsync backup whenever my phone connects to the home Wi-Fi.

However, after a recent restore, GScript started crashing (whenever invoked from LLama) and the error message showed:

I/Timeline( 1494): Timeline: Activity_launch_request id:nl.rogro.GScript time:33043949
I/ActivityManager(  747): START u0 {act=android.intent.action.MAIN flg=0x10000000 cmp=nl.rogro.GScript/.GScript bnds=[0,0][1,1] (has extras)} from pid 1494
I/ActivityManager(  747): Start proc nl.rogro.GScript for activity nl.rogro.GScript/.GScript: pid=20963 uid=10091 gids={50091, 1028, 1015}
D/ActivityThread(20963): handleBindApplication:nl.rogro.GScript
E/AndroidRuntime(20963): Process: nl.rogro.GScript, PID: 20963
E/AndroidRuntime(20963): java.lang.RuntimeException: Unable to start activity ComponentInfo{nl.rogro.GScript/nl.rogro.GScript.GScript}: java.lang.RuntimeException: Parcel android.os.Parcel@64ce2f90: Unmarshalling unknown type code 7077998 at offset 12
E/AndroidRuntime(20963): 	at nl.rogro.GScript.GScript.onCreate(GScript.java:211)
W/ActivityManager(  747):   Force finishing activity nl.rogro.GScript/.GScript
I/ActivityManager(  747): Process nl.rogro.GScript (pid 20963) has died.

On careful inspection of the code, it seems that GScript was supposed to receive an Intent having a nl.rogro.GScript.GScript.ScriptId key as extras. It looked like LLama was sending a bundle without this value (since LLama settings were restored from backup when the scripts maybe had a different ID ?)

The fix was to edit LLama events and choose again all the bookmarks that have to be launched through GScript.

Follow up:

The fix above was not permanent, GScript crashed again after a reboot. I think it is a bug in Llama, because I had to reshuffle the events. The succession of events I had was:

a) when the phone connects to the home network
b) trigger a delayed event of 15 minutes
c) the event config was that if the phone is still connected to the network
d) run two actions: speak that the backup is in progress and also execute the GScript shortcut.

I had to split the d) into more steps:

d) trigger two events:
d1) one with a delay of 1 second, without any conditions, that will execute the GScript shortcut.
d2) one with a delay of 1 second, without any conditions, that will speak “Synchronising in progress” using the Notifications sound path.

Now it works after reboot.

PS:

Point b) (delayed after 15 minutes) is that usually the phone connects to the Wifi when I arrive at the garage, but then if I walk to the shop instead of going inside, the phone might not have enough time to finish the backup.
If 15 minutes passed and I’m still on the Wifi, then I am inside the house and backup can proceed. Otherwise, the phone will reconnect when I get back (more than 15 minutes after, and thus the event is cancelled) and then start counting again.

Leave a Reply