Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stats v2.11.17 crashes immediately after starting #2212

Closed
fad1 opened this issue Nov 11, 2024 · 50 comments
Closed

Stats v2.11.17 crashes immediately after starting #2212

fad1 opened this issue Nov 11, 2024 · 50 comments
Labels
bug Something isn't working

Comments

@fad1
Copy link

fad1 commented Nov 11, 2024

Widgets appear for like 1/10 of a second then disappear. I tried starting from terminal to get an error message, see below:

Details:

  • Device: MBA2020 M1
  • macOS: Sonoma 14.7.1
  • Application version: 2.11.17

❯ /Applications/Stats.app/Contents/MacOS/Stats
2024-11-11 15:10:16 reader.swift:85 DBG [<CPU.LoadReader: 0x137f138c0>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:159 DBG [<CPU.ProcessReader: 0x60000006da70>] Set update interval: 5 sec
2024-11-11 15:10:16 reader.swift:85 DBG [<CPU.ProcessReader: 0x60000006da70>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:159 DBG [<CPU.AverageReader: 0x60000006ddd0>] Set update interval: 60 sec
2024-11-11 15:10:16 reader.swift:85 DBG [<CPU.AverageReader: 0x60000006ddd0>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:85 DBG [<CPU.TemperatureReader: 0x60000006de60>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:85 DBG [<GPU.InfoReader: 0x6000000643f0>] Successfully initialize reader
2024-11-11 15:10:16.565 Stats[21887:230699] NSPanel requires NSWindowStyleMaskUtilityWindow for a HUD window
2024-11-11 15:10:16 reader.swift:85 DBG [<RAM.UsageReader: 0x600000d53930>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:159 DBG [<RAM.ProcessReader: 0x60000005a7f0>] Set update interval: 1 sec
2024-11-11 15:10:16 reader.swift:85 DBG [<RAM.ProcessReader: 0x60000005a7f0>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:85 DBG [<Disk.CapacityReader: 0x600001c02c00>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:159 DBG [<Disk.ActivityReader: 0x600001c02e00>] Set update interval: 1 sec
2024-11-11 15:10:16 reader.swift:85 DBG [<Disk.ActivityReader: 0x600001c02e00>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:159 DBG [<Disk.ProcessReader: 0x6000000650e0>] Set update interval: 1 sec
2024-11-11 15:10:16 reader.swift:85 DBG [<Disk.ProcessReader: 0x6000000650e0>] Successfully initialize reader
2024-11-11 15:10:16 reader.swift:85 DBG [<Sensors.SensorsReader: 0x60000036e300>] Successfully initialize reader
2024-11-11 15:10:17.093 Stats[21887:230699] NSPanel requires NSWindowStyleMaskUtilityWindow for a HUD window
2024-11-11 15:10:17 reader.swift:85 DBG [<Net.UsageReader: 0x13913e970>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Net.ProcessReader: 0x600000048000>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Net.ConnectivityReader: 0x130375fc0>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Battery.UsageReader: 0x1304ae9d0>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Battery.ProcessReader: 0x600001ca9880>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Bluetooth.DevicesReader: 0x60000035d540>] Successfully initialize reader
2024-11-11 15:10:17 reader.swift:85 DBG [<Clock.ClockReader: 0x600001c9a600>] Successfully initialize reader
Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named eu.exelban.Stats.SMC.Helper was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named eu.exelban.Stats.SMC.Helper was invalidated: failed at lookup with error 3 - No such process.}
2024-11-11 15:10:17 reader.swift:128 DBG [<Net.UsageReader: 0x13913e970>] Set up update interval: 1 sec
2024-11-11 15:10:17 reader.swift:128 DBG [<Net.ConnectivityReader: 0x130375fc0>] Set up update interval: 1 sec
2024-11-11 15:10:17 widget.swift:296 DBG [Network] widget speed enabled
2024-11-11 15:10:17 reader.swift:128 DBG [<Disk.CapacityReader: 0x600001c02c00>] Set up update interval: 1 sec
2024-11-11 15:10:17 reader.swift:128 DBG [<Disk.ActivityReader: 0x600001c02e00>] Set up update interval: 1 sec
2024-11-11 15:10:17 widget.swift:296 DBG [Disk] widget mini enabled
2024-11-11 15:10:17 reader.swift:128 DBG [<RAM.UsageReader: 0x600000d53930>] Set up update interval: 5 sec
2024-11-11 15:10:17 widget.swift:296 DBG [RAM] widget pie_chart enabled
2024-11-11 15:10:17 widget.swift:296 DBG [RAM] widget text enabled
2024-11-11 15:10:17 reader.swift:128 DBG [<CPU.LoadReader: 0x137f138c0>] Set up update interval: 5 sec
2024-11-11 15:10:17 widget.swift:296 DBG [CPU] widget bar_chart enabled
2024-11-11 15:10:17 helpers.swift:102 DBG Application update interval is 'Silent'
2024-11-11 15:10:17 helpers.swift:143 DBG error updater.check(): last check was 2 minutes ago, stopping...
2024-11-11 15:10:17 AppDelegate.swift:74 INF Stats started in 0.0054 seconds
dyld[21887]: missing symbol called
[1] 21887 abort /Applications/Stats.app/Contents/MacOS/Stats

The problem disappears when I install .16, using pearcleaner to delete all files related to Stats and reinstall does not prevent the issue.

@exelban
Copy link
Owner

exelban commented Nov 11, 2024

the log is totally unusable

@miss4chewN8
Copy link

I have had the same issue while using the 2.11.17 upgrade and enabling the new RAM text widget. Upon reinstalling and installing using brew, the issue persisted as I suspect the settings stayed the same. I had to do a clean install using pearcleaner whilst still using 2.11.17 and not selecting the RAM text widget and things appear to be working now.

@fad1
Copy link
Author

fad1 commented Nov 11, 2024

I too had enabled the RAM text widget.

@exelban
Copy link
Owner

exelban commented Nov 11, 2024

hmm. Could someone share crash report?

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

Sure, here's a few of them:

c1.txt
c2.txt
c3.txt

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

thx. Could you please try this build:

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

Sure, crashes too:
c4.txt
c5.txt

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

thx, what about this one?

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

1st crash was after trying immediately, 2nd and 3rd after deleting everything with pearcleaner.
Stats-2024-11-12-115240.txt
Stats-2024-11-12-115422.txt
Stats-2024-11-12-115455.txt

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

thx, and what about this one?
PS: one crash report is enough

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

crashes Stats-2024-11-12-120610.txt

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

cannot understand, I disable almost everything. Try this build:
Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

This one did not crash, but check how RAM text is shown:

image
image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

yeap, it's because I have disable everything related to that widget. Now I will enable step by step features and will see what causing the problem.

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

Works
image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

thx, thank you for helping debug the problem)

Stats.dmg.zip

@exelban exelban added the bug Something isn't working label Nov 12, 2024
@exelban exelban added this to Stats Nov 12, 2024
@exelban exelban moved this to In Progress in Stats Nov 12, 2024
@fad1
Copy link
Author

fad1 commented Nov 12, 2024

No problem. Works

image

image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

ok, I have one idea:

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

((
ok, so only small steps

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image
image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image image

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image

624

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

looks like pressure parser makes problem(
takes too much time to find that(

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image 625

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

this build will write some logs to the log.txt that could be found in the Documents folder. Could you please share it after running that build?

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

Stats-2024-11-12-155644.txt
log.txt

ok so the log.txt file is not created with this version. i guess previous versions created it and appended a line, but this one crashes prior to creating the file.

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

so this build does not even run?

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

It does not

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

or this one:

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

Stats.dmg.zip

image
629

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

or this one:

Stats.dmg.zip

Stats-2024-11-12-190916.txt

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

image 631

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

wow, nice

@exelban
Copy link
Owner

exelban commented Nov 12, 2024

I will prepare the fix for tomorrow and will release a hot fix. Thank you for the help.
This is a test build for you to check if everything works.

Stats.dmg.zip

@fad1
Copy link
Author

fad1 commented Nov 12, 2024

All my widgets seem to be working. I'm using $swap.used as it is what I understand best to represent memory pressure.

image

I'll make sure to check the hotfix commit to see what was the cause of the problem ;)

@fad1
Copy link
Author

fad1 commented Nov 14, 2024

I just noticed this file
log.txt

exelban added a commit that referenced this issue Nov 14, 2024
@fad1
Copy link
Author

fad1 commented Nov 14, 2024

I have a question regarding the cause of the bug: does this bug only occur on Sonoma ? (Maybe you develop on macOS Sequoia and there's some difference in SwiftUI APIs ?)

@exelban
Copy link
Owner

exelban commented Nov 14, 2024

this API was used for a years already

@miss4chewN8
Copy link

I have a question regarding the cause of the bug: does this bug only occur on Sonoma ? (Maybe you develop on macOS Sequoia and there's some difference in SwiftUI APIs ?)

@fad1 I don't think so. I am on Sequoia 15.1 and the bug still occurs.

@exelban exelban closed this as completed Nov 14, 2024
@github-project-automation github-project-automation bot moved this from Ready to deploy to Done in Stats Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants