AGSGDBSync upload crash

3198
4
12-03-2015 02:29 AM
IsakHasselvold
New Contributor

Hi, we´ve just recently started using AGSGDBSyncDirectionUpload on one of our feature layers.

Our app crashes with the following trace, and it seems to happen only if there has not been any changes to the layer configured to "upload only".

I´m trying to work around by not setting the flag if there has not been any changes, but I´m guessing then the layer will default to bidirectional sync?

Thanks,

Kristoffer

Fatal Exception: Invalid Parameters

This sync operation specifies an upload should occur, but no deltas have previously been uploaded.

Thread : Fatal Exception: Invalid Parameters

0  CoreFoundation                 0x18515cf48 __exceptionPreprocess + 124

1  libobjc.A.dylib                0x199f57f80 objc_exception_throw + 56

2  sblogg2014                     0x1003f328c -[AGSGDBSyncTask ags_submitSyncJobWithUploadItem:geodatabase:params:jobStarted:]

3  sblogg2014                     0x100424d34 -[AGSGDBSyncUtility kickOffJobWithCompletion:]

4  sblogg2014                     0x10042a848 -[AGSResumableTaskJobUtility privateKickOffJob]

5  sblogg2014                     0x10042a67c __50-[AGSResumableTaskJobUtility privatePreProcessJob]_block_invoke310

6  sblogg2014                     0x100424b8c __49-[AGSGDBSyncUtility preProcessJobWithCompletion:]_block_invoke

7  libdispatch.dylib              0x19a7756e8 _dispatch_call_block_and_release + 24

8  libdispatch.dylib              0x19a7756a8 _dispatch_client_callout + 16

9  libdispatch.dylib              0x19a77adb0 _dispatch_main_queue_callback_4CF + 1844

10 CoreFoundation                 0x1851141f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12

11 CoreFoundation                 0x185112060 __CFRunLoopRun + 1628

12 CoreFoundation                 0x185040ca0 CFRunLoopRunSpecific + 384

13 GraphicsServices               0x1900d4088 GSEventRunModal + 180

14 UIKit                          0x18a758ffc UIApplicationMain + 204

15 sblogg2014                     0x10010e734 main (main.m:19)

16 libdyld.dylib                  0x19a7a68b8 start + 4

0 Kudos
4 Replies
ShiminCai
Occasional Contributor III

Hi Kristofer,

This happened to our TrackPoints sync, too, which has been configured to one way upload-only. Our workaround is to check the gdb/layer for edits before sync and if there is no edit do not allow to sync. However, I think no-edits should not be treated as an error...

Regards,

Shimin

KristofferStenersen
Occasional Contributor

Hi Shimin,

This is one of many layers in the gdb, and we´d like to keep the other layers in sync with server even when no changes has been done to this "upload-only"-layer. Perhaps adding some changes to some dummy object could be a workaround. Another workaround may be to add a dummy query filter upon creation of this layer, ensuring nothing ever gets downloaded (using bidirectional sync).

Thanks,

Kristoffer

0 Kudos
ShiminCai
Occasional Contributor III

Hi Kristoffer,

I'm lucky that our TrackPoints layer and other uploading-only layers are in separate feature services and so I can control the sync operation that way.

In your case, would you also be able to try excluding the uploading layer from the layerSyncInfos array when it does not have any edits?

layerSyncInfos.png

Regards,

Shimin

KristofferStenersen
Occasional Contributor

Shimin, that´s a great (and very simple) idea:) Thanks!

0 Kudos