laullon / gitx

GitX (L) - A gitk clone for OS X
http://gitx.laullon.com/
Other
839 stars 76 forks source link

Cannot open repository (silent exception logged) #63

Open peppy opened 13 years ago

peppy commented 13 years ago

When attempting to open one of my git repos, the error below is logged in console and no visible error is presented on the screen (nothing happens) no matter what method I use to load it. This specific repo is sitting inside my Dropbox folder, so some external force could have corrupt an aspect of it, but I have been unable to find any problems and can still operate on it successfully from windows git clients (Git GUI / GitExtensions) and from command line (git-status, git-commit, git-push).

I am happy to debug this myself if necessary, but thought I would post this issue before I went about doing so in case there is an easy solution to it. At very least I believe GitX should show an error message to the user for whatever reason it is failing.

11/05/17 18:28:12 GitX[71711] HIToolbox: ignoring exception '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x95f8f6ba __raiseError + 410 1 libobjc.A.dylib 0x92517509 objc_exception_throw + 56 2 CoreFoundation 0x95f8f3e8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x95f8f35a +[NSException raise:format:] + 58 4 Foundation 0x97ea09ab -[NSCFDictionary setObject:forKey:] + 185 5 GitX 0x00005193 0x0 + 20883 6 GitX 0x00009a59 0x0 + 39513 7 GitX 0x0000969e 0x0 + 38558 8 GitX 0x00009104 0x0 + 37124 9 AppKit 0x94605ddd -[NSDocument initWithContentsOfURL:ofType:error:] + 311 10 AppKit 0x94605981 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 383 11 AppKit 0x94605739 -[NSDocumentController openDocumentWithContentsOfURL:display:error:] + 886 12 AppKit 0x94604a24 -[NSDocumentController _openDocumentsWithContentsOfURLs:display:presentErrors:] + 3718 13 AppKit 0x9471e407 -[NSDocumentController openDocument:] + 352 14 AppKit 0x943f8c46 -[NSApplication sendAction:to:from:] + 112 15 AppKit 0x943f8af9 -[NSMenuItem _corePerformAction] + 435 16 AppKit 0x943f87eb -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174 17 AppKit 0x943f86da -[NSMenu performActionForItemAtIndex:] + 65 18 AppKit 0x943f868d -[NSMenu _internalPerformActionForItemAtIndex:] + 50 19 AppKit 0x943f85f3 -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97 20 AppKit 0x943f8537 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336 21 AppKit 0x943ecc61 NSSLMMenuEventHandler + 404 22 HIToolbox 0x97409c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 23 HIToolbox 0x97408ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 24 HIToolbox 0x9742b7f3 SendEventToEventTarget + 52 25 HIToolbox 0x97457e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448 26 HIToolbox 0x9747cb90 SendMenuCommandWithContextAndModifiers + 66 27 HIToolbox 0x9747cb47 SendMenuItemSelectedEvent + 121 28 HIToolbox 0x9747ca5d _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152 29 HIToolbox 0x9744c160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454 30 HIToolbox 0x9744b8bb _HandleMenuSelection2 + 465 31 HIToolbox 0x9744b6d9 _HandleMenuSelection + 53 32 AppKit 0x943e61a2 _NSHandleCarbonMenuEvent + 285 33 AppKit 0x943bad3e _DPSNextEvent + 2304 34 AppKit 0x943b9fce -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156 35 AppKit 0x9437c247 -[NSApplication run] + 821 36 AppKit 0x943742d9 NSApplicationMain + 574 37 GitX 0x00002525 0x0 + 9509 38 ??? 0x00000002 0x0 + 2 )

rapher commented 13 years ago

Same Problem here! +1 Project is located in a Dropbox directory, too. GitX works just fine.

31.05.11 12:53:33   GitX[729]   HIToolbox: ignoring exception '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key' that raised inside Carbon event dispatch
(
    0   CoreFoundation                      0x96f556ba __raiseError + 410
    1   libobjc.A.dylib                     0x92093509 objc_exception_throw + 56
    2   CoreFoundation                      0x96f553e8 +[NSException raise:format:arguments:] + 136
    3   CoreFoundation                      0x96f5535a +[NSException raise:format:] + 58
    4   Foundation                          0x97bfa9ab -[NSCFDictionary setObject:forKey:] + 185
    5   GitX                                0x00005193 0x0 + 20883
    6   GitX                                0x00009a59 0x0 + 39513
    7   GitX                                0x0000969e 0x0 + 38558
    8   GitX                                0x00009104 0x0 + 37124
    9   AppKit                              0x911ebddd -[NSDocument initWithContentsOfURL:ofType:error:] + 311
    10  AppKit                              0x911eb981 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 383
    11  AppKit                              0x911eb739 -[NSDocumentController openDocumentWithContentsOfURL:display:error:] + 886
    12  AppKit                              0x911eaa24 -[NSDocumentController _openDocumentsWithContentsOfURLs:display:presentErrors:] + 3718
    13  AppKit                              0x91307536 -[NSDocumentController(NSPrivate) _openRecentDocument:] + 410
    14  AppKit                              0x90fdec46 -[NSApplication sendAction:to:from:] + 112
    15  AppKit                              0x90fdeaf9 -[NSMenuItem _corePerformAction] + 435
    16  AppKit                              0x90fde7eb -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
    17  AppKit                              0x90fde6da -[NSMenu performActionForItemAtIndex:] + 65
    18  AppKit                              0x90fde68d -[NSMenu _internalPerformActionForItemAtIndex:] + 50
    19  AppKit                              0x90fde5f3 -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
    20  AppKit                              0x90fde537 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
    21  AppKit                              0x90fd2c61 NSSLMMenuEventHandler + 404
    22  HIToolbox                           0x959e0c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
    23  HIToolbox                           0x959dfef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
    24  HIToolbox                           0x95a027f3 SendEventToEventTarget + 52
    25  HIToolbox                           0x95a2ee87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
    26  HIToolbox                           0x95a53b90 SendMenuCommandWithContextAndModifiers + 66
    27  HIToolbox                           0x95a53b47 SendMenuItemSelectedEvent + 121
    28  HIToolbox                           0x95a53a5d _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
    29  HIToolbox                           0x95a23160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
    30  HIToolbox                           0x95a228bb _HandleMenuSelection2 + 465
    31  HIToolbox                           0x95a226d9 _HandleMenuSelection + 53
    32  AppKit                              0x90fcc1a2 _NSHandleCarbonMenuEvent + 285
    33  AppKit                              0x90fa0d3e _DPSNextEvent + 2304
    34  AppKit                              0x90f9ffce -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
    35  AppKit                              0x90f62247 -[NSApplication run] + 821
    36  AppKit                              0x90f5a2d9 NSApplicationMain + 574
    37  GitX                                0x00002525 0x0 + 9509
)
inkdeep commented 13 years ago

+1 for me as well. My project isn't in a dropbox directory. Same error from terminal usage and the open menu. console messages:

5/31/11 Jan 31, 2011|7:51p  [0x0-0x7e27e2].nl.frim.GitX[20891]  fatal: missing object 0000000000000000000000000000000000000000 for refs/remotes/qod/HEAD
5/31/11 Jan 31, 2011|7:51p  GitX[20891] Window will close!
5/31/11 Jan 31, 2011|7:51p  [0x0-0x7e27e2].nl.frim.GitX[20891]  fatal: Not a git repository (or any of the parent directories): .git
5/31/11 Jan 31, 2011|7:52p  GitX[22160] Could not connect the action discussGitX: to target of class ApplicationController
5/31/11 Jan 31, 2011|7:52p  GitX[22160] Error loading /Library/InputManagers/ConciergeLoader/ConciergeLoader.bundle/Contents/MacOS/ConciergeLoader:  dlopen(/Library/InputManagers/ConciergeLoader/ConciergeLoader.bundle/Contents/MacOS/ConciergeLoader, 265): no suitable image found.  Did find:
        /Library/InputManagers/ConciergeLoader/ConciergeLoader.bundle/Contents/MacOS/ConciergeLoader: GC capability mismatch
5/31/11 Jan 31, 2011|7:52p  GitX[22160] *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key
5/31/11 Jan 31, 2011|7:52p  GitX[22160] HIToolbox: ignoring exception '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key' that raised inside Carbon event dispatch
(
        0   CoreFoundation                      0x940656ba __raiseError + 410
        1   libobjc.A.dylib                     0x9612e509 objc_exception_throw + 56
        2   CoreFoundation                      0x940653e8 +[NSException raise:format:arguments:] + 136
        3   CoreFoundation                      0x9406535a +[NSException raise:format:] + 58
        4   Foundation                          0x95e179ab -[NSCFDictionary setObject:forKey:] + 185
        5   GitX                                0x00005193 0x0 + 20883
        6   GitX                                0x00009a59 0x0 + 39513
        7   GitX                                0x0000969e 0x0 + 38558
        8   GitX                                0x00009104 0x0 + 37124
        9   AppKit                              0x9195fddd -[NSDocument initWithContentsOfURL:ofType:error:] + 311
        10  AppKit                              0x9195f981 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 383
        11  AppKit                              0x9195f739 -[NSDocumentController openDocumentWithContentsOfURL:display:error:] + 886
        12  AppKit                              0x9195ea24 -[NSDocumentController _openDocumentsWithContentsOfURLs:display:presentErrors:] + 3718
        13  AppKit                              0x91a7b536 -[NSDocumentController(NSPrivate) _openRecentDocument:] + 410
        14  AppKit                              0x91752c46 -[NSApplication sendAction:to:from:] + 112
        15  AppKit                              0x91752af9 -[NSMenuItem _corePerformAction] + 435
        16  AppKit                              0x917527eb -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
        17  AppKit                              0x917526da -[NSMenu performActionForItemAtIndex:] + 65
        18  AppKit                              0x9175268d -[NSMenu _internalPerformActionForItemAtIndex:] + 50
        19  AppKit                              0x917525f3 -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
        20  AppKit                              0x91752537 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
        21  AppKit                              0x91746c61 NSSLMMenuEventHandler + 404
        22  HIToolbox                           0x93c73c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
        23  HIToolbox                           0x93c72ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
        24  HIToolbox                           0x93c957f3 SendEventToEventTarget + 52
        25  HIToolbox                           0x93cc1e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
        26  HIToolbox                           0x93ce6b90 SendMenuCommandWithContextAndModifiers + 66
        27  HIToolbox                           0x93ce6b47 SendMenuItemSelectedEvent + 121
        28  HIToolbox                           0x93ce6a5d _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
        29  HIToolbox                           0x93cb6160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
        30  HIToolbox                           0x93cb58bb _HandleMenuSelection2 + 465
        31  HIToolbox                           0x93cb56d9 _HandleMenuSelection + 53
        32  AppKit                              0x917401a2 _NSHandleCarbonMenuEvent + 285
        33  AppKit                              0x91714d3e _DPSNextEvent + 2304
        34  AppKit                              0x91713fce -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
        35  AppKit                              0x916d6247 -[NSApplication run] + 821
        36  AppKit                              0x916ce2d9 NSApplicationMain + 574
        37  GitX                                0x00002525 0x0 + 9509
        38  ???                                 0x00000002 0x0 + 2
)
jalperin commented 13 years ago

Try running the following command and see if you get an error: git for-each-ref --format='%(refname) %(objecttype) %(objectname) %(*objectname)'

I had the same problem. It was caused by a bad ref (I deleted a remote branch and the .git/refs folder pointed to it.

peppy commented 13 years ago

@jalperin thanks for the suggestion. It turns out that there was a reference in .git/packed-refs to a conflicted dropbox file that no longer exists. Removing this line fixed it.

This should still probably be handled in a better way than a silent exception, so I will leave this issue open for the moment.

jalperin commented 13 years ago

Agreed. Should definitely be left open as an issue. It cost me a few hours the first time it happened, because of the silent fail.

gglanzani commented 13 years ago

Same for me here, it was resolved by deleting all files containing Dropbox "conflicted copy" statement.