Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPMemberDouble Crash #533

Closed
larryryu opened this issue Jan 8, 2016 · 1 comment · Fixed by #534
Closed

SPMemberDouble Crash #533

larryryu opened this issue Jan 8, 2016 · 1 comment · Fixed by #534
Milestone

Comments

@larryryu
Copy link
Contributor

larryryu commented Jan 8, 2016

Getting a crash when syncing changes to double field.
checkout fork:
https://github.com/larryryu/simperium-ios

Steps to reproduce

  • Replace "SIMPERIUM_APP_ID", "SIMPERIUM_API_KEY" with appropriate values in AppDelegaae
  • Install Final sample Todo App on 2 devices
    (https://github.com/larryryu/simperium-ios/tree/develop/samples/Simpletodo/SimpletodoFinal)
  • Create a new Todo item on device A
  • Make sure the new entry shows up on device B
  • Tap to edit the todo on device A
  • Set second textfield value to 2, make sure changes synced.
  • Put device A in airplane mode keep device B online
  • On device A, clear the second textfield
  • On device B change second textfield to 4
  • Tap back button on both devices
  • Turn off airplane mode on device A so that changes are synced.

Observe that device A crashes. Any attempt to restart the app results in the same crash

Here is the stack trace

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103ee2e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010395bdeb objc_exception_throw + 48
2 CoreFoundation 0x0000000103de58ce -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 318
3 CoreFoundation 0x0000000103df7c3b +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
4 SimpletodoFinal 0x0000000100ea2135 -[SPMemberDouble transform:otherValue:oldValue:error:] + 213
5 SimpletodoFinal 0x0000000100ec43a1 -[SPDiffer transform:diff:oldDiff:oldGhost:error:] + 2049
6 SimpletodoFinal 0x0000000100e8f259 -[SPChangeProcessor _processRemoteModifyWithKey:bucket:threadSafeStorage:change:acknowledged:clientMatches:error:] + 5897
7 SimpletodoFinal 0x0000000100e8d984 __95-[SPChangeProcessor processRemoteModifyWithKey:bucket:change:acknowledged:clientMatches:error:]_block_invoke + 116
8 SimpletodoFinal 0x0000000100e8a781 -[SPCoreDataStorage performSafeBlockAndWait:] + 1105
9 SimpletodoFinal 0x0000000100e8d800 -[SPChangeProcessor processRemoteModifyWithKey:bucket:change:acknowledged:clientMatches:error:] + 608
10 SimpletodoFinal 0x0000000100e91210 -[SPChangeProcessor processRemoteChange:bucket:error:] + 3552
11 SimpletodoFinal 0x0000000100e925d4 -[SPChangeProcessor processRemoteChanges:bucket:successHandler:errorHandler:] + 2244
12 SimpletodoFinal 0x0000000100ee15d8 -[SPWebSocketChannel processBatchChanges:bucket:] + 1656
13 SimpletodoFinal 0x0000000100ee0e37 __49-[SPWebSocketChannel handleRemoteChanges:bucket:]_block_invoke + 535
14 libdispatch.dylib 0x0000000104418e5d _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x000000010443949b _dispatch_client_callout + 8
16 libdispatch.dylib 0x000000010441f8ec _dispatch_queue_drain + 2215
17 libdispatch.dylib 0x000000010441ee0d _dispatch_queue_invoke + 601
18 libdispatch.dylib 0x0000000104421a56 _dispatch_root_queue_drain + 1420
19 libdispatch.dylib 0x00000001044214c5 _dispatch_worker_thread3 + 111
20 libsystem_pthread.dylib 0x000000010477168f _pthread_wqthread + 1129
21 libsystem_pthread.dylib 0x000000010476f365 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

@jleandroperez
Copy link
Contributor

Hello @larryryu,

Thanks for reporting this one!. I've just pushed a fix to address this scenario. Would it be possible to validate everything works as expected?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants