1.7.0 crash when receive extenstion response

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

tmh
Posts: 3
Joined: 20 Jun 2014, 02:54

1.7.0 crash when receive extenstion response

Postby tmh » 24 Feb 2017, 18:43

Code: Select all

Env:
Mac OS 10.21.1
XCode 8.1 8B62
iPhone 5s Simulator 10.1 (14B72)


Hi. I got crashed every time when received extension response.

Thread trace

Code: Select all

GGLXSFS2xDemo-mobile`-[ExtensionController handleMessage:]:
    0x105728af0 <+0>:    pushq  %rbp
    0x105728af1 <+1>:    movq   %rsp, %rbp
    0x105728af4 <+4>:    subq   $0xe0, %rsp
    0x105728afb <+11>:   leaq   -0x18(%rbp), %rax
    0x105728aff <+15>:   movq   %rdi, -0x8(%rbp)
    0x105728b03 <+19>:   movq   %rsi, -0x10(%rbp)
    0x105728b07 <+23>:   movq   $0x0, -0x18(%rbp)
    0x105728b0f <+31>:   movq   %rax, %rdi
    0x105728b12 <+34>:   movq   %rdx, %rsi
    0x105728b15 <+37>:   callq  0x10601c2e0               ; symbol stub for: objc_storeStrong
    0x105728b1a <+42>:   movq   -0x8(%rbp), %rax
    0x105728b1e <+46>:   movq   0xb42c3b(%rip), %rdx      ; ExtensionController._sfs
    0x105728b25 <+53>:   movq   (%rax,%rdx), %rax
    0x105728b29 <+57>:   movq   0xb3f6b0(%rip), %rsi      ; "debug"
    0x105728b30 <+64>:   movq   %rax, %rdi
    0x105728b33 <+67>:   callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728b38 <+72>:   testb  $0x1, %al
    0x105728b3a <+74>:   jne    0x105728b45               ; <+85> at ExtensionController.m:38
    0x105728b40 <+80>:   jmp    0x105728b99               ; <+169> at ExtensionController.m:42
    0x105728b45 <+85>:   leaq   0xb42984(%rip), %rax      ; BaseController._log
    0x105728b4c <+92>:   movq   -0x8(%rbp), %rcx
    0x105728b50 <+96>:   movq   (%rax), %rax
    0x105728b53 <+99>:   movq   (%rcx,%rax), %rax
    0x105728b57 <+103>:  movq   -0x18(%rbp), %rdi
    0x105728b5b <+107>:  movq   0xb3fe16(%rip), %rsi      ; "description"
    0x105728b62 <+114>:  movq   %rax, -0x38(%rbp)
    0x105728b66 <+118>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728b6b <+123>:  movq   %rax, %rdi
    0x105728b6e <+126>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728b73 <+131>:  movq   0xb3f4ae(%rip), %rsi      ; "info:"
    0x105728b7a <+138>:  movq   -0x38(%rbp), %rcx
    0x105728b7e <+142>:  movq   %rcx, %rdi
    0x105728b81 <+145>:  movq   %rax, %rdx
    0x105728b84 <+148>:  movq   %rax, -0x40(%rbp)
    0x105728b88 <+152>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728b8d <+157>:  movq   -0x40(%rbp), %rax
    0x105728b91 <+161>:  movq   %rax, %rdi
    0x105728b94 <+164>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728b99 <+169>:  movq   -0x18(%rbp), %rdi
    0x105728b9d <+173>:  movq   0xb3fa24(%rip), %rsi      ; "content"
    0x105728ba4 <+180>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728ba9 <+185>:  movq   %rax, %rdi
    0x105728bac <+188>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728bb1 <+193>:  movq   %rax, -0x20(%rbp)
    0x105728bb5 <+197>:  movq   0xb41db4(%rip), %rax      ; (void *)0x000000010b4f2180: NSMutableDictionary
    0x105728bbc <+204>:  movq   -0x20(%rbp), %rdi
    0x105728bc0 <+208>:  movq   0xadbe19(%rip), %rdx      ; ExtensionController_KEY_CMD
    0x105728bc7 <+215>:  movq   0xb3fb4a(%rip), %rsi      ; "getUtfString:"
    0x105728bce <+222>:  movq   %rax, -0x48(%rbp)
    0x105728bd2 <+226>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728bd7 <+231>:  movq   %rax, %rdi
    0x105728bda <+234>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728bdf <+239>:  movq   %rax, %rdx
    0x105728be2 <+242>:  movq   -0x20(%rbp), %rdi
    0x105728be6 <+246>:  movq   0xadbdfb(%rip), %rsi      ; ExtensionController_KEY_PARAMS
    0x105728bed <+253>:  movq   0xb3fb1c(%rip), %rcx      ; "getSFSObject:"
    0x105728bf4 <+260>:  movq   %rsi, -0x50(%rbp)
    0x105728bf8 <+264>:  movq   %rcx, %rsi
    0x105728bfb <+267>:  movq   -0x50(%rbp), %rcx
    0x105728bff <+271>:  movq   %rdx, -0x58(%rbp)
    0x105728c03 <+275>:  movq   %rcx, %rdx
    0x105728c06 <+278>:  movq   %rax, -0x60(%rbp)
    0x105728c0a <+282>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728c0f <+287>:  movq   %rax, %rdi
    0x105728c12 <+290>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728c17 <+295>:  leaq   0xb0b7e2(%rip), %rcx      ; @"cmd"
    0x105728c1e <+302>:  leaq   0xb09f7b(%rip), %rdx      ; @"params"
    0x105728c25 <+309>:  xorl   %r8d, %r8d
    0x105728c28 <+312>:  movl   %r8d, %esi
    0x105728c2b <+315>:  movq   0xb3f42e(%rip), %rdi      ; "dictionaryWithObjectsAndKeys:"
    0x105728c32 <+322>:  movq   -0x48(%rbp), %r9
    0x105728c36 <+326>:  movq   %rdi, -0x68(%rbp)
    0x105728c3a <+330>:  movq   %r9, %rdi
    0x105728c3d <+333>:  movq   -0x68(%rbp), %r9
    0x105728c41 <+337>:  movq   %rsi, -0x70(%rbp)
    0x105728c45 <+341>:  movq   %r9, %rsi
    0x105728c48 <+344>:  movq   -0x58(%rbp), %r10
    0x105728c4c <+348>:  movq   %rdx, -0x78(%rbp)
    0x105728c50 <+352>:  movq   %r10, %rdx
    0x105728c53 <+355>:  movq   %rax, %r8
    0x105728c56 <+358>:  movq   -0x78(%rbp), %r9
    0x105728c5a <+362>:  movq   $0x0, (%rsp)
    0x105728c62 <+370>:  movq   %rax, -0x80(%rbp)
    0x105728c66 <+374>:  movb   $0x0, %al
    0x105728c68 <+376>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728c6d <+381>:  movq   %rax, %rdi
    0x105728c70 <+384>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728c75 <+389>:  movq   %rax, -0x28(%rbp)
    0x105728c79 <+393>:  movq   -0x80(%rbp), %rdi
    0x105728c7d <+397>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728c82 <+402>:  movq   -0x60(%rbp), %rax
    0x105728c86 <+406>:  movq   %rax, %rdi
    0x105728c89 <+409>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728c8e <+414>:  movq   -0x20(%rbp), %rdi
    0x105728c92 <+418>:  movq   0xadbd57(%rip), %rdx      ; ExtensionController_KEY_ROOM
    0x105728c99 <+425>:  movq   0xb3f058(%rip), %rsi      ; "containsKey:"
    0x105728ca0 <+432>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728ca5 <+437>:  testb  $0x1, %al
    0x105728ca7 <+439>:  jne    0x105728cb2               ; <+450> at ExtensionController.m:47
    0x105728cad <+445>:  jmp    0x105728dd9               ; <+745> at ExtensionController.m
    0x105728cb2 <+450>:  movq   0xb41c27(%rip), %rax      ; (void *)0x0000000109a8b320: NSNumber
    0x105728cb9 <+457>:  movq   -0x20(%rbp), %rdi
    0x105728cbd <+461>:  movq   0xadbd2c(%rip), %rdx      ; ExtensionController_KEY_ROOM
    0x105728cc4 <+468>:  movq   0xb3fcb5(%rip), %rsi      ; "getInt:"
    0x105728ccb <+475>:  movq   %rax, -0x88(%rbp)
    0x105728cd2 <+482>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728cd7 <+487>:  movl   %eax, %ecx
    0x105728cd9 <+489>:  movq   0xb3ef48(%rip), %rsi      ; "numberWithInt:"
    0x105728ce0 <+496>:  movq   -0x88(%rbp), %rax
    0x105728ce7 <+503>:  movq   %rax, %rdi
    0x105728cea <+506>:  movl   %ecx, %edx
    0x105728cec <+508>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728cf1 <+513>:  movq   %rax, %rdi
    0x105728cf4 <+516>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728cf9 <+521>:  leaq   0xb0b720(%rip), %rsi      ; @"sourceRoom"
    0x105728d00 <+528>:  movq   %rax, -0x30(%rbp)
    0x105728d04 <+532>:  movq   -0x28(%rbp), %rax
    0x105728d08 <+536>:  movq   -0x30(%rbp), %rdi
    0x105728d0c <+540>:  movq   0xb3f42d(%rip), %r8       ; "setObject:forKey:"
    0x105728d13 <+547>:  movq   %rdi, -0x90(%rbp)
    0x105728d1a <+554>:  movq   %rax, %rdi
    0x105728d1d <+557>:  movq   %rsi, -0x98(%rbp)
    0x105728d24 <+564>:  movq   %r8, %rsi
    0x105728d27 <+567>:  movq   -0x90(%rbp), %rdx
    0x105728d2e <+574>:  movq   -0x98(%rbp), %rcx
    0x105728d35 <+581>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728d3a <+586>:  movq   -0x28(%rbp), %rax
    0x105728d3e <+590>:  movq   -0x8(%rbp), %rcx
    0x105728d42 <+594>:  movq   0xb3fc1f(%rip), %rsi      ; "sfs"
    0x105728d49 <+601>:  movq   %rcx, %rdi
    0x105728d4c <+604>:  movq   %rax, -0xa0(%rbp)
    0x105728d53 <+611>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728d58 <+616>:  movq   %rax, %rdi
    0x105728d5b <+619>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728d60 <+624>:  movq   -0x30(%rbp), %rdx
    0x105728d64 <+628>:  movq   0xb3ee9d(%rip), %rsi      ; "getRoomById:"
    0x105728d6b <+635>:  movq   %rax, %rcx
    0x105728d6e <+638>:  movq   %rcx, %rdi
    0x105728d71 <+641>:  movq   %rax, -0xa8(%rbp)
    0x105728d78 <+648>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728d7d <+653>:  movq   %rax, %rdi
    0x105728d80 <+656>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728d85 <+661>:  leaq   0xb09e94(%rip), %rcx      ; @"room"
    0x105728d8c <+668>:  movq   0xb3f3ad(%rip), %rsi      ; "setObject:forKey:"
    0x105728d93 <+675>:  movq   -0xa0(%rbp), %rdx
    0x105728d9a <+682>:  movq   %rdx, %rdi
    0x105728d9d <+685>:  movq   %rax, %rdx
    0x105728da0 <+688>:  movq   %rax, -0xb0(%rbp)
    0x105728da7 <+695>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728dac <+700>:  movq   -0xb0(%rbp), %rdi
    0x105728db3 <+707>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728db8 <+712>:  movq   -0xa8(%rbp), %rax
    0x105728dbf <+719>:  movq   %rax, %rdi
    0x105728dc2 <+722>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728dc7 <+727>:  xorl   %r9d, %r9d
    0x105728dca <+730>:  movl   %r9d, %esi
    0x105728dcd <+733>:  leaq   -0x30(%rbp), %rax
    0x105728dd1 <+737>:  movq   %rax, %rdi
    0x105728dd4 <+740>:  callq  0x10601c2e0               ; symbol stub for: objc_storeStrong
    0x105728dd9 <+745>:  movq   -0x8(%rbp), %rax
    0x105728ddd <+749>:  movq   0xb4297c(%rip), %rcx      ; ExtensionController._sfs
    0x105728de4 <+756>:  movq   (%rax,%rcx), %rax
    0x105728de8 <+760>:  movq   0xb3fb99(%rip), %rsi      ; "delegate"
    0x105728def <+767>:  movq   %rax, %rdi
    0x105728df2 <+770>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728df7 <+775>:  movq   %rax, %rdi
    0x105728dfa <+778>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728dff <+783>:  movq   0xb3fb8a(%rip), %rdx      ; "onExtensionResponse:"
    0x105728e06 <+790>:  movq   0xb3f63b(%rip), %rsi      ; "respondsToSelector:"
    0x105728e0d <+797>:  movq   %rax, %rdi
    0x105728e10 <+800>:  movq   %rax, -0xb8(%rbp)
    0x105728e17 <+807>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728e1c <+812>:  movq   -0xb8(%rbp), %rdi
    0x105728e23 <+819>:  movb   %al, -0xb9(%rbp)
    0x105728e29 <+825>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728e2e <+830>:  movb   -0xb9(%rbp), %al
    0x105728e34 <+836>:  testb  $0x1, %al
    0x105728e36 <+838>:  jne    0x105728e41               ; <+849> at ExtensionController.m
    0x105728e3c <+844>:  jmp    0x105728ed9               ; <+1001> at ExtensionController.m:54
    0x105728e41 <+849>:  movq   -0x8(%rbp), %rax
    0x105728e45 <+853>:  movq   0xb42914(%rip), %rcx      ; ExtensionController._sfs
    0x105728e4c <+860>:  movq   (%rax,%rcx), %rax
    0x105728e50 <+864>:  movq   0xb3fb31(%rip), %rsi      ; "delegate"
    0x105728e57 <+871>:  movq   %rax, %rdi
    0x105728e5a <+874>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728e5f <+879>:  movq   %rax, %rdi
    0x105728e62 <+882>:  callq  0x10601c2bc               ; symbol stub for: objc_retainAutoreleasedReturnValue
    0x105728e67 <+887>:  movq   0xb41bc2(%rip), %rcx      ; (void *)0x000000010626e128: SFSEvent
    0x105728e6e <+894>:  movq   0xb3eb5b(%rip), %rsi      ; "alloc"
    0x105728e75 <+901>:  movq   %rcx, %rdi
    0x105728e78 <+904>:  movq   %rax, -0xc8(%rbp)
    0x105728e7f <+911>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728e84 <+916>:  leaq   0xadbf95(%rip), %rcx      ; SFSEvent_EXTENSION_RESPONSE
    0x105728e8b <+923>:  movq   (%rcx), %rdx
    0x105728e8e <+926>:  movq   -0x28(%rbp), %rcx
    0x105728e92 <+930>:  movq   0xb3f16f(%rip), %rsi      ; "initWithType:params:"
    0x105728e99 <+937>:  movq   %rax, %rdi
    0x105728e9c <+940>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728ea1 <+945>:  movq   0xb3fae8(%rip), %rsi      ; "onExtensionResponse:"
    0x105728ea8 <+952>:  movq   -0xc8(%rbp), %rdi
    0x105728eaf <+959>:  movq   %rax, %rdx
    0x105728eb2 <+962>:  movq   %rax, -0xd0(%rbp)
    0x105728eb9 <+969>:  callq  0x10601c28c               ; symbol stub for: objc_msgSend
    0x105728ebe <+974>:  movq   -0xd0(%rbp), %rax
    0x105728ec5 <+981>:  movq   %rax, %rdi
    0x105728ec8 <+984>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728ecd <+989>:  movq   -0xc8(%rbp), %rdi
    0x105728ed4 <+996>:  callq  0x10601c2a4               ; symbol stub for: objc_release
    0x105728ed9 <+1001>: xorl   %eax, %eax
    0x105728edb <+1003>: movl   %eax, %esi
    0x105728edd <+1005>: leaq   -0x28(%rbp), %rcx
    0x105728ee1 <+1009>: movq   %rcx, %rdi
    0x105728ee4 <+1012>: callq  0x10601c2e0               ; symbol stub for: objc_storeStrong
    0x105728ee9 <+1017>: leaq   -0x20(%rbp), %rdi
    0x105728eed <+1021>: xorl   %eax, %eax
    0x105728eef <+1023>: movl   %eax, %esi
    0x105728ef1 <+1025>: callq  0x10601c2e0               ; symbol stub for: objc_storeStrong
    0x105728ef6 <+1030>: leaq   -0x18(%rbp), %rdi
    0x105728efa <+1034>: xorl   %eax, %eax
    0x105728efc <+1036>: movl   %eax, %esi
    0x105728efe <+1038>: callq  0x10601c2e0               ; symbol stub for: objc_storeStrong
    0x105728f03 <+1043>: addq   $0xe0, %rsp
    0x105728f0a <+1050>: popq   %rbp
    0x105728f0b <+1051>: retq   


evtParams

Code: Select all

evtParams   __NSDictionaryM *   3 key/value pairs   0x0000600000242730
[0]   (null)   @"cmd" : @"x"   
[1]   (null)   @"sourceRoom" : (int)97   
[2]   (null)   @"params" : (no summary)   


Dump

Code: Select all

[SFS - INFO]{ Message id: 13 }
{Dump: }

   (sfs_object) p:
      (byte_array) c: [<0c000000 00000600 08000600 06000000 00000f00>]
      (byte_array) d: [<0c000000 00000600 08000400 06000000 18000000 14001c00 04001400 00001800 08000c00 13000000 14000000 18000000 00000000 b9860100 00000001 14000000 18000000 06000000 75736572 30300000 00000000 00000000 00000000 00000000>]
   
   (int) r: 97
   (utf_string) c: x


Last message log

Code: Select all

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: room)'
*** First throw call stack:
(
   0   CoreFoundation                      0x000000010b23634b __exceptionPreprocess + 171
   1   libobjc.A.dylib                     0x000000010abec21e objc_exception_throw + 48
   2   CoreFoundation                      0x000000010b14c9b7 -[__NSDictionaryM setObject:forKey:] + 1047
   3   GGLXSFS2xDemo-mobile                0x0000000105728dac -[ExtensionController handleMessage:] + 700
   4   GGLXSFS2xDemo-mobile                0x000000010574b08d -[SFSProtocolCodec dispatchRequest:] + 717
   5   GGLXSFS2xDemo-mobile                0x000000010574b27c -[SFSProtocolCodec onPacketRead:] + 92
   6   GGLXSFS2xDemo-mobile                0x00000001057449fb -[SFSIOHandler handlePacketData:] + 1579
   7   GGLXSFS2xDemo-mobile                0x0000000105745c82 -[SFSIOHandler onDataRead:] + 722
   8   GGLXSFS2xDemo-mobile                0x0000000105716614 -[BitSwarmClient stream:handleEvent:] + 948
   9   CoreFoundation                      0x000000010b1fb694 _signalEventSync + 228
   10  CoreFoundation                      0x000000010b20e3d6 _cfstream_solo_signalEventSync + 246
   11  CoreFoundation                      0x000000010b1f95a2 _CFStreamSignalEvent + 466
   12  CFNetwork                           0x00000001072f3c1c _ZN12SocketStream40dispatchSignalFromSocketCallbackUnlockedEP24SocketStreamSignalHolder + 58
   13  CFNetwork                           0x00000001072f800f _ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 279
   14  CFNetwork                           0x00000001072f7ebe _ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 70
   15  CoreFoundation                      0x000000010b1f91c9 __CFSocketPerformV0 + 985
   16  CoreFoundation                      0x000000010b1db311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
   17  CoreFoundation                      0x000000010b1c059c __CFRunLoopDoSources0 + 556
   18  CoreFoundation                      0x000000010b1bfa86 __CFRunLoopRun + 918
   19  CoreFoundation                      0x000000010b1bf494 CFRunLoopRunSpecific + 420
   20  GraphicsServices                    0x000000010bce3a6f GSEventRunModal + 161
   21  UIKit                               0x0000000107936964 UIApplicationMain + 159
   22  GGLXSFS2xDemo-mobile                0x00000001057022e1 main + 65
   23  libdyld.dylib                       0x000000010b7bf68d start + 1
   24  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException


Please check it for me.
tmh
Posts: 3
Joined: 20 Jun 2014, 02:54

Re: 1.7.0 crash when receive extenstion response

Postby tmh » 26 Feb 2017, 15:51

Is smartfox2x still active development? We really need your help. :(
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 27 Feb 2017, 08:14

Yes, it's in active development, except for weekends :wink:
We'll take a look and get back to you.

Cheers
p.s. = you can follow our newsletter to keep updated.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 27 Feb 2017, 09:45

UPDATE:
I was able to reproduce the problem when you call a Room Extension, not in other cases. Is this the same case as yours?

We should be able to release a patch pretty quickly, if all goes well, I'd say tomorrow.
I'll keep you posted.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 27 Feb 2017, 15:41

UPDATE #2:
We have fixed the issue and tested with a couple of projects.
Here you can download the update

Let us know if the problem is fixed for you as well

p.s. = API version should read "1.7.1", maybe clean your project before building with the new API
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 01 Mar 2017, 06:05

Any updates on your part?
Lapo

--

gotoAndPlay()

...addicted to flash games
tmh
Posts: 3
Joined: 20 Jun 2014, 02:54

Re: 1.7.0 crash when receive extenstion response

Postby tmh » 01 Mar 2017, 09:20

Lapo wrote:UPDATE:
I was able to reproduce the problem when you call a Room Extension, not in other cases. Is this the same case as yours?

We should be able to release a patch pretty quickly, if all goes well, I'd say tomorrow.
I'll keep you posted.

Thanks


Hi Lapo,

Sorry for my late reply. I try your update but have the same problem.
And we face this problem when call Zone Extenstion (not Room Extension).
If you need us to provide any information. Feel free to let me know.

Thank you for your time.

We use flatbuffers to generate bytes array for "c" and "d" params.

Send request code

Code: Select all

    auto requestParams = GetRoot<GGSFS2xExtensionRequestParams>(paramsFBB.GetBufferPointer());
   
    SFSObject* params = [[SFSObject newInstance] autorelease];
    [params putByteArray:@"c" value:[NSData dataWithBytes:(const void *)requestInfoFBB.GetBufferPointer() length:requestInfoFBB.GetSize()]];
    [params putByteArray:@"d" value:[NSData dataWithBytes:(const void *)dataFBB.GetBufferPointer() length:dataFBB.GetSize()]];
   
   
    if(requestParams->isRoomLevel())
    {
        if(requestParams->isOnLastJoinRoom())
        {
            [_smartFox send:[ExtensionRequest requestWithExtCmd:@"x" params:params room:[_smartFox lastJoinedRoom]]];
        }
        else
        {
            [_smartFox send:[ExtensionRequest requestWithExtCmd:@"x" params:params room:[_smartFox getRoomById:requestParams->room()->id()]]];
        }
    }
    else
    {
        [_smartFox send:[ExtensionRequest requestWithExtCmd:@"x" params:params]];
    }


Output

Code: Select all

2017-03-01 16:20:20.715 GGLXSFS2xDemo-mobile[5598:251212] [SFS - INFO]{ Message id: 13 }
{Dump: }

   (sfs_object) p:
      (byte_array) c: [<0c000000 00000600 08000600 06000000 00000f00>]
      (byte_array) d: [<0c000000 00000600 08000400 06000000 18000000 14001c00 04001400 00001800 08000c00 13000000 14000000 18000000 00000000 527f0100 00000001 14000000 18000000 06000000 75736572 30300000 00000000 00000000 00000000 00000000>]
   
   (int) r: 227
   (utf_string) c: x
2017-03-01 16:20:43.908892 GGLXSFS2xDemo-mobile[5598:251344] [aqme] 254: AQDefaultDevice (6): skipping input stream 0 0 0x0
2017-03-01 16:20:43.917 GGLXSFS2xDemo-mobile[5598:251212] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: room)'
*** First throw call stack:
(
   0   CoreFoundation                      0x000000010ad4834b __exceptionPreprocess + 171
   1   libobjc.A.dylib                     0x000000010a6fe21e objc_exception_throw + 48
   2   CoreFoundation                      0x000000010ac5e9b7 -[__NSDictionaryM setObject:forKey:] + 1047
   3   GGLXSFS2xDemo-mobile                0x0000000105233e2c -[ExtensionController handleMessage:] + 700
   4   GGLXSFS2xDemo-mobile                0x000000010525617d -[SFSProtocolCodec dispatchRequest:] + 717
   5   GGLXSFS2xDemo-mobile                0x000000010525636c -[SFSProtocolCodec onPacketRead:] + 92
   6   GGLXSFS2xDemo-mobile                0x000000010524faeb -[SFSIOHandler handlePacketData:] + 1579
   7   GGLXSFS2xDemo-mobile                0x0000000105250d72 -[SFSIOHandler onDataRead:] + 722
   8   GGLXSFS2xDemo-mobile                0x000000010522168f -[BitSwarmClient stream:handleEvent:] + 895
   9   CoreFoundation                      0x000000010ad0d694 _signalEventSync + 228
   10  CoreFoundation                      0x000000010ad203d6 _cfstream_solo_signalEventSync + 246
   11  CoreFoundation                      0x000000010ad0b5a2 _CFStreamSignalEvent + 466
   12  CFNetwork                           0x0000000106e05c1c _ZN12SocketStream40dispatchSignalFromSocketCallbackUnlockedEP24SocketStreamSignalHolder + 58
   13  CFNetwork                           0x0000000106e0a00f _ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 279
   14  CFNetwork                           0x0000000106e09ebe _ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 70
   15  CoreFoundation                      0x000000010ad0b1c9 __CFSocketPerformV0 + 985
   16  CoreFoundation                      0x000000010aced311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
   17  CoreFoundation                      0x000000010acd259c __CFRunLoopDoSources0 + 556
   18  CoreFoundation                      0x000000010acd1a86 __CFRunLoopRun + 918
   19  CoreFoundation                      0x000000010acd1494 CFRunLoopRunSpecific + 420
   20  GraphicsServices                    0x000000010b7f5a6f GSEventRunModal + 161
   21  UIKit                               0x0000000107448964 UIApplicationMain + 159
   22  GGLXSFS2xDemo-mobile                0x000000010520d391 main + 65
   23  libdyld.dylib                       0x000000010b2d168d start + 1
   24  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 01 Mar 2017, 10:51

Thanks,
I've uploaded a new build here.

And we face this problem when call Zone Extenstion (not Room Extension).

It definitely looks like you're calling a Room Extension from the code you have posted. Both calls pass the room: parameter, which is used to call a Room Extension.

Let us know
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 19988
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.0 crash when receive extenstion response

Postby Lapo » 03 Mar 2017, 15:32

Can we consider this case closed?
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 2 guests