Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
500 views
in Technique[技术] by (71.8m points)

android - What process should be used to compress SKMaps.zip file for use in Skobbler powered app?

I'm currently using the Skobbler SDK in an Android app to handle mapping and turn-by-turn direction tasks. One issue that came up was the desire to change to frequency at which audio advice is issued from the SDK so that we don't have too many instructions being fired off one after the other.

I found this answer to another question which explains the need to modify an advice_places.adv file which I was able to find within the SDK provided SKMaps.zip file.

The issue I'm experiencing seems to be related to how I re-archive the zip file once I've finished making changes to the advice_places.adv file. I'm working on a Mac and it seems that regardless of if I use the built-in "Compress..." context menu option or if I perform a zip operation via the command line similar to:

zip -vr SKMaps.zip SKMaps/ -x "*.DS_Store"; chmod +x SKMaps.zip

I still can't seem to load my app without it crashing during the Skobbler SDK map initialization process.

I've narrowed down the issue to it being a zip/unzip related issue since I can recreate the crash even if I don't modify any of the contents of the SKMaps.zip but only unzip and then rezip.

Here is a dump of the logs that I see when my app crashes.

                 SKMaps  D  SKMapViewHolder----@onResume
                     D  SKMapSurfaceView----@onResume
                     D  SKMapSurfaceView----@onResume preserve GL context is TRUE
      WindowManager  V  Adding window Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity} at 23 of 32 (before Window{246caca8 u0 SurfaceView})
                     V  Adding window Window{1b0d49f9 u0 SurfaceView} at 23 of 33 (before Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity})
             SKMaps  D  MapRenderer----@onSurfaceCreated
                     D  MapRenderer----@onSurfaceCreated LinInitialized = true
                     D  MapRenderer---- @initGLView
         SkobblerNG  D  set density JNI  - before NG_SetScreenScale
                     D  set density JNI  - after NG_SetScreenScale
               libc  F  Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 24828 (GLThread 44711)
   btif_config_util  D  btif_config_save_file(L188): in file name:/data/misc/bluedroid/bt_config.new
              DEBUG  I  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                     I  Build fingerprint: 'google/shamu/shamu:5.1/LMY47I/1767468:user/release-keys'
                     I  Revision: '33696'
                     I  ABI: 'arm'
                     I  pid: 24493, tid: 24828, name: GLThread 44711  >>> com.company.mymapapp <<<
                     I  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
                     I      r0 00000001  r1 00000000  r2 00000001  r3 00000029
                     I      r4 a0edfcd0  r5 00000000  r6 a0edfc00  r7 a044a9b0
                     I      r8 00000000  r9 a044a9d8  sl 00000001  fp 13250820
                     I      ip 80000000  sp a044a978  lr 9e8d5efd  pc 9e8d5f22  cpsr 600f0030
                     I  backtrace:
                     I  #00 pc 0018ef22  /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::SetupTextureInBufferFromTex(SK_WTEXTURE_ID&)+113)
                     I  #01 pc 0018ff23  /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::Init(unsigned int, unsigned int)+190)
                     I  #02 pc 0011dc7d  /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (MapRenderer::InitializeGlobeAndWorldTextures()+116)
                     I  #03 pc 000fe1bd  /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (NG_InitializeGL+52)
                     I  #04 pc 000e7fcf  /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (Java_com_skobbler_ngx_map_MapRenderer_initgl+14)
                     I  #05 pc 0064b963  /data/dalvik-cache/arm/data@[email protected]@[email protected]
                     I  Tombstone written to: /data/tombstones/tombstone_07
    ActivityManager  W    Force finishing activity 1 com.company.mymapapp/.activities.MainActivity
       BootReceiver  I  Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
         JavaBinder  E  !!! FAILED BINDER TRANSACTION !!!
        WindowState  I  WIN DEATH: Window{23adbb9a u0 SurfaceView}
       NetlinkEvent  E  NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
                     E  NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
      NetdConnector  E  Error handling '613 IfaceClass active (null)': java.lang.NumberFormatException: Invalid int: "(null)"
        WindowState  I  WIN DEATH: Window{246caca8 u0 SurfaceView}
                     I  WIN DEATH: Window{259e40bc u0 com.company.mymapapp/com.company.mymapapp.activities.IntroActivity}
                     I  WIN DEATH: Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity}
                     I  WIN DEATH: Window{1b0d49f9 u0 SurfaceView}
             Zygote  I  Process 24493 exited due to signal (11)
    ActivityManager  W  Exception thrown during pause
                     W  android.os.TransactionTooLargeException
                     W      at android.os.BinderProxy.transactNative(Native Method)
                     W      at android.os.BinderProxy.transact(Binder.java:496)
                     W      at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:704)
                     W      at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:825)
                     W      at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2726)
                     W      at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2583)
                     W      at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2497)
                     W      at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11500)
                     W      at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11397)
                     W      at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12081)
                     W      at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:11592)
                     W      at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
    lowmemorykiller  E  Error opening /proc/24493/oom_score_adj; errno=2

                        Process com.company.mymapapp (PID: 24493) ended

If anyone has any information as to the preferred method of generating a zip file on a Mac for use with the Skobbler SDK in this fashion, I would appreciate any guidance.

Thank you! Keith

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I've had the same issue (I did the zipping/unzipping manually) - I did not get to the bottom of the problem but the trick is not to zip the SkMaps folder (that you get when unzipping) but the content of that folder (all the subfolders) in an archive named SkMaps.zip (go in the unpacked folder, SKMaps, select all the folder and compress them to an SKMaps.zip.

I'm not sure if this is Mac specific or zip specific. The SDK expects that when unzipping SKMaps.zip it will find a number of folders, but when you compress the SKMaps folder directly you end up with an archive that has as root folder a folder named SkMaps (which is wrong) and only inside that folder the correct folder structure.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...