travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 288 forks source link

Xcode 5.02 and Xcode 5.1 beta5 #17

Closed tomasz-ondrusz closed 10 years ago

tomasz-ondrusz commented 10 years ago

It appears that a fresh install of the plugin causes Xcode to crash on launch with the following report:

Process: Xcode [2781] Path: /Applications/Xcode51-Beta5.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 5.1 (5076) Build Info: IDEFrameworks-5076000000000000~17 Code Type: X86-64 (Native) Parent Process: launchd [383] User ID: 506

Date/Time: 2014-03-07 11:29:21.380 +0000 OS Version: Mac OS X 10.8.5 (12F45) Report Version: 10

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

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018

VM Regions Near 0x18: --> __TEXT 0000000103fba000-0000000103fbb000 [ 4K] r-x/rwx SM=COW /Applications/Xcode51-Beta5.app/Contents/MacOS/Xcode

Application Specific Information: ProductBuildVersion: 5B103i

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff91b6b498 objc_msgSend_vtable3 + 24 1 com.apple.Foundation 0x00007fff933ae2e7 -[NSBundle loadAndReturnError:] + 646 2 com.apple.Foundation 0x00007fff933ae05c -[NSBundle load] + 19 3 com.apple.Xcode.DevToolsCore 0x000000010a8e8ec0 -[XCPluginManager loadPluginBundle:] + 479 4 com.apple.Xcode.DevToolsCore 0x000000010a8e88c7 -[XCPluginManager findAndLoadPluginsInDomain:] + 4302 5 com.apple.Xcode.DevToolsCore 0x000000010a8abce8 XCInitializeCoreIfNeeded + 4247 6 com.apple.dt.IDE.Xcode3Core 0x000000010a76b260 +[Xcode3CoreInitializer ide_initializeWithOptions:error:] + 16 7 com.apple.dt.IDEFoundation 0x0000000104b6a6f9 _IDEInitializeOnePlugInAndPrerequisites + 1359 8 com.apple.dt.IDEFoundation 0x0000000104b69dd6 _IDEInitializePlugIns + 980 9 com.apple.dt.IDEFoundation 0x0000000104b698c5 IDEInitialize_block_invoke + 42 10 com.apple.dt.IDEFoundation 0x0000000104b69fe0 IDESetSafeToLoadMobileDevice + 203 11 com.apple.dt.IDEKit 0x00000001050f3844 -[IDEWelcomeWindowController _showFirstLaunchExperienceIfAppropriate] + 316 12 com.apple.dt.IDEKit 0x00000001050f36eb -[IDEWelcomeWindowController openWelcomeWindowAfterFirstLaunchExperienceIfAppropriate:] + 29 13 com.apple.dt.IDEKit 0x00000001050f3617 -[IDEApplicationController applicationOpenUntitledFile:] + 230 14 com.apple.AppKit 0x00007fff8fc97c34 -[NSApplication _doOpenUntitled] + 482 15 com.apple.AppKit 0x00007fff8fc976cf 58-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]_block_invoke_0 + 233 16 com.apple.AppKit 0x00007fff8ffd96c1 __78-[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:]_block_invoke_01437 + 143 17 com.apple.AppKit 0x00007fff8fc9717b -[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:] + 760 18 com.apple.AppKit 0x00007fff8fc9566e -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completionHandler:] + 298 19 com.apple.AppKit 0x00007fff8fc95445 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 553 20 com.apple.AppKit 0x00007fff8fc9504c -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 351 21 com.apple.Foundation 0x00007fff9339c05b -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308 22 com.apple.Foundation 0x00007fff9339bebd NSAppleEventManagerGenericHandler + 106 23 com.apple.AE 0x00007fff91d80078 aeDispatchAppleEvent(AEDesc const, AEDesc, unsigned int, unsigned char) + 307 24 com.apple.AE 0x00007fff91d7fed9 dispatchEventAndSendReply(AEDesc const_, AEDesc*) + 37 25 com.apple.AE 0x00007fff91d7fd99 aeProcessAppleEvent + 318 26 com.apple.HIToolbox 0x00007fff8e2af709 AEProcessAppleEvent + 100 27 com.apple.AppKit 0x00007fff8fc91836 _DPSNextEvent + 1456 28 com.apple.AppKit 0x00007fff8fc90df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 29 com.apple.dt.DVTKit 0x00000001046b30f1 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 84 30 com.apple.AppKit 0x00007fff8fc881a3 -[NSApplication run] + 517 31 com.apple.AppKit 0x00007fff8fc2cbd6 NSApplicationMain + 869 32 libdyld.dylib 0x00007fff9198d7e1 start + 1

Thread 1:: Dispatch queue: com.apple.root.default-priority 0 libsystem_kernel.dylib 0x00007fff92da5ffa read + 10 1 com.apple.CoreFoundation 0x00007fff8a781410 _CFReadBytesFromPathAndGetFD + 480 2 com.apple.CoreFoundation 0x00007fff8a6bbcc8 _CFReadBytesFromFile + 136 3 com.apple.CoreFoundation 0x00007fff8a6ba8aa CFURLCreateDataAndPropertiesFromResource + 314 4 com.apple.CoreFoundation 0x00007fff8a6b79e7 _CFBundleCopyInfoDictionaryInDirectoryWithVersion + 1303 5 com.apple.CoreFoundation 0x00007fff8a6d3299 _CFBundleCreate + 889 6 com.apple.audio.CoreAudio 0x00007fff91fb0ce3 HALC_ShellDriverPlugIn::Open(CFString const_) + 197 7 com.apple.audio.CoreAudio 0x00007fff91fb0512 HALC_ShellDevice::_InitializeDriverPlugIn() + 382 8 com.apple.audio.CoreAudio 0x00007fff91fb024d HALC_ShellDevice::_HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&, unsigned int&, AudioObjectPropertyAddress&, bool&) const + 87 9 com.apple.audio.CoreAudio 0x00007fff91fb01e3 HasProperty_block_invoke_0 + 77 10 com.apple.audio.CoreAudio 0x00007fff91fa9073 HALB_CommandGate::ExecuteCommand(void ()() block_pointer) const + 33 11 com.apple.audio.CoreAudio 0x00007fff91fb004c HALC_ShellDevice::HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&) const + 400 12 com.apple.audio.CoreAudio 0x00007fff91fafea2 HAL_HardwarePlugIn_ObjectHasProperty(AudioHardwarePlugInInterface, unsigned int, AudioObjectPropertyAddress const) + 94 13 com.apple.audio.CoreAudio 0x00007fff91fafdc4 HALPlugIn::ObjectHasProperty(HALObject const&, AudioObjectPropertyAddress const&) const + 36 14 com.apple.audio.CoreAudio 0x00007fff91f9d0c1 HALObject::HasProperty(AudioObjectPropertyAddress const&) const + 77 15 com.apple.audio.CoreAudio 0x00007fff91fafd76 HALDevice::HasProperty(AudioObjectPropertyAddress const&) const + 620 16 com.apple.audio.CoreAudio 0x00007fff91fafac6 HALDevice::IsHidden(bool) const + 80 17 com.apple.audio.CoreAudio 0x00007fff91faeab0 HALSystem::ObjectsPublishedAndDied(unsigned int, unsigned int const, unsigned int, unsigned int const) + 688 18 com.apple.audio.CoreAudio 0x00007fff91fa79c3 HALSystem::AudioObjectsPublishedAndDied(AudioHardwarePlugInInterface_, unsigned int, unsigned int, unsigned int const, unsigned int, unsigned int const_) + 387 19 com.apple.audio.CoreAudio 0x00007fff91fa4578 HALC_ShellPlugIn::_ReconcileDeviceList(bool, bool) + 3670 20 com.apple.audio.CoreAudio 0x00007fff91f9e06b HALC_ShellPlugIn::ConnectToServer() + 231 21 com.apple.audio.CoreAudio 0x00007fff91f9c195 HAL_HardwarePlugIn_InitializeWithObjectID(AudioHardwarePlugInInterface, unsigned int) + 132 22 com.apple.audio.CoreAudio 0x00007fff91f9b122 HALPlugInManagement::CreateHALPlugIn(HALCFPlugIn const) + 1512 23 com.apple.audio.CoreAudio 0x00007fff91f99cba HALPlugInManagement::Initialize() + 312 24 com.apple.audio.CoreAudio 0x00007fff91f99b75 HALSystem::InitializeDevices() + 9 25 com.apple.audio.CoreAudio 0x00007fff91f9758e HALSystem::CheckOutInstance() + 146 26 com.apple.audio.CoreAudio 0x00007fff91fbe050 AudioObjectAddPropertyListenerInternal + 226 27 com.apple.audio.units.Components 0x000000010bf93efd AUHAL::AUHAL(ComponentInstanceRecord, unsigned int, bool) + 699 28 com.apple.audio.units.Components 0x000000010bfb5ded ComponentEntryPoint::Dispatch(ComponentParameters_, DefaultOutputAU*) + 107 29 com.apple.CoreServices.CarbonCore 0x00007fff88686fd2 CallComponentOpen + 46 30 com.apple.CoreServices.CarbonCore 0x00007fff88613cef OpenAComponent + 395 31 com.apple.CoreServices.CarbonCore 0x00007fff88613b5a OpenComponent + 17 32 com.apple.AppKit 0x00007fff9014328d _initializeCA + 994 33 com.apple.AppKit 0x00007fff90142e46 -[NSSound _postInitialization] + 390 34 com.apple.AppKit 0x00007fff90144252 -[NSSound initWithContentsOfURL:byReference:] + 252 35 com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration 0x000000010f19925c __21-[IBCocoaPlugin init]_block_invoke + 53 36 libdispatch.dylib 0x00007fff92b7ef01 _dispatch_call_block_and_release + 15 37 libdispatch.dylib 0x00007fff92b7b0b6 _dispatch_client_callout + 8 38 libdispatch.dylib 0x00007fff92b7c1fa _dispatch_worker_thread2 + 304 39 libsystem_c.dylib 0x00007fff88fc3cdb _pthread_wqthread + 404 40 libsystem_c.dylib 0x00007fff88fae191 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff92da5d16 kevent + 10 1 libdispatch.dylib 0x00007fff92b7ddea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff92b7d9ee _dispatch_mgr_thread + 54

...

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 2 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: 789 thread_create: 0 thread_set_state: 0

VM Region Summary: ReadOnly portion of Libraries: Total=293.8M resident=148.2M(50%) swapped_out_or_unallocated=145.6M(50%) Writable regions: Total=1.2G written=34.3M(3%) resident=57.1M(5%) swapped_out=40K(0%) unallocated=1.1G(95%)

REGION TYPE VIRTUAL =========== ======= CG backing stores 536K CG image 4K CG shared images 1216K CoreServices 2292K JS JIT generated code 8K JS JIT generated code (reserved) 1.0G reserved VM address space (unallocated) MALLOC 130.0M MALLOC guard page 48K Memory tag=240 4K Memory tag=242 12K Memory tag=249 156K Memory tag=251 44K SQLite page cache 2688K STACK GUARD 56.0M Stack 12.1M VM_ALLOCATE 16.2M DATA 30.9M IMAGE 528K LINKEDIT 71.1M TEXT 222.8M __UNICODE 544K mapped file 45.4M shared memory 308K =========== ======= TOTAL 1.6G TOTAL, minus reserved VM space 592.7M

Let me know if you would like a full log (too large to paste in)

travisjeffery commented 10 years ago

how do you know this is the clang-format plugin's fault? when I was working on the plugin and it'd crashed I'd see something like 'ClangFormat' in the log.

vincentiss commented 10 years ago

I also met this problem. my xCode's version is 5.1 and MacOS's version is 10.8.5. xCode crashed on every launch now….

travisjeffery commented 10 years ago

might need to pull the repo and rebuild/reinstall the plugin

michael-customlbs commented 10 years ago

I also have this problem. Completely removed the plugin, pulled the newest source, rebuilt and installed. Still have the crash.

travisjeffery commented 10 years ago

it's working for me with xcode 5.1 worth upgrading if you haven't

michael-customlbs commented 10 years ago

I do have Xcode 5.1 on OS X 10.8. I tried to change the "OS X Deployment Target" to 10.8. Now it works.

travisjeffery commented 10 years ago

ah nice. that'll be good to know for the others. thanks.

vincentiss commented 10 years ago

bingo! change the "OS X Deployment Target" to 10.8 is perfect!