crissNb / Dynamic-Island-Sketchybar

Dynamic Island on iPhone 14 Pro implementation on Mac using Sketchybar
MIT License
438 stars 23 forks source link

dynamic island crashes after changing music, volume or brightness #16

Closed Abdulwahaab710 closed 2 years ago

Abdulwahaab710 commented 2 years ago

While trying the dynamic island out, I noticed that it keeps crashes after I have switched between different windows, or changed music track. I get a malloc error.

/Users/abdulwahaab710/.config/sketchybar/plugins/Dynamic-Island-Sketchybar/process.sh: line 9: 84812 Terminated: 15          bash "$ISLAND_DIR/music/music_island.sh" "$OVERRIDE"
1
islandhelper(84716,0x10089c580) malloc: Incorrect checksum for freed object 0x122704088: probably modified after being freed.
Corrupt value: 0x0
islandhelper(84716,0x10089c580) malloc: *** set a breakpoint in malloc_error_break to debug

I have also noticed that when I change the volume or brightness process.sh gets terminated.

No matching processes belonging to you were found
0
/Users/abdulwahaab710/.config/sketchybar/plugins/Dynamic-Island-Sketchybar/process.sh: line 9: 84289 Terminated: 15          bash "$ISLAND_DIR/volume/volume_island.sh" "$OVERRIDE|$ARGS"

I am running on the latest available sketchybar, I am using version 2.10.1. I am using an m1 macbook.

BTW this looks amazing, thank you for creating it ❤️

crissNb commented 2 years ago

It seems like I've made a mistake in helper program to handle the queues (of dynamic islands) in dynamic island. I'll have a look into fixing the problem within next couple days. Until then, the only 'workaround' is to restart the sketchybar program (brew services restart sketchybar) whenever the problem occurs. To me, it seems like the problem only occurs after certain period of time.

I have also noticed that when I change the volume or brightness process.sh gets terminated.

This is actually an expected behavior. Whenever the volume dynamic island changes while it is currently being displayed, it terminates the previously displaying volume dynamic island and draws a new one. It's certainly not the best approach to handle the "overriding islands" (perhaps I should look into a better solution to this problem as well).

crissNb commented 2 years ago

I believe the latest commit (8f06821) might possibly fix this issue. I'm not able to reproduce the bug anymore on my end (even though I personally think the bug should still persist). If the bug still happens on your end, could you maybe describe the exact steps to produce the bug?