EXC_ARITHMETIC when click scan button.
favoyang opened this issue · 1 comments
favoyang commented
Traceback
#0 0x1000027e7 in -[VertexDocument scanImage:] at VertexDocument.m:171 #1 0x7fff83701152 in -[NSApplication sendAction:to:from:] #2 0x7fff837010b1 in -[NSControl sendAction:to:] #3 0x7fff8378ca0b in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] #4 0x7fff837bd536 in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] #5 0x7fff8378b4b5 in -[NSControl mouseDown:] #6 0x7fff836a5763 in -[NSWindow sendEvent:] #7 0x7fff835daee2 in -[NSApplication sendEvent:] #8 0x7fff83571922 in -[NSApplication run] #9 0x7fff8356a5f8 in NSApplicationMain #10 0x10000361c in main at main.m:13
171 int cellWidth = (width / gridLayer.cols);
Program received signal: “EXC_ARITHMETIC”.
(gdb) po gridLayer
<ImageViewGridLayer:0x10016c0c0; position = CGPoint (299 150); bounds = CGRect (0 0; 54 92); contents = <CABackingStore 0x100168840>; needsDisplayOnBoundsChange = YES; >
(gdb) p gridLayer.cols
$1 = 0
(gdb) p gridLayer.rows
$2 = 0
(gdb) p gridLayer.owner
$3 = (IKImageView *) 0x100151330
(gdb) p gridLayer.document
$4 = (VertexDocument *) 0x100141770
favoyang commented
Rows and cols should have default value, that's it.