Post by Christiaan HofmanThe latter problem is because the resizing takes a zero size as a sign that this is just added by the tool mode and therefore adapts the drag handle to the drag direction rather than having it fixed (in dragAnnotationWithEvent:). So much more should be changed if the initial size is changed.
I wonder what really gets the problem: drawing the small note, or perhaps the redisplay. What happens if you change in PDFView(SKExtensions) setNeedsDisplayForAnnotation:onPage:, or perhaps setNeedsDisplayInRect:ofPage: to handle small notes differently?
I think it's a drawing issue. From the sample, it looks to me like they've got a math issue in spline interpolation, if you look at where it's hanging. I'm not sure what to try in the display methods to work around that.
Also, the tests for "Debug" in the build shell scripts no longer work in Xcode 5, which explains why it was taking so damn long to build each time. BUILD_STYLE is no longer set, and CONFIGURATION seems to be the appropriate variable. This makes debugging much less painful, though Xcode 4 & 5…ugh.
Sample of hanging thread below; tried as attachment, but apparently we have a 40kb message limit. Welcome to 1996.
Sampling process 96703 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Skim (pid 96703) every 1 millisecond
Process: Skim [96703]
Path: /Volumes/Local/Users/amaxwell/BuildProducts/Debug/Skim.app/Contents/MacOS/Skim
Load Address: 0x100000000
Identifier: net.sourceforge.skim-app.skim
Version: 1.4.6 (80)
Code Type: X86-64
Parent Process: debugserver [96702]
Date/Time: 2013-11-09 13:55:20.578 -0800
OS Version: Mac OS X 10.9 (13A603)
Report Version: 7
Call graph:
1859 Thread_3605499 DispatchQueue_1: com.apple.main-thread (serial)
+ 1859 start (in Skim) + 52 [0x1000020c4]
+ 1859 main (in Skim) + 34 [0x100013f52] main.m:15
+ 1859 NSApplicationMain (in AppKit) + 940 [0x7fff87180803]
+ 1859 -[NSApplication run] (in AppKit) + 646 [0x7fff87195a29]
+ 1859 -[SKApplication sendEvent:] (in Skim) + 469 [0x100086d15] SKApplication.m:70
+ 1859 -[NSApplication sendEvent:] (in AppKit) + 2021 [0x7fff87345744]
+ 1859 -[SKMainWindow sendEvent:] (in Skim) + 571 [0x1000b339b] SKMainWindow.m:58
+ 1859 -[NSWindow sendEvent:] (in AppKit) + 11296 [0x7fff873a6d08]
+ 1859 forwardMethod (in AppKit) + 122 [0x7fff873a2d9a]
+ 1859 forwardMethod (in AppKit) + 122 [0x7fff873a2d9a]
+ 1859 forwardMethod (in AppKit) + 122 [0x7fff873a2d9a]
+ 1859 forwardMethod (in AppKit) + 122 [0x7fff873a2d9a]
+ 1859 -[SKPDFView mouseDown:] (in Skim) + 2898 [0x1000417d2] SKPDFView.m:1163
+ 1859 -[SKPDFView doDragAnnotationWithEvent:] (in Skim) + 1082 [0x100056a6a] SKPDFView.m:3002
+ 1859 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) + 122 [0x7fff871a18db]
+ 1859 _DPSNextEvent (in AppKit) + 1434 [0x7fff871a228e]
+ 1859 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) + 65 [0x7fff826e7abc]
+ 1859 ReceiveNextEventCommon (in HIToolbox) + 173 [0x7fff826e7b85]
+ 1859 RunCurrentEventLoopInMode (in HIToolbox) + 226 [0x7fff826e7f0d]
+ 1859 CFRunLoopRunSpecific (in CoreFoundation) + 309 [0x7fff8b82e275]
+ 1859 __CFRunLoopRun (in CoreFoundation) + 776 [0x7fff8b82e7b8]
+ 1859 __CFRunLoopDoObservers (in CoreFoundation) + 391 [0x7fff8b83d017]
+ 1859 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) + 23 [0x7fff8b83d0a7]
+ 1859 __83-[NSWindow _postWindowNeedsDisplayOrLayoutOrUpdateConstraintsUnlessPostingDisabled]_block_invoke1331 (in AppKit) + 46 [0x7fff87912cd1]
+ 1859 _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints (in AppKit) + 884 [0x7fff8733e89e]
+ 1859 -[NSView displayIfNeeded] (in AppKit) + 1680 [0x7fff872d963a]
+ 1859 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] (in AppKit) + 2828 [0x7fff872fa209]
+ 1859 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 314 [0x7fff872fd201]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 6151 [0x7fff872fef0e]
+ 1859 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit) + 3199 [0x7fff872fe386]
+ 1859 -[NSView _drawRect:clip:] (in AppKit) + 422 [0x7fff8730069b]
+ 1859 -[NSView(NSLayerKitGlue) _drawRectAsLayerTree:] (in AppKit) + 591 [0x7fff873019a2]
+ 1859 CA::Transaction::commit() (in QuartzCore) + 388 [0x7fff81a78016]
+ 1859 CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore) + 236 [0x7fff81a7837c]
+ 1859 CA::Layer::layout_and_display_if_needed(CA::Transaction*) (in QuartzCore) + 35 [0x7fff81a788f1]
+ 1859 CA::Layer::display_if_needed(CA::Transaction*) (in QuartzCore) + 590 [0x7fff81a791a2]
+ 1859 -[_NSTiledLayer display] (in AppKit) + 404 [0x7fff873528e8]
+ 1859 -[_NSTiledLayerContents update:] (in AppKit) + 5545 [0x7fff87354175]
+ 1859 -[NSTileLayer display] (in AppKit) + 119 [0x7fff87357ccf]
+ 1859 CA::Layer::display_() (in QuartzCore) + 1539 [0x7fff81a79a6b]
+ 1859 x_blame_allocations (in QuartzCore) + 84 [0x7fff81a79f5c]
+ 1859 ___ZN2CA5Layer8display_Ev_block_invoke (in QuartzCore) + 59 [0x7fff81a79fa0]
+ 1859 CABackingStoreUpdate_ (in QuartzCore) + 2220 [0x7fff81a7a852]
+ 1859 -[NSTileLayer drawInContext:] (in AppKit) + 169 [0x7fff87b2c565]
+ 1859 -[CALayer drawInContext:] (in QuartzCore) + 115 [0x7fff81a7bcc9]
+ 1859 -[_NSTiledLayerContents drawLayer:inContext:] (in AppKit) + 172 [0x7fff87357dbc]
+ 1859 -[_NSTiledLayer drawTile:inContext:] (in AppKit) + 654 [0x7fff873580b8]
+ 1859 -[CALayer drawInContext:] (in QuartzCore) + 115 [0x7fff81a7bcc9]
+ 1859 -[_NSBackingLayerContents drawLayer:inContext:] (in AppKit) + 149 [0x7fff8735857c]
+ 1859 -[NSView(NSLayerKitGlue) drawLayer:inContext:] (in AppKit) + 108 [0x7fff87302848]
+ 1859 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] (in AppKit) + 2297 [0x7fff87303153]
+ 1859 __46-[NSView(NSLayerKitGlue) drawLayer:inContext:]_block_invoke (in AppKit) + 186 [0x7fff8730336d]
+ 1859 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:] (in AppKit) + 1843 [0x7fff87303bb0]
+ 1859 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:] (in AppKit) + 1075 [0x7fff873038b0]
+ 1859 -[PDFDisplayView drawRect:] (in PDFKit) + 1779 [0x7fff87f74c64]
+ 1859 -[PDFDisplayView drawPDFHighLevel:] (in PDFKit) + 138 [0x7fff87f74e15]
+ 1859 -[SKPDFView drawPage:] (in Skim) + 313 [0x10003ac19] SKPDFView.m:385
+ 1859 -[PDFView drawPage:] (in PDFKit) + 196 [0x7fff87f8e642]
+ 1859 -[SKPDFPage drawWithBox:] (in Skim) + 418 [0x1001934f2] SKPDFPage.m:93
+ 1859 -[PDFPage(PDFPagePrivate) drawWithBox:inContext:] (in PDFKit) + 2553 [0x7fff87f43f0d]
+ 1859 -[PDFPage(PDFPagePrivate) drawAnnotationsWithBox:] (in PDFKit) + 392 [0x7fff87f434bb]
+ 1859 -[PDFAnnotationCircle drawWithBox:inContext:] (in PDFKit) + 1126 [0x7fff87f59a96]
+ 1859 CGContextDrawPath (in CoreGraphics) + 192 [0x7fff8577f361]
+ 1859 ripc_DrawPath (in libRIP.A.dylib) + 343 [0x7fff8896f9ab]
+ 1859 RIPRenderPath (in libRIP.A.dylib) + 137 [0x7fff88958c26]
+ 1859 CGPathApply (in CoreGraphics) + 46 [0x7fff85720724]
+ 1859 CG::Path::Ellipse::apply(void*, void (*)(void*, CGPathElementType, CGPoint const*)) const (in CoreGraphics) + 72 [0x7fff857ca172]
+ 1859 CG::Path::Sequence::apply(void*, void (*)(void*, CGPathElementType, CGPoint const*)) const (in CoreGraphics) + 41 [0x7fff85721995]
+ 1859 CG::Path::Subpath::apply(void*, void (*)(void*, CGPathElementType, CGPoint const*)) const (in CoreGraphics) + 42 [0x7fff857219d4]
+ 1859 CG::Chunk::apply(void*, void (*)(void*, CGPathElementType, CGPoint const*)) const (in CoreGraphics) + 53 [0x7fff85721a1d]
+ 1859 (anonymous namespace)::adaptor::callback(void*, CGPathElementType, CGPoint const*) (in CoreGraphics) + 171 [0x7fff85721aff]
+ 1859 path_iterator_add_curve_to_point (in CoreGraphics) + 81 [0x7fff8576f311]
+ 1859 CG::stroker::add_curve_to_point(CGPoint const*) (in CoreGraphics) + 151 [0x7fff85792893]
+ 1859 CG::stroker::add_cubic_segment(CG::Cubic const&) (in CoreGraphics) + 1103 [0x7fff85792e1d]
+ 1859 CG::stroker::path_stroke_round_cube(CG::Cubic const&) (in CoreGraphics) + 556 [0x7fff857936ae]
+ 1859 CG::stroker::path_stroke_round_cube_offset(CG::Cubic const&, int, int) (in CoreGraphics) + 1039 [0x7fff85793b2f]
+ 1859 CG::Cubic::is_near(CG::Point const&, double, double) const (in CoreGraphics) + 873,839,... [0x7fff857944f7,0x7fff857944d5,...]