Mist: Crashing When "Include Betas" Is Checked on Intel Monterey

🪲 Description

Initially was crashing on launch after upgrading to Mist 0.8. I figured out I could cancel the load and then uncheck “Include Betas” and reload and it would load and launch properly. I believe the issue has to do with the beta icon being drawn since I was able to uncheck the Sonoma Developer Catalog and then could load the list with “Include Betas” enabled, but Mist would then crash when I scrolled down the list to where and old High Sierra beta would be displayed.

Upon further investigation I found that if I scrolled very slowly down to the High Sierra beta, the beta icon would display properly and Mist would not crash, but if I scrolled faster Mist would crash.

📋 Steps to Reproduce

  1. Open Mist.app
  2. Enable Sonoma Developer Catalog
  3. Enable “Include Betas”
  4. Select Installers tab
  5. Reload
  6. Crash

✅ Expected Behaviour

Should not crash when displaying betas in the list

💻 Environment

  • Mist version (App menu ⇨ About Mist): 0.8
  • macOS Version (sw_vers): 12.6.6 (21G646)
  • Hardware (system_profiler SPHardwareDataType):
    • Model Identifier: MacBookPro11,5

📷 Crash Log

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	    0x7ff80120cffe __pthread_kill + 10
1   libsystem_pthread.dylib       	    0x7ff8012431ff pthread_kill + 263
2   libsystem_c.dylib             	    0x7ff80118ed24 abort + 123
3   libsystem_c.dylib             	    0x7ff80118e0cb __assert_rtn + 314
4   AppKit                        	    0x7ff8045ad192 _nsis_frameInEngine + 2206
5   AppKit                        	    0x7ff803dbc20a -[NSView nsis_frameInEngine:forLayoutGuide:withRounding:] + 19
6   AppKit                        	    0x7ff803deaebf -[NSView(NSConstraintBasedLayout) _subview:valueOfVariable:didChangeInEngine:] + 194
7   AppKit                        	    0x7ff803deb014 -[NSTextField nsis_valueOfVariable:didChangeInEngine:] + 52
8   CoreAutoLayout                	    0x7ff8089d43d4 -[NSISVariableObservation emitValueIfNeededWithEngine:] + 255
9   CoreAutoLayout                	    0x7ff8089c37c4 -[NSISEngine performPendingChangeNotifications] + 311
10  AppKit                        	    0x7ff803d99a74 _NSViewLayout + 596
11  AppKit                        	    0x7ff803d99533 -[NSView _layoutSubtreeWithOldSize:] + 361
12  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
13  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
14  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
15  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
16  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
17  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
18  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
19  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
20  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
21  AppKit                        	    0x7ff803d99681 -[NSView _layoutSubtreeWithOldSize:] + 695
22  AppKit                        	    0x7ff803d98a45 -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 1041
23  AppKit                        	    0x7ff803d9853d -[NSWindow(NSConstraintBasedLayout) _layoutViewTree] + 148
24  AppKit                        	    0x7ff803e0ee4d -[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] + 251
25  AppKit                        	    0x7ff803e0ec8c __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 430
26  AppKit                        	    0x7ff803e0df17 NSDisplayCycleObserverInvoke + 155
27  AppKit                        	    0x7ff803e0daa4 NSDisplayCycleFlush + 921
28  QuartzCore                    	    0x7ff8083bbfbe CA::Transaction::run_commit_handlers(CATransactionPhase) + 98
29  QuartzCore                    	    0x7ff8083bacdc CA::Transaction::commit() + 376
30  AppKit                        	    0x7ff803eaf191 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
31  AppKit                        	    0x7ff8045f6f1c ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
32  CoreFoundation                	    0x7ff801309500 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
33  CoreFoundation                	    0x7ff801309392 __CFRunLoopDoObservers + 543
34  CoreFoundation                	    0x7ff801308824 __CFRunLoopRun + 840
35  CoreFoundation                	    0x7ff801307e1c CFRunLoopRunSpecific + 562
36  HIToolbox                     	    0x7ff809fb85e6 RunCurrentEventLoopInMode + 292
37  HIToolbox                     	    0x7ff809fb834a ReceiveNextEventCommon + 594
38  HIToolbox                     	    0x7ff809fb80e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
39  AppKit                        	    0x7ff803d42f6d _DPSNextEvent + 927
40  AppKit                        	    0x7ff803d4162a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
41  AppKit                        	    0x7ff803d33cd9 -[NSApplication run] + 586
42  AppKit                        	    0x7ff803d07c57 NSApplicationMain + 817
43  SwiftUI                       	    0x7ff90c85009c specialized runApp(_:) + 161
44  SwiftUI                       	    0x7ff90d2b2424 runApp<A>(_:) + 164
45  SwiftUI                       	    0x7ff90cdaac5f static App.main() + 63
46  Mist                          	       0x102b9f246 0x102b07000 + 623174
47  dyld                          	       0x109c3052e start + 462

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

@ninxsoft Mist 0.8.1 with latest commit (e3a6d93) local build work fine with Monterey 12.6.8 (beta)

With Mist 0.8.1 (your last week build with commit b1dd347) on Ventura 13.5 (beta) on Sonoma 14.0 beta2 work (no crashes with 45 degrees rotation)

And just F.Y.I I tried to build Mist with latest commit (e3a6d93) on Sonoma 14.0 beta2 and Xcode 15.0.0 Beta 3 errors on Mist/Helpers/DownloadManager.swift on code lignes 90, 92 and 101

… retries += 1 –> error task = URLSession.shared.downloadTask(withResumeData: data, completionHandler: completionHandler) } else { –> error task = URLSession.shared.downloadTask(with: url, completionHandler: completionHandler) }

        if let task: URLSessionDownloadTask = task {
            progress = task.progress
        }

        urlError = nil
        task?.resume()

–> error semaphore.wait() …

Regards

45 degrees rotation --> crash

90 degrees rotation --> no crash Capture d’écran 2023-06-24 à 12 11 41

135 degrees rotation --> crash

180 degrees rotation --> no crash Capture d’écran 2023-06-24 à 12 15 06

So, on local repo I keep rotation with 45.1 degrees

Other tests

  1. degrees = -50 —> no crash Capture d’écran 2023-06-24 à 11 18 32
  2. degrees = -25 —> no crash Capture d’écran 2023-06-24 à 11 19 57
  3. degrees = -40 —> no crash Capture d’écran 2023-06-24 à 11 21 10
  4. degrees = -44 —> no crash Capture d’écran 2023-06-24 à 11 22 29
  5. degrees = -46 —> no crash Capture d’écran 2023-06-24 à 11 23 49
  6. degrees = -45 —> CRASH Capture d’écran 2023-06-24 à 11 30 08

No crash when using a value really close to 45, eg. private let degrees: CGFloat = -45.1 🥳

I suspect there’s something like a dividing by zero error occurring under the hood for certain integer values.

Curiously, I tried to change the value on the code line " private let degrees: CGFloat =" and to -95 ----> no crash 45 ----> (ie +45) crash -50 ----> no crash and .rotationEffect(.degrees(degrees)) (reactivated)

PS : my local V0.8.1 repo is up to date (f215031d commit)

@matxpa thanks for helping confirm!

@5T33Z0 correct, just eye candy. I think it’s just smarter / safer to remove the rotation altogether 👍

Will update the codebase + create a new release soon 🙌

@ninxsoft Hi.

macOS Monterey 12.6.8 and a local Mist V0.8.1 build (.rotationEffect() deactivated): no more crash

Capture d’écran 2023-06-24 à 10 43 30

Capture d’écran 2023-06-24 à 10 26 08

Regards

I’s eye-candy anyway, isn’t it?

2c6f2e35 seems to be the culprit - building and running d9b19774 (prior commit) seems to work fine on macOS Monterey 12, whereas 2c6f2e35 is crashing when the list / beta ribbons scroll into view.

Note: The beta ribbon was introduced in a build previous to both mentioned above, so will keep digging into 2c6f2e35 to narrow down further

Finally had a chance to fire up a macOS Monterey 12 development environment - this is the error I get when attempting to run via Xcode:

validateComputeFunctionArguments:827: failed assertion `Compute Function(ciKernelMain): reads texture (image.coerce[1]) whose usage (0x00) doesn't specify MTLTextureUsageShaderRead (0x01)'

Interestingly enough, disabling Metal API Validation in the Xcode project scheme seems to make the crash go away:

Metal API Validation

Will continue to investigate… 🤔

Confirming I am able to replicate the issue (in a VM):

Crash