stats: Stats 2.5.12 crash
Describe the bug New version of Stats (2.5.12) crashes on M1 version of MBA (Macbook Air). After a few moments after starting the app, it will crash. I have SSD (R/W, F/U, usage %), RAM, CPU, Temp, Battery and network (U/D) enabled.
Details:
- Device: Macbook Air 2020 M1
- MacOS 11.3 (20E232)
- Application version 2.5.12
✔ lanthean@mba ➤ ~/mnt ➤ /Applications/Stats.app/Contents/MacOS/Stats
Error call(READ_KEYINFO): (iokit/common) invalid argument
Error read(): (iokit/common) invalid argument
Error call(READ_KEYINFO): (iokit/common) invalid argument
Error read(): (iokit/common) invalid argument
2021-05-03 14:16:10.393 Stats[27147:7083104] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]'
*** First throw call stack:
(
0 CoreFoundation 0x000000018a8d3db8 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x000000018a5fd0a8 objc_exception_throw + 60
2 CoreFoundation 0x000000018a99ebb4 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x000000018a9ac97c -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
4 CoreFoundation 0x000000018a7dca60 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 320
5 CoreFoundation 0x000000018a80e75c -[NSDictionary initWithDictionary:copyItems:] + 408
6 CoreFoundation 0x000000018a80e524 -[__NSPlaceholderDictionary initWithDictionary:copyItems:] + 172
7 CoreText 0x000000018be79678 _ZN11TAttributes9ApplyFontEPK14__CFDictionaryPK8__CTFontPK11TCharStream7CFRangePPKv + 252
8 CoreText 0x000000018be79430 _ZN11TAttributesC2EPK14__CFDictionaryPK11TCharStream7CFRange + 96
9 CoreText 0x000000018bdd4bc8 _ZN21TTypesetterAttrString10InitializeEPK20__CFAttributedString + 356
10 CoreText 0x000000018bdd48b8 _ZN21TTypesetterAttrStringC2EPK20__CFAttributedStringPK14__CFDictionary + 112
11 CoreText 0x000000018bdd4770 CTLineCreateWithAttributedString + 136
12 UIFoundation 0x000000018de060b4 -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:stringDrawingInterface:] + 1808
13 UIFoundation 0x000000018dd4330c __NSStringDrawingEngine + 1964
14 UIFoundation 0x000000018dda78e0 -[NSAttributedString(NSExtendedStringDrawing) drawWithRect:options:context:] + 32
15 ModuleKit 0x00000001028248e8 block_destroy_helper.11 + 2344
16 ModuleKit 0x0000000102824468 block_destroy_helper.11 + 1192
17 ModuleKit 0x00000001028245a8 block_destroy_helper.11 + 1512
18 AppKit 0x000000018d1a6334 _NSViewDrawRect + 148
19 AppKit 0x000000018d8d7400 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1312
20 AppKit 0x000000018d1a5ab4 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 676
21 QuartzCore 0x0000000190b4b908 -[CALayer renderInContext:] + 1316
22 QuartzCore 0x0000000190b4d258 -[CALayer _renderSublayersInContext:] + 412
23 QuartzCore 0x0000000190b4b91c -[CALayer renderInContext:] + 1336
24 QuartzCore 0x0000000190b4d258 -[CALayer _renderSublayersInContext:] + 412
25 QuartzCore 0x0000000190b4b91c -[CALayer renderInContext:] + 1336
26 AppKit 0x000000018d8d6948 -[NSView _renderLayerInContext:] + 288
27 AppKit 0x000000018d8d7180 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 672
28 AppKit 0x000000018d326380 -[NSView displayRectIgnoringOpacity:inContext:] + 820
29 AppKit 0x000000018d325fe8 __62-[NSView cacheDisplayInRect:toBitmapImageRep:includeSubviews:]_block_invoke + 268
30 AppKit 0x000000018d325eb8 -[NSBitmapImageRep _captureDrawing:] + 80
31 AppKit 0x000000018d325e4c -[NSView cacheDisplayInRect:toBitmapImageRep:includeSubviews:] + 176
32 AppKit 0x000000018d7ad5a4 -[NSStatusItem _updateReplicant:] + 1380
33 AppKit 0x000000018d2e9d64 -[NSStatusItem _updateReplicants] + 220
34 AppKit 0x000000018d7adf50 -[NSStatusItem _updateReplicantsUnlessMenuIsTracking:] + 128
35 Foundation 0x000000018b619fe0 __NSFireDelayedPerform + 444
36 CoreFoundation 0x000000018a86fdb4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
37 CoreFoundation 0x000000018a86f9b0 __CFRunLoopDoTimer + 1076
38 CoreFoundation 0x000000018a86f438 __CFRunLoopDoTimers + 392
39 CoreFoundation 0x000000018a854644 __CFRunLoopRun + 1944
40 CoreFoundation 0x000000018a853734 CFRunLoopRunSpecific + 600
41 HIToolbox 0x0000000192751b84 RunCurrentEventLoopInMode + 292
42 HIToolbox 0x00000001927518f8 ReceiveNextEventCommon + 552
43 HIToolbox 0x00000001927516b8 _BlockUntilNextEventMatchingListInModeWithFilter + 72
44 AppKit 0x000000018d03d4ec _DPSNextEvent + 836
45 AppKit 0x000000018d03be8c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1292
46 AppKit 0x000000018d02dd18 -[NSApplication run] + 596
47 Stats 0x000000010268fca8 Stats + 15528
48 libdyld.dylib 0x000000018a774420 start + 4
)
libc++abi: terminating with uncaught exception of type NSException
[1] 27147 abort /Applications/Stats.app/Contents/MacOS/Stats
✘ lanthean@mba ➤ ~/mnt ➤ uname -a
Darwin mba 20.4.0 Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:02 PST 2021; root:xnu-7195.101.1~3/RELEASE_ARM64_T8101 arm64
✔ lanthean@mba ➤ ~/mnt ➤
Command that failed
/Applications/Stats.app/Contents/MacOS/Stats
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 34 (19 by maintainers)
Commits related to this issue
- fix: fixed crashes on some macs (#453) — committed to exelban/stats by exelban 3 years ago
- fix: fixed crashes on some macs (#453) — committed to gmcinalli/stats by exelban 3 years ago
Sensors are not displayed in that last custom build:
Ok, so I can release a fix. Thanks.
No crashes so far.
Thanks, testing it now… EDIT: Sensors are back 😃
Please try this one: Stats.dmg.zip
It related to drawing. It crashes because the string which was drawn a moment ago was cleaned by GC. It’s the best what I can understand from the crash. I cannot reproduce this bug. It also happened on intel. So it does not relate to silicon.
Testing…