Segfault in native code
I'm having an issue where my editor will randomly crash while in play mode. Everything hangs and Unity quits. After pulling up the logs, I saw that it was a segfault in native code causing the issue. Does anyone know what might be causing this? I'm having a hard time deciphering the logs and am not sure where to find (or if I can find) the Unity source code in question to try to debug what I might be doing wrong. Thanks in advance for any help!
 Native stacktrace:
 
     0   libmonobdwgc-2.0.dylib              0x000000016575d3e2 mono_handle_native_crash + 241
     1   libmonobdwgc-2.0.dylib              0x00000001656cdcf0 mono_sigsegv_signal_handler + 202
     2   libsystem_platform.dylib            0x00007fff20612d7d _sigtramp + 29
     3   ???                                 0x0000000000000000 0x0 + 0
     4   Unity                               0x000000011048005e _ZL28GetCreatedRenderTextureCountPi + 14
     5   Unity                               0x000000010fdd65a2 _Z22profiler_flush_counterPv + 178
     6   Unity                               0x0000000110480e9e _ZN14GfxDeviceStats5FlushEv + 110
     7   Unity                               0x0000000110478b13 _ZN9GfxDevice16SynchronizeStatsEv + 19
     8   Unity                               0x0000000112b9e721 _ZN15GfxDeviceWorker10RunCommandER20ThreadedStreamBuffer + 17633
     9   Unity                               0x0000000112eb5dec GfxDeviceWorkerAutoreleasePoolProxy + 60
     10  Unity                               0x0000000112ba96c1 _ZN15GfxDeviceWorker6RunExtER20ThreadedStreamBuffer + 225
     11  Unity                               0x0000000112b99cc8 _ZN15GfxDeviceWorker18RunGfxDeviceWorkerEPv + 152
     12  Unity                               0x00000001102f84be _ZN6Thread16RunThreadWrapperEPv + 1214
     13  libsystem_pthread.dylib             0x00007fff205cd8fc _pthread_start + 224
     14  libsystem_pthread.dylib             0x00007fff205c9443 thread_start + 15
 
 Debug info from gdb:
 
 Check: NetworkEmulator info. Queue size 1 latency0
 UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
 UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
 UnityEngine.Logger:Log (UnityEngine.LogType,object)
 UnityEngine.Debug:Log (object)
 UnityEngine.MonoBehaviour:print (object)
 Network.NetworkEmulator:SendPacket () (at Assets/Scripts/Network/NetworkEmulator.cs:51)
 Network.NetworkEmulator:Update () (at Assets/Scripts/Network/NetworkEmulator.cs:45)
 
 (Filename: Assets/Scripts/Network/NetworkEmulator.cs Line: 51)
 
 (lldb) command source -s 0 '/tmp/mono-gdb-commands.mXyi46'
 Executing commands in '/tmp/mono-gdb-commands.mXyi46'.
 (lldb) process attach --pid 79219
 Process 79219 stopped
 * thread #1, name = 'tid_103', stop reason = signal SIGSTOP
     frame #0: 0xffffffffffffffff 
 Target 0: (No executable module.) stopped.
 
 Architecture set to: .
 (lldb) thread list
 Process 79219 stopped
 * thread #1: tid = 0x86fd41, name = 'tid_103', stop reason = signal SIGSTOP
   thread #2: tid = 0x86fd68
   thread #3: tid = 0x86fd6a
   thread #4: tid = 0x86fdd3
   thread #5: tid = 0x86fdde
   thread #6: tid = 0x86fddf
   thread #7: tid = 0x86fde0
   thread #8: tid = 0x86fde1
   thread #9: tid = 0x86fde2
   thread #10: tid = 0x86fde3
   thread #11: tid = 0x86fde4
   thread #12: tid = 0x86fde5
   thread #13: tid = 0x86fde6
   thread #14: tid = 0x86fde7
   thread #15: tid = 0x86fde8
   thread #16: tid = 0x86fde9
   thread #17: tid = 0x86fdea
   thread #18: tid = 0x86fdeb
   thread #19: tid = 0x86fdec
   thread #20: tid = 0x86fded
   thread #21: tid = 0x86fdee
   thread #22: tid = 0x86fdef
   thread #23: tid = 0x86fdf0
   thread #24: tid = 0x86fdf1
   thread #25: tid = 0x86fdf2
   thread #26: tid = 0x86fdf3
   thread #27: tid = 0x86fdf4
   thread #28: tid = 0x86fdf5
   thread #29: tid = 0x86fdf6
   thread #30: tid = 0x86fdf7
   thread #31: tid = 0x86fdf8
   thread #32: tid = 0x86fdf9
   thread #33: tid = 0x86fdfa
   thread #34: tid = 0x86fdfb
   thread #35: tid = 0x86fdfc
   thread #36: tid = 0x86fe12
   thread #37: tid = 0x86fe6d
   thread #38: tid = 0x86fe6e
   thread #39: tid = 0x86fe6f
   thread #40: tid = 0x86fe70
   thread #41: tid = 0x86fe71
   thread #42: tid = 0x86fe72
   thread #43: tid = 0x86fe73
   thread #44: tid = 0x86fe74
   thread #45: tid = 0x86fea8
   thread #46: tid = 0x86feac
   thread #47: tid = 0x86fead
   thread #48: tid = 0x86feae
   thread #49: tid = 0x86feaf
   thread #50: tid = 0x86feb0
   thread #51: tid = 0x86feb1
   thread #52: tid = 0x86feb9
   thread #53: tid = 0x86feba
   thread #54: tid = 0x86febb
   thread #55: tid = 0x86ff35
   thread #56: tid = 0x86ff36
   thread #57: tid = 0x86ff44
   thread #58: tid = 0x86ff45
   thread #59: tid = 0x86ff46
   thread #60: tid = 0x86ff80
   thread #61: tid = 0x86ff81
   thread #62: tid = 0x86ffac
   thread #63: tid = 0x86ffd4
   thread #64: tid = 0x86ffe0
   thread #65: tid = 0x86ffe6
   thread #66: tid = 0x86ffe9
   thread #67: tid = 0x86ffea
   thread #68: tid = 0x86ffeb
   thread #69: tid = 0x86ffec
   thread #70: tid = 0x86ffed
   thread #71: tid = 0x86ffee
   thread #72: tid = 0x86fff0
   thread #73: tid = 0x86fff1
   thread #74: tid = 0x86fff3
   thread #75: tid = 0x86fff4
   thread #76: tid = 0x86fff5
   thread #77: tid = 0x86fff6
   thread #78: tid = 0x870304
   thread #79: tid = 0x870462
   thread #80: tid = 0x8721fb
   thread #81: tid = 0x872227
   thread #82: tid = 0x872317
   thread #83: tid = 0x872318
   thread #84: tid = 0x872319
   thread #85: tid = 0x87231a
   thread #86: tid = 0x87231b
   thread #87: tid = 0x87231c
   thread #88: tid = 0x87231d
   thread #89: tid = 0x87231e
   thread #90: tid = 0x872321
   thread #91: tid = 0x872330
   thread #92: tid = 0x87235f
   thread #93: tid = 0x872360
   thread #94: tid = 0x872361
   thread #95: tid = 0x872362
   thread #96: tid = 0x872363
   thread #97: tid = 0x872364
   thread #98: tid = 0x872365
   thread #99: tid = 0x872366
   thread #100: tid = 0x872385
   thread #101: tid = 0x872387
   thread #102: tid = 0x872658
 (lldb) thread backtrace all
 * thread #1, name = 'tid_103', stop reason = signal SIGSTOP
   frame #0: 0xffffffffffffffff 
   thread #2
     frame #0: 0xffffffffffffffff 
   thread #3
     frame #0: 0xffffffffffffffff 
   thread #4
     frame #0: 0xffffffffffffffff 
   thread #5
     frame #0: 0xffffffffffffffff 
   thread #6
     frame #0: 0xffffffffffffffff 
   thread #7
     frame #0: 0xffffffffffffffff 
   thread #8
     frame #0: 0xffffffffffffffff 
   thread #9
     frame #0: 0xffffffffffffffff 
   thread #10
     frame #0: 0xffffffffffffffff 
   thread #11
     frame #0: 0xffffffffffffffff 
   thread #12
     frame #0: 0xffffffffffffffff 
   thread #13
     frame #0: 0xffffffffffffffff 
   thread #14
     frame #0: 0xffffffffffffffff 
   thread #15
     frame #0: 0xffffffffffffffff 
   thread #16
     frame #0: 0xffffffffffffffff 
   thread #17
     frame #0: 0xffffffffffffffff 
   thread #18
     frame #0: 0xffffffffffffffff 
   thread #19
     frame #0: 0xffffffffffffffff 
   thread #20
     frame #0: 0xffffffffffffffff 
   thread #21
     frame #0: 0xffffffffffffffff 
   thread #22
     frame #0: 0xffffffffffffffff 
   thread #23
     frame #0: 0xffffffffffffffff 
   thread #24
     frame #0: 0xffffffffffffffff 
   thread #25
     frame #0: 0xffffffffffffffff 
   thread #26
     frame #0: 0xffffffffffffffff 
   thread #27
     frame #0: 0xffffffffffffffff 
   thread #28
     frame #0: 0xffffffffffffffff 
   thread #29
     frame #0: 0xffffffffffffffff 
   thread #30
     frame #0: 0xffffffffffffffff 
   thread #31
     frame #0: 0xffffffffffffffff 
   thread #32
     frame #0: 0xffffffffffffffff 
   thread #33
     frame #0: 0xffffffffffffffff 
   thread #34
     frame #0: 0xffffffffffffffff 
   thread #35
     frame #0: 0xffffffffffffffff 
   thread #36
     frame #0: 0xffffffffffffffff 
   thread #37
     frame #0: 0xffffffffffffffff 
   thread #38
     frame #0: 0xffffffffffffffff 
   thread #39
     frame #0: 0xffffffffffffffff 
   thread #40
     frame #0: 0xffffffffffffffff 
   thread #41
     frame #0: 0xffffffffffffffff 
   thread #42
     frame #0: 0xffffffffffffffff 
   thread #43
     frame #0: 0xffffffffffffffff 
   thread #44
     frame #0: 0xffffffffffffffff 
   thread #45
     frame #0: 0xffffffffffffffff 
   thread #46
     frame #0: 0xffffffffffffffff 
   thread #47
     frame #0: 0xffffffffffffffff 
   thread #48
     frame #0: 0xffffffffffffffff 
   thread #49
     frame #0: 0xffffffffffffffff 
   thread #50
     frame #0: 0xffffffffffffffff 
   thread #51
     frame #0: 0xffffffffffffffff 
   thread #52
     frame #0: 0xffffffffffffffff 
   thread #53
     frame #0: 0xffffffffffffffff 
   thread #54
     frame #0: 0xffffffffffffffff 
   thread #55
     frame #0: 0xffffffffffffffff 
   thread #56
     frame #0: 0xffffffffffffffff 
   thread #57
     frame #0: 0xffffffffffffffff 
   thread #58
     frame #0: 0xffffffffffffffff 
   thread #59
     frame #0: 0xffffffffffffffff 
   thread #60
     frame #0: 0xffffffffffffffff 
   thread #61
     frame #0: 0xffffffffffffffff 
   thread #62
     frame #0: 0xffffffffffffffff 
   thread #63
     frame #0: 0xffffffffffffffff 
   thread #64
     frame #0: 0xffffffffffffffff 
   thread #65
     frame #0: 0xffffffffffffffff 
   thread #66
     frame #0: 0xffffffffffffffff 
   thread #67
     frame #0: 0xffffffffffffffff 
   thread #68
     frame #0: 0xffffffffffffffff 
   thread #69
     frame #0: 0xffffffffffffffff 
   thread #70
     frame #0: 0xffffffffffffffff 
   thread #71
     frame #0: 0xffffffffffffffff 
   thread #72
     frame #0: 0xffffffffffffffff 
   thread #73
     frame #0: 0xffffffffffffffff 
   thread #74
     frame #0: 0xffffffffffffffff 
   thread #75
     frame #0: 0xffffffffffffffff 
   thread #76
     frame #0: 0xffffffffffffffff 
   thread #77
     frame #0: 0xffffffffffffffff 
   thread #78
     frame #0: 0xffffffffffffffff 
   thread #79
     frame #0: 0xffffffffffffffff 
   thread #80
     frame #0: 0xffffffffffffffff 
   thread #81
     frame #0: 0xffffffffffffffff 
   thread #82
     frame #0: 0xffffffffffffffff 
   thread #83
     frame #0: 0xffffffffffffffff 
   thread #84
     frame #0: 0xffffffffffffffff 
   thread #85
     frame #0: 0xffffffffffffffff 
   thread #86
     frame #0: 0xffffffffffffffff 
   thread #87
     frame #0: 0xffffffffffffffff 
   thread #88
     frame #0: 0xffffffffffffffff 
   thread #89
     frame #0: 0xffffffffffffffff 
   thread #90
     frame #0: 0xffffffffffffffff 
   thread #91
     frame #0: 0xffffffffffffffff 
   thread #92
     frame #0: 0xffffffffffffffff 
   thread #93
     frame #0: 0xffffffffffffffff 
   thread #94
     frame #0: 0xffffffffffffffff 
   thread #95
     frame #0: 0xffffffffffffffff 
   thread #96
     frame #0: 0xffffffffffffffff 
   thread #97
     frame #0: 0xffffffffffffffff 
   thread #98
     frame #0: 0xffffffffffffffff 
   thread #99
     frame #0: 0xffffffffffffffff 
   thread #100
     frame #0: 0xffffffffffffffff 
   thread #101
     frame #0: 0xffffffffffffffff 
   thread #102
     frame #0: 0xffffffffffffffff 
 (lldb) detach
 error: Detach failed: Sending disconnect packet failed.
 
 =================================================================
 Got a SIGSEGV while executing native code. This usually indicates
 a fatal error in the mono runtime or one of the native libraries 
 used by your application.
 =================================================================
 
              
               Comment
              
 
               
              Your answer