1056: Corona Sim Crashes

Corona Simulator Generic Error

 

 

File: NSGenericException

 

NSGenericException: *** Collection < nsarraym:> was mutated while being enumerated.</ nsarraym:>

(

    0   CoreFoundation                      0x00007fff888f80a6 __exceptionPreprocess + 198

    1   libobjc.A.dylib                     0x00007fff84c283f0 objc_exception_throw + 43

    2   CoreFoundation                      0x00007fff8898bf98 __NSFastEnumerationMutationHandler + 232

    3   network.dylib                       0x000000010279d9c1 -[NSConnectionManager cancelAllConnections] + 146

    4   network.dylib                       0x00000001027a09c6 _ZN6Corona14NetworkLibrary18ProcessSystemEventEP9lua_State + 202

    5   Corona Simulator                    0x000000010009daf1 luaD_precall + 1096

    6   Corona Simulator                    0x00000001000acca6 luaV_execute + 4732

    7   Corona Simulator                    0x000000010009dcca luaD_call + 106

    8   Corona Simulator                    0x00000001000ad371 luai_objcttry + 25

    9   Corona Simulator                    0x000000010009df82 luaD_pcall + 113

    10  Corona Simulator  NSGenericException

 

 

Haakon - can you give us a bit more detail than this? When it happens, etc, would be useful.

The segfault happens because of xhr long polling requests used by for instance PubNub. If a network request is open when the simulator is reloaded, the simulator crashes.

Hope this helps :slight_smile:

@Haakon

We have pushed a minor change to the way we cancel network requests and that should appear in daily builds, however the stack trace for the issue looks slightly different than yours. Could you provide additional detail on the actual request call you are making?

Regards,

Bryan

Hi,

unfortunately the new daily did not solve the issue. Here’s the xcode stack trace:

Process:         Corona Simulator [9466]

Path:            /Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator

Identifier:      com.anscamobile.Corona_Simulator

Version:         2013.1058 (2013.1058)

Code Type:       X86-64 (Native)

Parent Process:  bash [9464]

User ID:         501

Date/Time:       2013-03-22 22:45:02.048 +0100

OS Version:      Mac OS X 10.8.3 (12D78)

Report Version:  10

Interval Since Last Report:          23727 sec

Crashes Since Last Report:           1

Per-App Interval Since Last Report:  14 sec

Per-App Crashes Since Last Report:   1

Anonymous UUID:                      0ECD8D31-A89A-25D8-6847-1C2EE7930C6C

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x000000ff0000010f

VM Regions Near 0xff0000010f:

    CG backing stores      00000001c8bb7000-00000001c9287000 [6976K] rw-/rw- SM=SHM  

–> 

    STACK GUARD            00007fff5bc00000-00007fff5f400000 [56.0M] —/rwx SM=NUL  stack guard for thread 0

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.anscamobile.Corona_Simulator    0x00000001000a7025 luaS_newlstr + 114

1   com.anscamobile.Corona_Simulator    0x00000001000966a3 lua_pushlstring + 60

2   com.anscamobile.Corona_Simulator    0x000000010008df65 0x100000000 + 581477

3   network.dylib                     0x000000010164dc64 -[LuaCallback callWithNetworkRequestState:] + 263

4   network.dylib                     0x000000010164bd38 -[CoronaConnectionDelegate connectionDidFinishLoading:] + 1640

5   com.apple.Foundation              0x00007fff80b1c528 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 28

6   com.apple.Foundation              0x00007fff80b1c46c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 227

7   com.apple.Foundation              0x00007fff80b1c368 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 63

8   com.apple.CFNetwork               0x00007fff8b7ff5c1 ___delegate_didFinishLoading_block_invoke_0 + 40

9   com.apple.CFNetwork               0x00007fff8b7f1a7a ___withDelegateAsync_block_invoke_0 + 90

10  com.apple.CFNetwork               0x00007fff8b8822ea __block_global_1 + 28

11  com.apple.CoreFoundation          0x00007fff82318154 CFArrayApplyFunction + 68

12  com.apple.CFNetwork               0x00007fff8b7e27e4 RunloopBlockContext::perform() + 124

13  com.apple.CFNetwork               0x00007fff8b7e26bb MultiplexerSource::perform() + 221

14  com.apple.CoreFoundation          0x00007fff822f9b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

15  com.apple.CoreFoundation          0x00007fff822f9455 __CFRunLoopDoSources0 + 245

16  com.apple.CoreFoundation          0x00007fff8231c7f5 __CFRunLoopRun + 789

17  com.apple.CoreFoundation          0x00007fff8231c0e2 CFRunLoopRunSpecific + 290

18  com.apple.HIToolbox               0x00007fff8257aeb4 RunCurrentEventLoopInMode + 209

19  com.apple.HIToolbox               0x00007fff8257ab94 ReceiveNextEventCommon + 166

20  com.apple.HIToolbox               0x00007fff8257aae3 BlockUntilNextEventMatchingListInMode + 62

21  com.apple.AppKit                  0x00007fff8a2e2563 _DPSNextEvent + 685

22  com.apple.AppKit                  0x00007fff8a2e1e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128

23  com.apple.AppKit                  0x00007fff8a2d91d3 -[NSApplication run] + 517

24  com.apple.AppKit                  0x00007fff8a27dc06 NSApplicationMain + 869

25  com.anscamobile.Corona_Simulator    0x0000000100001ea4 start + 52

Hi,

any progress here?

Haakon - can you give us a bit more detail than this? When it happens, etc, would be useful.

The segfault happens because of xhr long polling requests used by for instance PubNub. If a network request is open when the simulator is reloaded, the simulator crashes.

Hope this helps :slight_smile:

@Haakon

We have pushed a minor change to the way we cancel network requests and that should appear in daily builds, however the stack trace for the issue looks slightly different than yours. Could you provide additional detail on the actual request call you are making?

Regards,

Bryan

Hi,

unfortunately the new daily did not solve the issue. Here’s the xcode stack trace:

Process:         Corona Simulator [9466]

Path:            /Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator

Identifier:      com.anscamobile.Corona_Simulator

Version:         2013.1058 (2013.1058)

Code Type:       X86-64 (Native)

Parent Process:  bash [9464]

User ID:         501

Date/Time:       2013-03-22 22:45:02.048 +0100

OS Version:      Mac OS X 10.8.3 (12D78)

Report Version:  10

Interval Since Last Report:          23727 sec

Crashes Since Last Report:           1

Per-App Interval Since Last Report:  14 sec

Per-App Crashes Since Last Report:   1

Anonymous UUID:                      0ECD8D31-A89A-25D8-6847-1C2EE7930C6C

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x000000ff0000010f

VM Regions Near 0xff0000010f:

    CG backing stores      00000001c8bb7000-00000001c9287000 [6976K] rw-/rw- SM=SHM  

–> 

    STACK GUARD            00007fff5bc00000-00007fff5f400000 [56.0M] —/rwx SM=NUL  stack guard for thread 0

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.anscamobile.Corona_Simulator    0x00000001000a7025 luaS_newlstr + 114

1   com.anscamobile.Corona_Simulator    0x00000001000966a3 lua_pushlstring + 60

2   com.anscamobile.Corona_Simulator    0x000000010008df65 0x100000000 + 581477

3   network.dylib                     0x000000010164dc64 -[LuaCallback callWithNetworkRequestState:] + 263

4   network.dylib                     0x000000010164bd38 -[CoronaConnectionDelegate connectionDidFinishLoading:] + 1640

5   com.apple.Foundation              0x00007fff80b1c528 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 28

6   com.apple.Foundation              0x00007fff80b1c46c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 227

7   com.apple.Foundation              0x00007fff80b1c368 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 63

8   com.apple.CFNetwork               0x00007fff8b7ff5c1 ___delegate_didFinishLoading_block_invoke_0 + 40

9   com.apple.CFNetwork               0x00007fff8b7f1a7a ___withDelegateAsync_block_invoke_0 + 90

10  com.apple.CFNetwork               0x00007fff8b8822ea __block_global_1 + 28

11  com.apple.CoreFoundation          0x00007fff82318154 CFArrayApplyFunction + 68

12  com.apple.CFNetwork               0x00007fff8b7e27e4 RunloopBlockContext::perform() + 124

13  com.apple.CFNetwork               0x00007fff8b7e26bb MultiplexerSource::perform() + 221

14  com.apple.CoreFoundation          0x00007fff822f9b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

15  com.apple.CoreFoundation          0x00007fff822f9455 __CFRunLoopDoSources0 + 245

16  com.apple.CoreFoundation          0x00007fff8231c7f5 __CFRunLoopRun + 789

17  com.apple.CoreFoundation          0x00007fff8231c0e2 CFRunLoopRunSpecific + 290

18  com.apple.HIToolbox               0x00007fff8257aeb4 RunCurrentEventLoopInMode + 209

19  com.apple.HIToolbox               0x00007fff8257ab94 ReceiveNextEventCommon + 166

20  com.apple.HIToolbox               0x00007fff8257aae3 BlockUntilNextEventMatchingListInMode + 62

21  com.apple.AppKit                  0x00007fff8a2e2563 _DPSNextEvent + 685

22  com.apple.AppKit                  0x00007fff8a2e1e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128

23  com.apple.AppKit                  0x00007fff8a2d91d3 -[NSApplication run] + 517

24  com.apple.AppKit                  0x00007fff8a27dc06 NSApplicationMain + 869

25  com.anscamobile.Corona_Simulator    0x0000000100001ea4 start + 52

Hi,

any progress here?

I’m getting the same Error.  here is my trace stack. I am running the newest daily build, I switched from the public release when that one was doing it, the daily build still does it.  any info would be helpful. 

Process:         Corona Simulator [633]

Path:            /Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator

Identifier:      com.coronalabs.Corona_Simulator

Version:         2013.1115 (2013.1115)

Code Type:       X86-64 (Native)

Parent Process:  bash [631]

User ID:         501

Date/Time:       2013-05-21 17:52:12.292 -0400

OS Version:      Mac OS X 10.8.3 (12D78)

Report Version:  10

Interval Since Last Report:          3629 sec

Crashes Since Last Report:           8

Per-App Interval Since Last Report:  27 sec

Per-App Crashes Since Last Report:   1

Anonymous UUID:                      552E1877-7868-C481-C0FA-526668406DC8

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: EXC_I386_GPFLT

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.coronalabs.Corona_Simulator    0x00000001000a8ecd luaS_newlstr + 114

1   com.coronalabs.Corona_Simulator    0x00000001000a56cf 0x100000000 + 677583

2   com.coronalabs.Corona_Simulator    0x00000001000a53c7 luaO_pushvfstring + 52

3   com.coronalabs.Corona_Simulator    0x000000010009ee04 luaG_runerror + 180

4   com.coronalabs.Corona_Simulator    0x000000010009eb76 luaG_typeerror + 154

5   com.coronalabs.Corona_Simulator    0x00000001000ad14c luaV_settable + 90

6   com.coronalabs.Corona_Simulator    0x0000000100098a4f lua_setfield + 83

7   network.dylib                     0x00000001017c52aa -[NetworkRequestState pushToLuaState:] + 89

8   network.dylib                     0x00000001017c5d60 -[LuaCallback callWithNetworkRequestState:] + 292

9   network.dylib                     0x00000001017c3e5b -[CoronaConnectionDelegate connectionDidFinishLoading:] + 1635

10  com.apple.Foundation              0x00007fff86512528 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 28

11  com.apple.Foundation              0x00007fff8651246c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 227

12  com.apple.Foundation              0x00007fff86512368 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 63

13  com.apple.CFNetwork               0x00007fff83c7c5c1 ___delegate_didFinishLoading_block_invoke_0 + 40

14  com.apple.CFNetwork               0x00007fff83c6ea7a ___withDelegateAsync_block_invoke_0 + 90

15  com.apple.CFNetwork               0x00007fff83cff2ea __block_global_1 + 28

16  com.apple.CoreFoundation          0x00007fff83db8154 CFArrayApplyFunction + 68

17  com.apple.CFNetwork               0x00007fff83c5f7e4 RunloopBlockContext::perform() + 124

18  com.apple.CFNetwork               0x00007fff83c5f6bb MultiplexerSource::perform() + 221

19  com.apple.CoreFoundation          0x00007fff83d99b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

20  com.apple.CoreFoundation          0x00007fff83d99455 __CFRunLoopDoSources0 + 245

21  com.apple.CoreFoundation          0x00007fff83dbc7f5 __CFRunLoopRun + 789

22  com.apple.CoreFoundation          0x00007fff83dbc0e2 CFRunLoopRunSpecific + 290

23  com.apple.HIToolbox               0x00007fff8594ceb4 RunCurrentEventLoopInMode + 209

24  com.apple.HIToolbox               0x00007fff8594cc52 ReceiveNextEventCommon + 356

25  com.apple.HIToolbox               0x00007fff8594cae3 BlockUntilNextEventMatchingListInMode + 62

26  com.apple.AppKit                  0x00007fff869a8563 _DPSNextEvent + 685

27  com.apple.AppKit                  0x00007fff869a7e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128

28  com.apple.AppKit                  0x00007fff8699f1d3 -[NSApplication run] + 517

29  com.apple.AppKit                  0x00007fff86943c06 NSApplicationMain + 869

30  com.coronalabs.Corona_Simulator    0x0000000100002684 start + 52

@atout, can you tell me more about your program?  Are you using the same networking API calls as the above post or are you just getting a SIGSEGV and not having any luck finding it?

SIGSEGV or Segment Violations happen when the program tries to access (and usually execute a block of code at) a memory location that your app doesn’t have access to.  This is typically due to a pointer to a function getting blown away and later a call back tries to access that function, but the address is no longer valid.

Typical situations where this happens is if you have an onComplete listener on a piece of audio and you’re using storyboard and you end up leaving the scene and that code’s not around for the audio to go to.  It could happen with timers or transitions, just about anything that has an onComplete and that module goes away.

I’m getting the same Error.  here is my trace stack. I am running the newest daily build, I switched from the public release when that one was doing it, the daily build still does it.  any info would be helpful. 

Process:         Corona Simulator [633]

Path:            /Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator

Identifier:      com.coronalabs.Corona_Simulator

Version:         2013.1115 (2013.1115)

Code Type:       X86-64 (Native)

Parent Process:  bash [631]

User ID:         501

Date/Time:       2013-05-21 17:52:12.292 -0400

OS Version:      Mac OS X 10.8.3 (12D78)

Report Version:  10

Interval Since Last Report:          3629 sec

Crashes Since Last Report:           8

Per-App Interval Since Last Report:  27 sec

Per-App Crashes Since Last Report:   1

Anonymous UUID:                      552E1877-7868-C481-C0FA-526668406DC8

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: EXC_I386_GPFLT

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.coronalabs.Corona_Simulator    0x00000001000a8ecd luaS_newlstr + 114

1   com.coronalabs.Corona_Simulator    0x00000001000a56cf 0x100000000 + 677583

2   com.coronalabs.Corona_Simulator    0x00000001000a53c7 luaO_pushvfstring + 52

3   com.coronalabs.Corona_Simulator    0x000000010009ee04 luaG_runerror + 180

4   com.coronalabs.Corona_Simulator    0x000000010009eb76 luaG_typeerror + 154

5   com.coronalabs.Corona_Simulator    0x00000001000ad14c luaV_settable + 90

6   com.coronalabs.Corona_Simulator    0x0000000100098a4f lua_setfield + 83

7   network.dylib                     0x00000001017c52aa -[NetworkRequestState pushToLuaState:] + 89

8   network.dylib                     0x00000001017c5d60 -[LuaCallback callWithNetworkRequestState:] + 292

9   network.dylib                     0x00000001017c3e5b -[CoronaConnectionDelegate connectionDidFinishLoading:] + 1635

10  com.apple.Foundation              0x00007fff86512528 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 28

11  com.apple.Foundation              0x00007fff8651246c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 227

12  com.apple.Foundation              0x00007fff86512368 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 63

13  com.apple.CFNetwork               0x00007fff83c7c5c1 ___delegate_didFinishLoading_block_invoke_0 + 40

14  com.apple.CFNetwork               0x00007fff83c6ea7a ___withDelegateAsync_block_invoke_0 + 90

15  com.apple.CFNetwork               0x00007fff83cff2ea __block_global_1 + 28

16  com.apple.CoreFoundation          0x00007fff83db8154 CFArrayApplyFunction + 68

17  com.apple.CFNetwork               0x00007fff83c5f7e4 RunloopBlockContext::perform() + 124

18  com.apple.CFNetwork               0x00007fff83c5f6bb MultiplexerSource::perform() + 221

19  com.apple.CoreFoundation          0x00007fff83d99b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

20  com.apple.CoreFoundation          0x00007fff83d99455 __CFRunLoopDoSources0 + 245

21  com.apple.CoreFoundation          0x00007fff83dbc7f5 __CFRunLoopRun + 789

22  com.apple.CoreFoundation          0x00007fff83dbc0e2 CFRunLoopRunSpecific + 290

23  com.apple.HIToolbox               0x00007fff8594ceb4 RunCurrentEventLoopInMode + 209

24  com.apple.HIToolbox               0x00007fff8594cc52 ReceiveNextEventCommon + 356

25  com.apple.HIToolbox               0x00007fff8594cae3 BlockUntilNextEventMatchingListInMode + 62

26  com.apple.AppKit                  0x00007fff869a8563 _DPSNextEvent + 685

27  com.apple.AppKit                  0x00007fff869a7e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128

28  com.apple.AppKit                  0x00007fff8699f1d3 -[NSApplication run] + 517

29  com.apple.AppKit                  0x00007fff86943c06 NSApplicationMain + 869

30  com.coronalabs.Corona_Simulator    0x0000000100002684 start + 52

@atout, can you tell me more about your program?  Are you using the same networking API calls as the above post or are you just getting a SIGSEGV and not having any luck finding it?

SIGSEGV or Segment Violations happen when the program tries to access (and usually execute a block of code at) a memory location that your app doesn’t have access to.  This is typically due to a pointer to a function getting blown away and later a call back tries to access that function, but the address is no longer valid.

Typical situations where this happens is if you have an onComplete listener on a piece of audio and you’re using storyboard and you end up leaving the scene and that code’s not around for the audio to go to.  It could happen with timers or transitions, just about anything that has an onComplete and that module goes away.