Skip to content

Instantly share code, notes, and snippets.

@bobthecow
Created October 25, 2011 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobthecow/1314014 to your computer and use it in GitHub Desktop.
Save bobthecow/1314014 to your computer and use it in GitHub Desktop.
  1. Open Console, filter it by "Coda"
  2. Download this version of the Docblock plugin
  3. Install it, start Coda, watch Console for errors
  4. Open or create a PHP file and attempt to document a function, watch Console for errors
  5. Let me know what you see!

Thanks :)

@marijn
Copy link

marijn commented Oct 25, 2011

Documenting the method is no problem. Documenting the class generates the following error in the file:

<?php

Notice: Undefined offset: 4 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 197

Notice: Undefined offset: 5 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 198
  /**
   * MyTestClassForJustin class.
   * 
   */
  class MyTestClassForJustin
  {

Notice: Undefined variable: docblock in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 351

    const TEST_CONSTANT = '';

Notice: Undefined offset: 4 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 276
    /**
     * _testPrivate
     * 
     * @var mixed
     * @access private
     */
    private $_testPrivate;

    /**
     * _testProtected
     * 
     * (default value: array())
     * 
     * @var array
     * @access protected
     */
    protected $_testProtected = array();

    /**
     * testPublic
     * 
     * (default value: TRUE)
     * 
     * @var mixed
     * @access public
     */
    public $testPublic = TRUE;

    /**
     * sureWeCan function.
     * 
     * @access public
     * @param mixed MyDependency $arg_dependency
     * @param array array $arg_options. (default: array())
     * @return void
     */
    public function sureWeCan (MyDependency $arg_dependency, array $arg_options = array())
    {
      return FALSE;
    }

  }

My system.log file contains the following when I search for coda:

Oct 25 21:52:00 imac-marijn Coda[16273]: Docblock has encountered a fatal error, and will now terminate.
Oct 25 21:52:00 imac-marijn Coda[16273]: A Python runtime could be located.  You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this bundle's Info.plist file.^MThese runtime locations were attempted:^M^M@executable_path/../Frameworks/Python.framework/Versions/2.7/Python^M^M/System/Library/Frameworks/Python.framework/Versions/2.7/Python
Oct 25 21:52:00 imac-marijn [0x0-0x151151].com.panic.Coda[16273]: objc[16273]: Class CodaScriptPlugIn is implemented in both /Users/Marijn/Library/Application Support/Coda/Plug-ins/gist.codaplugin/Contents/MacOS/CodaScriptPlugIn and /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/MacOS/CodaScriptPlugIn. One of the two will be used. Which one is undefined.
Oct 25 21:52:02 imac-marijn Coda[16273]: *** WARNING: Method selectedRowEnumerator in class HUDTableView is deprecated. It will be removed in a future release and should no longer be used.
Oct 25 21:52:33 imac-marijn Coda[16273]: *** WARNING: Method selectRow:byExtendingSelection: in class PCSourceTableView is deprecated. It will be removed in a future release and should no longer be used.

@marijn
Copy link

marijn commented Oct 25, 2011

I've removed the existing plugin from my ~/Library/Application Support/Coda/Plugins directory.
This yields the following class output:

<?php

Notice: Undefined offset: 4 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 197

Notice: Undefined offset: 5 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 198

  /**
   * MyTestClassForJustin class.
   * 
   */
  class MyTestClassForJustin
  {

Notice: Undefined variable: docblock in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 351

    const TEST_CONSTANT = '';

Notice: Undefined offset: 4 in /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/Resources/28E7D08A-1719-4226-A247-D80156DF47D7/docblock.php on line 276

    /**
     * _testPrivate
     * 
     * @var mixed
     * @access private
     */
    private $_testPrivate;

    /**
     * _testProtected
     * 
     * (default value: array())
     * 
     * @var array
     * @access protected
     */
    protected $_testProtected = array();

    /**
     * testPublic
     * 
     * (default value: TRUE)
     * 
     * @var mixed
     * @access public
     */
    public $testPublic = TRUE;

    /**
     * sureWeCan function.
     * 
     * @access public
     * @param mixed MyDependency $arg_dependency
     * @param array array $arg_options. (default: array())
     * @return void
     */
    public function sureWeCan (MyDependency $arg_dependency, array $arg_options = array())
    {
      return FALSE;
    }

  }

And the following entries in my log file:

Oct 25 22:03:34 imac-marijn Coda[16399]: Docblock has encountered a fatal error, and will now terminate.
Oct 25 22:03:34 imac-marijn Coda[16399]: A Python runtime could be located.  You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this bundle's Info.plist file.^MThese runtime locations were attempted:^M^M@executable_path/../Frameworks/Python.framework/Versions/2.7/Python^M^M/System/Library/Frameworks/Python.framework/Versions/2.7/Python
Oct 25 22:03:34 imac-marijn [0x0-0x154154].com.panic.Coda[16399]: objc[16399]: Class CodaScriptPlugIn is implemented in both /Users/Marijn/Library/Application Support/Coda/Plug-ins/gist.codaplugin/Contents/MacOS/CodaScriptPlugIn and /Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin/Contents/MacOS/CodaScriptPlugIn. One of the two will be used. Which one is undefined.
Oct 25 22:03:40 imac-marijn Coda[16399]: *** WARNING: Method selectRow:byExtendingSelection: in class PCSourceTableView is deprecated. It will be removed in a future release and should no longer be used.
Oct 25 22:03:58 imac-marijn Coda[16399]: *** WARNING: Method selectedRowEnumerator in class HUDTableView is deprecated. It will be removed in a future release and should no longer be used.

I'm not sure if it's making any real difference. I've restarted coda after removing the old plugin.

@bobthecow
Copy link
Author

It shouldn't do that. The new version isn't even PHP, it's written in Python. This error is definitely caused by an old version of the plugin. It looks like it's here:

/Users/Marijn/Library/Application Support/Coda/Plug-ins/PHP Docblock.codaplugin

@marijn
Copy link

marijn commented Oct 25, 2011

Ok, here is the new output:

 Tuesday, October 25, 2011, week  10:47:53 PM Europe/Amsterdam 
Oct 25 22:48:01 imac-marijn Coda[16960]: Docblock has encountered a fatal error, and will now terminate.
Oct 25 22:48:01 imac-marijn Coda[16960]: A Python runtime could be located.  You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this bundle's Info.plist file.^MThese runtime locations were attempted:^M^M@executable_path/../Frameworks/Python.framework/Versions/2.7/Python^M^M/System/Library/Frameworks/Python.framework/Versions/2.7/Python

@marijn
Copy link

marijn commented Oct 25, 2011

The plug-in won't show up in the menubar.

@iamnoskcaj
Copy link

I got this (with only your new DocBlock.codaplugin installed)

10/25/11 4:59:58.675 PM Coda: NSExceptionHandler has recorded the following exception:
OC_PythonException -- <type 'exceptions.ImportError'>: No module named GenerateDocblock
Stack trace: 0x4ad12d 0x91916149 0x8a3e0bd 0x8a2b602 0x98c83cd4 0x98c83a22 0x904ab091 0x97b9fcb3 0x97c93caf 0x97c9392c 0x97c92fb5 0x97f6bdab 0x97f6bdde 0x97f7000f 0x97dd9a10 0x97c08916 0x9602c920 0x95ea8803 0x95ea7c80 0x95ebcaa9 0x9602cde4 0x9602ce4e 0x96097697 0x95ef93f9 0x96088574 0x95ef10b2 0x95ef0e31 0x97b04356 0x97a9462e 0x97a938ab 0x97a8fc22 0x97d2418a 0x2b62 0x2a89 0x2
10/25/11 4:59:59.376 PM Coda: A possible error occurred: (OC_PythonException) <type 'exceptions.ImportError'>: No module named GenerateDocblock

NSExceptionHandlerExceptionRaiser (in ExceptionHandling) + 200
objc_exception_throw (in libobjc.A.dylib) + 155
PyObjCErr_ToObjCWithGILState (in _objc.so) + 56
0x08a2b602 (in _objc.so) + 5556
ffi_closure_SYSV_inner (in libffi.dylib) + 154
ffi_closure_SYSV (in libffi.dylib) + 34
-[NSObject performSelector:withObject:](in CoreFoundation) + 65
-[NSApplication sendAction:to:from:](in AppKit) + 232
-[NSMenuItem corePerformAction](in AppKit) + 536
-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:](in AppKit) + 171
-[NSMenu performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:](in AppKit) + 79
-[NSMenu performActionForItemAtIndex:](in AppKit) + 65
-[NSMenu internalPerformActionForItemAtIndex:](in AppKit) + 45
-[NSMenuItem internalPerformActionThroughMenuIfPossible](in AppKit) + 106
-[NSCarbonMenuImpl carbonCommandProcessEvent:handlerCallRef:](in AppKit) + 172
NSSLMMenuEventHandler (in AppKit) + 452
InvokeEventHandlerUPP(OpaqueEventHandlerCallRef, OpaqueEventRef
, void
, long (
)(OpaqueEventHandlerCallRef
, OpaqueEventRef
, void*)) (in HIToolbox) + 36
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec (in HIToolbox) + 1602
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec (in HIToolbox) + 482
SendEventToEventTarget (in HIToolbox) + 76
_ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef (in HIToolbox) + 482
SendMenuCommandWithContextAndModifiers (in HIToolbox) + 70
SendMenuItemSelectedEvent (in HIToolbox) + 275
ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 (in HIToolbox) + 129
_ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt (in HIToolbox) + 608
_HandleMenuSelection2 (in HIToolbox) + 636
_HandleMenuSelection (in HIToolbox) + 53
_NSHandleCarbonMenuEvent (in AppKit) + 302
_DPSNextEvent (in AppKit) + 2196
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:](in AppKit) + 113
-[NSApplication run](in AppKit) + 911
NSApplicationMain (in AppKit) + 1054
_start (in Coda) + 216
start (in Coda) + 41
0x00000002 (in Coda)
10/25/11 4:59:59.383 PM Coda: An uncaught exception was raised
10/25/11 4:59:59.383 PM Coda: <type 'exceptions.ImportError'>: No module named GenerateDocblock
10/25/11 4:59:59.386 PM Coda: (
0 CoreFoundation 0x90555d87 __raiseError + 231
1 libobjc.A.dylib 0x91916149 objc_exception_throw + 155
2 ExceptionHandling 0x004acf08 -[NSExceptionHandler _handleException:mask:] + 1422
3 ExceptionHandling 0x004ad14d NSExceptionHandlerExceptionRaiser + 232
4 libobjc.A.dylib 0x91916149 objc_exception_throw + 155
5 _objc.so 0x08a3e0bd PyObjCErr_ToObjCWithGILState + 56
6 _objc.so 0x08a2b602 PyObjCFFI_MakeBlockFunction + 5890
7 libffi.dylib 0x98c83cd4 ffi_closure_SYSV_inner + 154
8 libffi.dylib 0x98c83a22 ffi_closure_SYSV + 34
9 CoreFoundation 0x904ab091 -[NSObject performSelector:withObject:] + 65
10 AppKit 0x97b9fcb3 -[NSApplication sendAction:to:from:] + 232
11 AppKit 0x97c93caf -[NSMenuItem _corePerformAction] + 536
12 AppKit 0x97c9392c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 171
13 AppKit 0x97c92fb5 -[NSMenu _performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:] + 79
14 AppKit 0x97f6bdab -[NSMenu performActionForItemAtIndex:] + 65
15 AppKit 0x97f6bdde -[NSMenu _internalPerformActionForItemAtIndex:] + 45
16 AppKit 0x97f7000f -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 106
17 AppKit 0x97dd9a10 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 172
18 AppKit 0x97c08916 NSSLMMenuEventHandler + 452
19 HIToolbox 0x9602c920 _Z22_InvokeEventHandlerUPPP25OpaqueEventHandlerCallRefP14OpaqueEventRefPvPFlS0_S2_S3_E + 36
20 HIToolbox 0x95ea8803 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1602
21 HIToolbox 0x95ea7c80 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 482
22 HIToolbox 0x95ebcaa9 SendEventToEventTarget + 76
23 HIToolbox 0x9602cde4 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 482
24 HIToolbox 0x9602ce4e SendMenuCommandWithContextAndModifiers + 70
25 HIToolbox 0x96097697 SendMenuItemSelectedEvent + 275
26 HIToolbox 0x95ef93f9 ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 129
27 HIToolbox 0x96088574 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 608
28 HIToolbox 0x95ef10b2 _HandleMenuSelection2 + 636
29 HIToolbox 0x95ef0e31 _HandleMenuSelection + 53
30 AppKit 0x97b04356 _NSHandleCarbonMenuEvent + 302
31 AppKit 0x97a9462e _DPSNextEvent + 2196
32 AppKit 0x97a938ab -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
33 AppKit 0x97a8fc22 -[NSApplication run] + 911
34 AppKit 0x97d2418a NSApplicationMain + 1054
35 Coda 0x00002b62 _start + 216
36 Coda 0x00002a89 start + 41
)
10/25/11 4:59:59.386 PM Coda: NSExceptionHandler has recorded the following exception:
OC_PythonException -- <type 'exceptions.ImportError'>: No module named GenerateDocblock
Stack trace: 0x96158273 0x95ea87c9 0x95ea7c80 0x95ebcaa9 0x9602cde4 0x9602ce4e 0x96097697 0x95ef93f9 0x96088574 0x95ef10b2 0x95ef0e31 0x97b04356 0x97a9462e 0x97a938ab 0x97a8fc22 0x97d2418a 0x2b62 0x2a89 0x2
10/25/11 4:59:59.547 PM Coda: A possible error occurred: (OC_PythonException) <type 'exceptions.ImportError'>: No module named GenerateDocblock

HIReportUnhandledException (in HIToolbox) + 42
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec (in HIToolbox) + 1544
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec (in HIToolbox) + 482
SendEventToEventTarget (in HIToolbox) + 76
_ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef (in HIToolbox) + 482
SendMenuCommandWithContextAndModifiers (in HIToolbox) + 70
SendMenuItemSelectedEvent (in HIToolbox) + 275
ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 (in HIToolbox) + 129
_ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt (in HIToolbox) + 608
_HandleMenuSelection2 (in HIToolbox) + 636
_HandleMenuSelection (in HIToolbox) + 53
_NSHandleCarbonMenuEvent (in AppKit) + 302
_DPSNextEvent (in AppKit) + 2196
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:](in AppKit) + 113
-[NSApplication run](in AppKit) + 911
NSApplicationMain (in AppKit) + 1054
_start (in Coda) + 216
start (in Coda) + 41
0x00000002 (in Coda)
10/25/11 4:59:59.607 PM Coda: NSExceptionHandler has recorded the following exception:
NSUncaughtSystemExceptionException -- Uncaught system exception: signal 10
Stack trace: 0x4ad2fd 0x9262d59b 0xffffffff 0xc4e4bbfe
10/25/11 4:59:59.718 PM Coda: A possible error occurred: (NSUncaughtSystemExceptionException) Uncaught system exception: signal 10

NSExceptionHandlerUncaughtSignalHandler (in ExceptionHandling) + 60
_sigtramp (in libsystem_c.dylib) + 43
0xffffffff
0xc4e4bbfe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment