2017-02-13 61 views
0

我正在更新Skobbler到2.5.2版本來修復libpng Google Play警告(我也嘗試更新到版本3+),但導航在更新後停止正常工作。Skobbler Android - 在路由計算後無效SKAdvices

後onRouteCalculationCompleted我檢查使用 SKRouteManager.getInstance()的建議名單。getAdviceList()和接收有效的建議。

SKRouteAdvice [adviceID=0, timeToDestination=261, distanceToDestination=1234, timeToAdvice=0, distanceToAdvice=0, streetName=Rua Barao do Abiaí, visualAdviceFile=/data/user/0/myapp/files/SKMaps//Advisor/Visual/104962/1.png, advicePosition=[-35.886744260787964,-7.215477737837522], adviceInstruction=Now turn left then turn right , audioFilePlaylist=[now, turn_left, then_open, turn_right], currentStreetType=RESIDENTIAL, currentStreetFCClass=FC3, streetDirection=DIRECTION_LEFT] 

然而,在導航時,建議是無效的一個,比如這個:

onUpdateNavigationState SKNavigationState [adviceID=-1, currentSpeed=5.304781188371101E-58, currentSpeedLimit=0.0, countryCode=, lastAdvice=false, showSignPost=false, currentAdviceCurrentStreetName=, currentAdviceNextStreetName=, currentAdviceCurrentOsmStreetType=UNDEFINED, currentAdviceNextOsmStreetType=UNDEFINED, currentAdviceDistanceToAdvice=-738480304, currentAdviceTimeToDestination=-738962832, currentAdviceDistanceToDestination=-738480656, currentAdviceVisualAdviceFile=, currentAdviceAudioAdvices=[None], currentAdviceExitNumber=, nextAdviceCurrentStreetName=, nextAdviceNextStreetName=, nextAdviceDistanceToAdvice=-738854288, nextAdviceVisualAdviceFile=, nextAdviceCurrentOsmStreetType=UNDEFINED, nextAdviceNextOsmStreetType=UNDEFINED, distanceToDestination=0.0, firstCrossingDescriptor=SKCrossingDescriptor [crossingType=0, routeAngle=0.0, turnToRight=false, directionUK=false, allowedRoutesAngles=null, forbiddenRoutesAngles=null], secondCrossingDescriptor=SKCrossingDescriptor [crossingType=0, routeAngle=0.0, turnToRight=false, directionUK=false, allowedRoutesAngles=null, forbiddenRoutesAngles=null], adviceInstruction=, viaPointsInfo=null, isLastVisualAdvice=false, currentStreetDirection=DIRECTION_INVALID, nextStreetDirection=DIRECTION_INVALID] 

要檢查的建議列表保持有效的我開始了導航和應用程序崩潰之前添加日誌代碼出現以下錯誤:

02-10 12:06:43.769 3236-3236/myapp A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 3236 (urance.myapp) 
02-10 12:06:43.994 4166-4166/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
02-10 12:06:43.995 4166-4166/? A/DEBUG: Build fingerprint: 'google/bullhead/bullhead:7.1.1/N4F26O/3582057:user/release-keys' 
02-10 12:06:43.995 4166-4166/? A/DEBUG: Revision: 'rev_1.0' 
02-10 12:06:43.995 4166-4166/? A/DEBUG: ABI: 'arm' 
02-10 12:06:43.995 4166-4166/? A/DEBUG: pid: 3236, tid: 3236, name: urance.myapp >>> myapp <<< 
02-10 12:06:43.995 4166-4166/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 
02-10 12:06:43.995 4166-4166/? A/DEBUG:  r0 00000001 r1 d71b69dd r2 00000002 r3 f1304a40 
02-10 12:06:43.995 4166-4166/? A/DEBUG:  r4 f1323200 r5 eb614ef0 r6 00000000 r7 00000002 
02-10 12:06:43.995 4166-4166/? A/DEBUG:  r8 00000001 r9 ffcd6bb4 sl c39fcd80 fp c4b7b000 
02-10 12:06:43.995 4166-4166/? A/DEBUG:  ip 00000000 sp ffcd6a38 lr d72b8347 pc d72b834c cpsr 000f0030 
02-10 12:06:43.998 4166-4166/? A/DEBUG: backtrace: 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #00 pc 0033734c /data/app/myapp-2/lib/arm/libngnative.so (_ZN17SkAdviceGenerator14fillAdviceInfoEiiR16NGAdviceTypeEnumR12SkAdviceInfo+671) 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #01 pc 003367ff /data/app/myapp-2/lib/arm/libngnative.so (_ZN17SkAdviceGenerator17generateNewAdviceEibbPK6CRoute+550) 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #02 pc 00332adb /data/app/myapp-2/lib/arm/libngnative.so (_ZN9SkAdvisor22generateAllAdvicesOnceERK6CRouteb+566) 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #03 pc 0011033f /data/app/myapp-2/lib/arm/libngnative.so (NG_GetAdviceList+142) 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #04 pc 000efcab /data/app/myapp-2/lib/arm/libngnative.so (Java_com_skobbler_ngx_routing_SKRouteManager_getadvicelist+38) 
02-10 12:06:44.000 4166-4166/? A/DEBUG:  #05 pc 006cb7d1 /data/app/myapp-2/oat/arm/base.odex (offset 0x658000) 

PS:我的代碼與Skobbler的演示項目非常相似。

其他人是否也有同樣的問題?

+0

我們這樣做,請參閱http://stackoverflow.com/questions/41633362/skobbler-sdk-android-corrupt-inconsistent-sknavigationstate-objects – Jan

回答

0

該問題是由於設置SKAdvisorSettings而引起的。在更新Skobbler版本時,我忘記將我的自定義建議聲音文件複製到適當的位置。

Skobbler無法找到某些特定語言(自定義文件)的建議和配置文件,導致導航無法正常工作。

我相信Skobbler SDK應該在這種情況下引發一些異常或警告,因爲錯誤與導航數據無關,例如距離和到達目的地的時間。建議不應該因爲無法找到建議聲音文件而失效。

所以,如果你有同樣的問題,請檢查你的建議文件是否在正確的文件夾。