exelban / stats

macOS system monitor in your menu bar
MIT License
23.53k stars 779 forks source link

Crash on sleep #1969

Open gorans opened 1 month ago

gorans commented 1 month ago

I noticed couple of times that Stats is no longer active after waking from (deep) sleep. Checked logs and there were several crash logs that I think correspondent with entering sleep. I attached the last one.

MacOS 12.7.5 Stats 2.10.15 stats crash log.txt

exelban commented 1 month ago

It's a bug in macOS. You need to disable monospaced font or static size for the Stack widget if it's enabled.

gorans commented 1 month ago

I don't have Stack widget. I also don't have monospaced font or static width enabled in any widget. I had combined modules enabled. I disabled it now and will monitor if anything changes.

exelban commented 1 month ago

please share what the widgets look like. Because the crash report says that it crashes when trying to show that widget.

gorans commented 1 month ago

Here are all widgets that I use: Screenshot 2024-05-27 at 17 49 24 Screenshot 2024-05-27 at 17 49 54 Screenshot 2024-05-27 at 17 50 28 Screenshot 2024-05-27 at 17 49 45 Screenshot 2024-05-27 at 17 50 09

exelban commented 1 month ago

thx, it's a sensors widget. Please share the setting that you have for that widget in the Sensors module.

gorans commented 1 month ago

There You go: Screenshot 2024-05-27 at 20 27 12

exelban commented 1 month ago

hmm, interesting. Will check that.

gorans commented 1 month ago

Just for test, I turned "Combined modules" back on and had another crash.

exelban commented 1 month ago

So if combined modules is off there are no crashes?

gorans commented 1 month ago

It seems so.. :)

exelban commented 1 month ago

hmm, strange

ryadom commented 1 month ago

Same for me. I also using combined module.

Stats-2024-05-27-153617.txt

svkirillov commented 1 month ago

I have the same issue. I use GPU, CPU, RAM, Sensors (stack, defaults), and Network modules. Modules are combined, details are not combined.

stats-crash-log.txt

exelban commented 1 month ago

Please try this build

Stats.dmg.zip

gorans commented 1 month ago

I don't know what was this crash, but report attached. I just put machine to sleep and wake it up and Stats still running with posted build.

crash.txt.zip

exelban commented 1 month ago

thx. Please try this one:

Stats.dmg.zip

gorans commented 1 month ago

So far so good. :)

exelban commented 1 month ago

ok, please try this one:

Stats.dmg.zip

gorans commented 1 month ago

No crashes since v2.10.15, latest from here. Thanks!

exelban commented 1 month ago

hmm, interesting.

exelban commented 1 month ago

try this one please:

Stats.dmg.zip

kuba2kopec commented 1 month ago

I've recently noticed the same issue. In my case, Stats was installed via homebrew, and today, after I found this thread, I overwrote it with the build you sent above. I'll monitor the situation and let you know if it crashes again :)

gorans commented 1 month ago

I had another crash. Report attached.

stats_crash.txt.zip

exelban commented 1 month ago

hi. thx. Please download the release version of the Stats, and enable the static width option in the sensors widget.

gorans commented 1 month ago

Crash with release version. crash.txt.zip

exelban commented 1 month ago

do you have enabled static width?

gorans commented 1 month ago

Yes. Screenshot 2024-06-10 at 03 08 41

exelban commented 1 month ago

could you please run the latest release? and share the report, I do not have links for the build you shared crash from(

gorans commented 1 month ago

Another crash with newest version: crash.txt.zip

kuba2kopec commented 1 month ago

Just had a crash with the latest build sent by @exelban in this thread: Stats-2024-06-10-230434.txt.zip

exelban commented 1 month ago

thx, I cannot understand why it crashes.

Could someone please try to do the following:

gorans commented 1 month ago

I'll try to do that but it'll take time as I don't know what triggers the crash. Do You want any fixed settings besides "static width" in widgets?

exelban commented 1 month ago

the problem is here:

Zrzut ekranu 2024-06-11 o 21 55 28

So when static width is enabled there must be no crash, because this line must not be triggered. But if it does not help I need to know what calling that line is. I have no idea what it could be since it's a widget drawing.

kuba2kopec commented 1 month ago

That's interesting, because for me the crash was happening with the following widgets enabled:

image

I don't see the "static width" setting in any of these. Is it possible that the problematic code still triggered?

exelban commented 1 month ago

And it's strange. Because it must not be triggered. And according to the @gorans it's triggering even when cannot be. So I'm wondering why.

kuba2kopec commented 1 month ago

Had another crash. I don't think that anything other than Stats version (now it's 2.10.17) changed. I haven't disabled any modules yet Stats-2024-06-16-170900.txt

kuba2kopec commented 1 month ago

Actually I found something interesting. That's how the stack widget looks for me:

image

I'm not sure why that is the case

exelban commented 1 month ago

it's because you don't have any sensors enabled

kuba2kopec commented 1 month ago

oh, right. Weirdly I don't see the option to enable any in the settings. Not big deal for me since I don't use this widget, but I found this a bit interesting.

What I did was to enable static width and then hide the widget again. My thinking is that now, even though hidden, the static width is enabled so maybe the problematic code won't trigger

kuba2kopec commented 1 month ago

So it didn't help, another crash happened:

Stats-2024-06-17-173900.txt

exelban commented 1 month ago

@kuba2kopec even with only CPU module enabled?

kuba2kopec commented 1 month ago

I'll check that, the last crash was with CPU, GPU, sensors and network. But I can't figure out what exactly triggers the crash - sometimes my computer will go to sleep and nothing crashes

kuba2kopec commented 1 month ago

Now I've disabled everything except CPU and we'll see what happens

svkirillov commented 2 weeks ago

Got another crash: stats_crash.txt

Modules (combined):

  1. Sensors (temp CPU, GPU)
  2. CPU
  3. GPU
  4. RAM
  5. Network
ryadom commented 2 weeks ago

No more crashes with: CPU, GPU, RAM, Battery modules. Combined modules enabled with no spacing. Version: 2.10.17 I will keep adding more modules.

kuba2kopec commented 2 weeks ago

For me no crashes up to this point with CPU, GPU and Network modules.

Seems like either I'm very lucky or the Sensors module was causing the issue. I'll wait a bit longer and then finally add the sensors module

exelban commented 2 weeks ago

@kuba2kopec thx for the feedback

gorans commented 2 weeks ago

I had no crashes with 2.10.18. Just updated to .19. I'm using CPU, RAM, sensors and network widgets, combined.

I consider this bug solved. Thanks. :)

Best regards.

kuba2kopec commented 1 week ago

I just added the sensors widget in 2.11.1. That means I'm back to my original setup of widgets.

Hope @gorans is right saying that the bug is solved. If I have another crash I'll of course let you know ;)

ryadom commented 1 week ago

I've added all widgets (except bluetooth and clock) a few days ago. No more crashes. It seems resolved for me completely. Version: 2.10.17 Thank you!