Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25346

iOS: App-crash when using Ti.App.fireEvent to send nested JSON-payload in 6.2.0.GA+

    Details

      Description

      Tested same app in 6.1.1. was working fine.
      Error in titanium 6.2.0 and 6.2.2 sdk.

      Has something significantly changed in how JSON is parsed for Ti.App.fireEvent in 6.2.0 sdk going forward?

      situation... note no params are provided to the event name.
      Ti.App.fireEvent("my_event_name");

      This event is happening as a window closes, so it is hard to replicate.
      Could the previous JSON parser handle empty dictionary params but not the new updated version?

      Alternatively, if there is an error in the dictionary, is it that the previous json parser failed gracefully, but the new one causes an app crash?

      Tested in iOS simulator and device...

      Error log

      [INFO] : Could not parse JSON. Error: Error Domain=NSCocoaErrorDomain Code=3840 "Badly formed object around character 364." UserInfo=

      {NSDebugDescription=Badly formed object around character 364.}

      [ERROR] : The application has crashed with an uncaught exception 'NSRangeException'.
      [ERROR] : Reason:
      [ERROR] : *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray
      [ERROR] : Stack trace:
      [ERROR] : 0 CoreFoundation 0x0000000108abdaf3 __exceptionPreprocess + 147
      [ERROR] : 1 libobjc.A.dylib 0x000000010807b141 objc_exception_throw + 48
      [ERROR] : 2 CoreFoundation 0x0000000108ad527d -[__NSArray0 objectAtIndex:] + 93
      [ERROR] : 3 mLearn 0x0000000100fb6001 -[AppModule fireEvent:] + 97
      [ERROR] : 4 mLearn 0x0000000100fb64e1 -[AppModule fireEvent:withObject:] + 113
      [ERROR] : 5 mLearn 0x0000000100e7f8a1 -[AppProtocolHandler handleAppToTiRequest] + 945
      [ERROR] : 6 mLearn 0x0000000100e7fe1c -[AppProtocolHandler startLoading] + 188
      [ERROR] : 7 CFNetwork 0x0000000105e3e206 ___ZN16CFURLProtocol_NS28_protocolInterface_startLoadEPK20_CFCachedURLResponse_block_invoke + 303
      [ERROR] : 8 libdispatch.dylib 0x000000010ac55792 _dispatch_client_callout + 8
      [ERROR] : 9 libdispatch.dylib 0x000000010ac3828d _dispatch_block_invoke_direct + 358
      [ERROR] : 10 CFNetwork 0x0000000105dacf88 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
      [ERROR] : 11 CoreFoundation 0x0000000108a10be4 CFArrayApplyFunction + 68
      [ERROR] : 12 CFNetwork 0x0000000105dace5e _ZN19RunloopBlockContext7performEv + 132
      [ERROR] : 13 CFNetwork 0x0000000105daccf8 _ZN17MultiplexerSource7performEv + 282
      [ERROR] : 14 CFNetwork 0x0000000105dacb2b _ZN17MultiplexerSource8_performEPv + 65
      [ERROR] : 15 CoreFoundation 0x0000000108a63c01 _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17
      [ERROR] : 16 CoreFoundation 0x0000000108a490cf __CFRunLoopDoSources0 + 527
      [ERROR] : 17 CoreFoundation 0x0000000108a485ff __CFRunLoopRun + 911
      [ERROR] : 18 CoreFoundation 0x0000000108a48016 CFRunLoopRunSpecific + 406
      [ERROR] : 19 CFNetwork 0x0000000105fc3f6a _ZL27_privateRunloopEmulationSetPv + 250
      [ERROR] : 20 libsystem_pthread.dylib 0x000000010afe893b _pthread_body + 180
      [ERROR] : 21 libsystem_pthread.dylib 0x000000010afe8887 _pthread_body + 0
      [ERROR] : 22 libsystem_pthread.dylib 0x000000010afe808d thread_start + 13
      – End simulator log ---------------------------------------------------------

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              threethirds Anthony Chung
              Reviewer:
              Eric Wieber
              Tester:
              Abir Mukherjee
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-11192
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code