3
votes

I updated Xcore from v5.1 to v6.1.1 on OSX 10.9.5, and now the iOS Simulator will not start. It reports an error 'Unable to boot the device'.

I found other posts, such as IOS 8 Simulator unable to boot and Unable to boot the iOS Simulator - xcode 6.0.1, but the solutions in those posts do not work.

I've tried:

  1. reinstall xcode 6.1.1
  2. change xcode from 6.1 to 5.1 and back
  3. add/remove simulator device
  4. set correct command line tools
  5. reset simulator connect and setting
  6. delete the DerivedData

All above solutions did not solve the problem. There are some crash logs when starting the ios simulator.

Here are related logging:

Process:         launchd_sim [517]
Path:            /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/sbin/launchd_sim
Identifier:      launchd_sim
Version:         2.0.0 (560.3.4)
Code Type:       X86-64 (Native)
Parent Process:  launchd [164]
Responsible:     launchd_sim [517]
User ID:         501

Date/Time:       2014-12-28 13:32:33.265 +0800
OS Version:      Mac OS X 10.9.5 (13F34)
Report Version:  11
Anonymous UUID:  1DE0E720-8BE2-F93D-B888-E9EB45328623


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

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   launchd_sim                     0x000000010a1a9350 0x10a182000 + 160592
1   launchd_sim                     0x000000010a1868a9 0x10a182000 + 18601
2   libdyld.dylib                   0x000000010a5ae145 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010a1b2fa7  rbx: 0x000000010a1b2f97  rcx: 0x000000010a1bead8  rdx: 0xffffffffffffffff
rdi: 0x0000000000000002  rsi: 0x00000000000001c0  rbp: 0x00007fff55a7d930  rsp: 0x00007fff55a7d860
r8: 0x0000000000000000   r9: 0x000000010a682600  r10: 0x00000000000045c8  r11: 0x000000010a8c815f
r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x00007fff55a7da80  r15: 0x0000000000000000
rip: 0x000000010a1a9350  rfl: 0x0000000000010283  cr2: 0x000000010a63db98

Logical CPU:     3
Error Code:      0x00000000
Trap Number:     6


Binary Images:
0x10a182000 -        0x10a1bafff +launchd_sim (2.0.0 - 560.3.4) <AAAFA861-0E11-3137-B438-BDDAD2793F55> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/sbin/launchd_sim
0x10a1c9000 -        0x10a1ed61f +dyld_sim (239.4) <EE50CD24-1E90-32CE-A2A6-9D5777ED53A6> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim
0x10a233000 -        0x10a23afff +libSystem.dylib (1213) <515F42A5-6E61-352F-9784-C75A1292B711> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libSystem.dylib
0x10a243000 -        0x10a43b74f +libobjc.A.dylib (647.1) <576F0DE8-DC61-357E-B54E-0C6E622AB95B> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libobjc.A.dylib
0x10a460000 -        0x10a465ff7 +libcache_sim.dylib (69) <7BA055A9-A632-39A7-89CA-76040A0B1B4A> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libcache_sim.dylib
0x10a46b000 -        0x10a47afff +libcommonCrypto.dylib (60061) <4FC0684B-1435-317D-9622-5528E6891D1E> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libcommonCrypto.dylib
0x10a489000 -        0x10a490fff +libcompiler_rt.dylib (60.3) <3BCC5FFD-F7D5-3428-8875-4F75DDD80904> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libcompiler_rt.dylib
0x10a49a000 -        0x10a4a2ff7 +libcopyfile.dylib (119.1.1) <5704F196-9089-39A0-81AF-D0DDF0075D58> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libcopyfile.dylib
0x10a4a9000 -        0x10a526fff +libcorecrypto.dylib (234.1.2) <0B51D5C2-03CD-30F4-B2DA-7442E80ECDA5> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libcorecrypto.dylib
0x10a562000 -        0x10a589fff +libdispatch.dylib (443.3.3) <9CB452C0-FC46-3447-BBAD-A6E100EDF5E5> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libdispatch.dylib
0x10a5ac000 -        0x10a5aeff7 +libdyld.dylib (353.5) <D4880F20-C90B-39C0-970F-44A45D6B3AF0> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libdyld.dylib
0x10a5b5000 -        0x10a5b5ff7 +liblaunch.dylib (560.3.4) <01747FC0-882D-3570-A15C-ECF5091B71D0> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/liblaunch.dylib
0x10a5bc000 -        0x10a5c2fff +libmacho_sim.dylib (857) <305B4A1E-8138-3867-9FC1-C99EF196BCC1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libmacho_sim.dylib
0x10a5c9000 -        0x10a5cbfff +libremovefile.dylib (35) <CDBD2F0C-2264-3959-974B-C01CFE9764F2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libremovefile.dylib
0x10a5d1000 -        0x10a5eaff7 +libsystem_asl.dylib (267) <A0A1AA90-5B6A-351B-B3D0-0E08329C43C7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_asl.dylib
0x10a5f8000 -        0x10a5f9fff +libsystem_sim_blocks.dylib (65) <2D04A6AD-DAB1-33BA-8384-4F505A9B4847> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_blocks.dylib
0x10a5ff000 -        0x10a69bfff +libsystem_sim_c.dylib (1046) <E000605A-4E5E-38C8-A389-7BB04B97A7D4> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_c.dylib
0x10a6c6000 -        0x10a6c9fff +libsystem_sim_configuration.dylib (700.3.1) <5683916A-3F9F-31D7-9943-90E5E126C1A3> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_configuration.dylib
0x10a6d0000 -        0x10a6d1fff +libsystem_coreservices.dylib (7) <94F5BEBA-D238-32BF-8BD2-B050D2F704FD> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_coreservices.dylib
0x10a6d7000 -        0x10a6ecfff +libsystem_coretls.dylib (35.3.2) <0C120C14-A473-39E6-BCD4-CE9393E9735E> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_coretls.dylib
0x10a6fe000 -        0x10a707ff7 +libsystem_sim_dnssd.dylib (561) <5C4C13B8-ED6D-3A44-BC74-4E096C29FAEF> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_dnssd.dylib
0x10a70e000 -        0x10a739fff +libsystem_sim_info.dylib (459) <94819159-805A-3A3F-B836-E8B45A6DBC09> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_info.dylib
0x10a74c000 -        0x10a750ff7 +libsystem_sim_kernel.dylib (141) <AAEC320A-EAD7-3B81-83AF-8F8DF00757B2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_kernel.dylib
0x10a757000 -        0x10a788fe7 +libsystem_sim_m.dylib (3086.1) <166D1241-FC71-362E-BB19-F10DB0578001> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_m.dylib
0x10a790000 -        0x10a7aefff +libsystem_malloc.dylib (55.3.1) <FAE6F4E0-7BB1-3283-BC8E-2388E8E2B353> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_malloc.dylib
0x10a7b8000 -        0x10a7f9ff7 +libsystem_network.dylib (410.1) <9C75D513-B1DB-308F-8169-882375A38F8B> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_network.dylib
0x10a81f000 -        0x10a82afff +libsystem_notify.dylib (134.1.1) <CE924059-1CB3-3075-B56F-A96069F46BC2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_notify.dylib
0x10a833000 -        0x10a836ff7 +libsystem_sim_platform.dylib (141) <BDAFD2D9-6204-3A85-BB48-60DD2B1D5DA1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_platform.dylib
0x10a83c000 -        0x10a83dfff +libsystem_sim_pthread.dylib (141) <1E4C9CA4-6CF0-3D7E-BB4A-5DB255DEF39B> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_pthread.dylib
0x10a843000 -        0x10a846fff +libsystem_sim_sandbox.dylib (359.1.1) <D52833FB-E840-314A-9DF5-E030B5C6CAD9> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_sandbox.dylib
0x10a84d000 -        0x10a854fff +libsystem_sim_trace.dylib (72) <F7D50A34-7BCF-3AEA-B294-D2DC9D971758> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libsystem_sim_trace.dylib
0x10a85e000 -        0x10a864ff7 +libunwind_sim.dylib (126.2) <BE0D0D9B-A792-3614-89DD-750B0473AE7D> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libunwind_sim.dylib
0x10a86c000 -        0x10a898fff +libxpc.dylib (560.3.4) <464E62EA-4CF2-3FEF-9C17-692AD8D66AA8> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/libxpc.dylib
0x10a8b6000 -        0x10a8d2ff7  libsystem_kernel.dylib (2422.115.4) <9EDE872E-2A9E-3A78-8E1D-AB790794A098> /usr/lib/system/libsystem_kernel.dylib
0x10a8f6000 -        0x10a8fcff7  libsystem_platform.dylib (24.90.1) <3C3D3DA8-32B9-3243-98EC-D89B9A1670B3> /usr/lib/system/libsystem_platform.dylib
0x10a90f000 -        0x10a916ff7  libsystem_pthread.dylib (53.1.4) <AB498556-B555-310E-9041-F67EC9E00E2C> /usr/lib/system/libsystem_pthread.dylib
0x10a922000 -        0x10a94ffff +libc++abi.dylib (126.2) <C601D38D-DBB7-37A1-8ECA-772C6AF5C1C6> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libc++abi.dylib
0x10a95e000 -        0x10a9c9fff +libc++.1.dylib (235.1) <F554D397-7776-3652-A236-69661F56110E> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libc++.1.dylib
0x7fff6d7f6000 -     0x7fff6d829817  dyld (239.4) <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 477
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=8456K resident=3380K(40%) swapped_out_or_unallocated=5076K(60%)
Writable regions: Total=18.0M written=320K(2%) resident=476K(3%) swapped_out=0K(0%) unallocated=17.5M(97%)

REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                             9396K
MALLOC (admin)                       16K
STACK GUARD                        56.0M
Stack                              8192K
VM_ALLOCATE                           8K
__DATA                              892K
__LINKEDIT                         2160K
__TEXT                             6308K
shared memory                         4K
===========                      =======
TOTAL                              82.3M
3
You stated that there are crash logs, but you have not provided them. Please provide the launchd_sim crash log.Jeremy Huddleston Sequoia
@Jeremy , i have upload the correct logcatals.liu

3 Answers

2
votes

The most frequent cause of this problem is when DYLD_INSERT_LIBRARIES is set to an OS X library.

I suggest you unset DYLD_INSERT_LIBRARIES (likely in /etc/launchd.conf) or otherwise uninstall the product that set it, and then reboot.

OS X Yosemite has a software change to deal with this situation, so if you need the product that was setting DYLD_INSERT_LIBRARIES, I suggest you update to OS X Yosemite for your development.


However, now that you have provided the crash log, I can tell you that the issue is likely an issue on your system. launchd_sim is aborting because it can't create the a directory in /private/tmp. I suspect you have modified the permissions of /private/tmp such that something like this fails:

mkdir /private/tmp/com.apple.CoreSimulator.SimDevice.FE1168B2-EE8D-4C69-8AE7-99F5A80F808B.launchd_sim

You should fix permissions on /private/tmp and prevent them from getting messed up in the future. Plenty of other things will break other than the iOS Simulator as a result of this.

1
votes

iOS 8.3, XCode 6.3 I had observed a similar call stack at: ~/Library/Logs/DiagnosticReports/launchd_sim_<datestamp>_<yourHostName>.crash

I'm going to emphasize what Jeremy Huddleston Sequoia stated that the permissions are to blame in some cases. (as in mine)

Fix:
sudo diskutil repairPermissions / - repairs permissions of system directories (like if /tmp is incorrect).

This worked for me in the case that I didn't have the DYLD_INSERT_LIBRARIES variable set. (i.e. "echo $DYLD_INSERT_LIBRARIES" returned blank). I was really banging my head on this one. I had uninstalled Xcode/rebooted/deleted Simulators/etc as described in multiple different S.O. posts.

Root Cause:
The problem stemmed from another application which was complaining about not having write access to the /tmp folder so I changed the permissions not knowing the full consequence of my actions. Running the diskutil command above fixed that and some more folders that it found were not set as they should be. Now my simulator runs and I can continue my UI debugging in Xcode.

Great answer Jeremy! Thank you!!

0
votes

I did a sudo chown $user:wheel /private/tmp instead and it seem to have solved it for me.