Closed BishopGIS closed 8 years ago
С падением вообще странная ситуация. Сейчас добавляется без этой ошибки, но потом просиходит следующее. Интерфейс не меняется, поле так и остается активным. Через какое-то время появлется диалог "Сохрани лес остановлено", видимо при синхронизации чего-то падает.
Отловил. Вот стектрес
02-04 17:42:58.711 13905-13940/com.nextgis.safeforest:sync D/nextgismobile: onPerformSync
02-04 17:42:59.021 13905-13940/com.nextgis.safeforest:sync W/dalvikvm: threadid=12: thread exiting with uncaught exception (group=0x41cc1c08)
02-04 17:42:59.021 13905-13940/com.nextgis.safeforest:sync E/AndroidRuntime: FATAL EXCEPTION: SyncAdapterThread-1
Process: com.nextgis.safeforest:sync, PID: 13905
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at com.nextgis.safeforest.util.MapUtil.removeOutdatedChanges(MapUtil.java:122)
at com.nextgis.safeforest.datasource.FVSyncAdapter.sync(FVSyncAdapter.java:40)
at com.nextgis.maplib.datasource.ngw.SyncAdapter.onPerformSync(SyncAdapter.java:118)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
02-04 17:42:59.046 13905-13905/com.nextgis.safeforest:sync D/nextgismobile: SyncAdapter - sync is canceled, sleep
02-04 17:43:09.046 13905-13905/com.nextgis.safeforest:sync D/nextgismobile: SyncAdapter - sleep for SYNC_CANCELED is ended
Видимо попыталось дважды добавить. Нужно после нажатия на кнопку отправить блокировать кнопки или закрывать интерфейс отправки.