w0lfschild / cDock

:lollipop: Basic dock customization for macOS
https://cdock.macenhance.com/
152 stars 19 forks source link

Crashes #56

Closed 9jkh closed 8 years ago

9jkh commented 8 years ago

Already posted below, but just noticed my older thread has the closed tag. Afraid it won't be noticed, so re-posting.

Crashes stopped for a while with new version, but resumed recently.

Happens after login and just after cDock opens to make changes to the default Dock.

Two new crashes, both identical. Only thing I can think of that might be responsible is recent security update 2015-008. Maybe not playing well with SIMBL? Needs newer version of SIMBL maybe? Can't attach file. Here's what's most important.

Process:         Dock [315]
Path:            /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
Identifier:      com.apple.dock
Version:         1.8 (1314.12)
Build Info:      Dock-1314012000000000~1
Code Type:       X86-64 (Native)
Parent Process:  launchd [261]
Responsible:     Dock [315]
User ID:         502

Date/Time:       2015-12-18 12:38:53.924 -0500
OS Version:      Mac OS X 10.9.5 (13F1507)
Report Version:  11
Anonymous UUID:  B7D85D4A-FEE7-4290-F6E3-9C34461FD69B

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <CALayerArray: 0x7f98f2d91460> was mutated while being enumerated.'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff956ae25c __exceptionPreprocess + 172
1   libobjc.A.dylib                     0x00007fff8cdeae75 objc_exception_throw + 43
2   CoreFoundation                      0x00007fff956adb64 __NSFastEnumerationMutationHandler + 164
3   cDock                               0x000000010d3bbf1e ___loadShadows_block_invoke_2 + 382
4   libdispatch.dylib                   0x00007fff8f5091bb _dispatch_call_block_and_release + 12
5   libdispatch.dylib                   0x00007fff8f50628d _dispatch_client_callout + 8
6   libdispatch.dylib                   0x00007fff8f50e433 _dispatch_after_timer_callback + 77
7   libdispatch.dylib                   0x00007fff8f50628d _dispatch_client_callout + 8
8   libdispatch.dylib                   0x00007fff8f508885 _dispatch_source_invoke + 413
9   libdispatch.dylib                   0x00007fff8f50de97 _dispatch_main_queue_callback_4CF + 244
10  CoreFoundation                      0x00007fff956154f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11  CoreFoundation                      0x00007fff955d0714 __CFRunLoopRun + 1636
12  CoreFoundation                      0x00007fff955cfe75 CFRunLoopRunSpecific + 309
13  Dock                                0x0000000108337063 Dock + 20579
14  libdyld.dylib                       0x00007fff8f0b05fd start + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff8df74866 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff9798735c pthread_kill + 92
2   libsystem_c.dylib               0x00007fff974a9b2e abort + 125
3   libc++abi.dylib                 0x00007fff97cdff31 abort_message + 257
4   libc++abi.dylib                 0x00007fff97d05952 default_terminate_handler() + 264
5   libobjc.A.dylib                 0x00007fff8cdeb30d _objc_terminate() + 103
6   libc++abi.dylib                 0x00007fff97d031d1 std::__terminate(void (*)()) + 8
7   libc++abi.dylib                 0x00007fff97d03246 std::terminate() + 54
8   libobjc.A.dylib                 0x00007fff8cdeb0b0 objc_terminate + 9
9   libdispatch.dylib               0x00007fff8f5062a1 _dispatch_client_callout + 28
10  libdispatch.dylib               0x00007fff8f50e433 _dispatch_after_timer_callback + 77
11  libdispatch.dylib               0x00007fff8f50628d _dispatch_client_callout + 8
12  libdispatch.dylib               0x00007fff8f508885 _dispatch_source_invoke + 413
13  libdispatch.dylib               0x00007fff8f50de97 _dispatch_main_queue_callback_4CF + 244
14  com.apple.CoreFoundation        0x00007fff956154f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
15  com.apple.CoreFoundation        0x00007fff955d0714 __CFRunLoopRun + 1636
16  com.apple.CoreFoundation        0x00007fff955cfe75 CFRunLoopRunSpecific + 309
17  com.apple.dock                  0x0000000108337063 0x108332000 + 20579
18  libdyld.dylib                   0x00007fff8f0b05fd start + 1
w0lfschild commented 8 years ago

Crash reason is

reason: '*** Collection <CALayerArray: 0x7f98f2d91460> was mutated while being enumerated.'

Which means something was removed or added to an array while being looped over.

What version of cDock is this?

9jkh commented 8 years ago

Hi, thanks

This is cDock 2. It crashes only just after login. The Dock changes from the Apple default to the appearance specified in the cDock settings, then crashes. After that initial crash it works ok--doesn't crash again.

9jkh commented 8 years ago

Still randomly crashing. You never replied after asking what version cDock. A reply would be appreciated. Thanks.

Process: Dock [196] Path: /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock Identifier: com.apple.dock Version: 1.8 (1314.12) Build Info: Dock-1314012000000000~1 Code Type: X86-64 (Native) Parent Process: launchd [187] Responsible: Dock [196] User ID: 502

Date/Time: 2016-01-15 11:10:32.449 -0500 OS Version: Mac OS X 10.9.5 (13F1507) Report Version: 11 Anonymous UUID: B7D85D4A-FEE7-4290-F6E3-9C34461FD69B

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information: * Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection <CALayerArray: 0x7fe8a94c96c0> was mutated while being enumerated.' abort() called terminating with uncaught exception of type NSException

Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff9863025c exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff9520be75 objc_exception_throw + 43 2 CoreFoundation 0x00007fff9862fb64 __NSFastEnumerationMutationHandler + 164 3 cDock 0x0000000107046f1e _loadShadows_block_invoke_2 + 382 4 libdispatch.dylib 0x00007fff93d871bb _dispatch_call_block_and_release + 12 5 libdispatch.dylib 0x00007fff93d8428d _dispatch_client_callout + 8 6 libdispatch.dylib 0x00007fff93d8c433 _dispatch_after_timer_callback + 77 7 libdispatch.dylib 0x00007fff93d8428d _dispatch_client_callout + 8 8 libdispatch.dylib 0x00007fff93d86885 _dispatch_source_invoke + 413 9 libdispatch.dylib 0x00007fff93d8be97 _dispatch_main_queue_callback_4CF + 244 10 CoreFoundation 0x00007fff985974f9 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 11 CoreFoundation 0x00007fff98552714 __CFRunLoopRun + 1636 12 CoreFoundation 0x00007fff98551e75 CFRunLoopRunSpecific + 309 13 Dock 0x000000010201f063 Dock + 20579 14 libdyld.dylib 0x00007fff9873c5fd start + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff949bc866 *pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff94c7135c pthread_kill + 92 2 libsystem_c.dylib 0x00007fff94182b2e abort + 125 3 libc++abi.dylib 0x00007fff9617ff31 abort_message + 257 4 libc++abi.dylib 0x00007fff961a5952 default_terminate_handler() + 264 5 libobjc.A.dylib 0x00007fff9520c30d _objc_terminate() + 103 6 libc++abi.dylib 0x00007fff961a31d1 std::__terminate(void ()()) + 8 7 libc++abi.dylib 0x00007fff961a3246 std::terminate() + 54 8 libobjc.A.dylib 0x00007fff9520c0b0 objc_terminate + 9 9 libdispatch.dylib 0x00007fff93d842a1 _dispatch_client_callout + 28 10 libdispatch.dylib 0x00007fff93d8c433 _dispatch_after_timer_callback + 77 11 libdispatch.dylib 0x00007fff93d8428d _dispatch_client_callout + 8 12 libdispatch.dylib 0x00007fff93d86885 _dispatch_source_invoke + 413 13 libdispatch.dylib 0x00007fff93d8be97 _dispatch_main_queue_callback_4CF + 244 14 com.apple.CoreFoundation 0x00007fff985974f9 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE** + 9 15 com.apple.CoreFoundation 0x00007fff98552714 CFRunLoopRun + 1636 16 com.apple.CoreFoundation 0x00007fff98551e75 CFRunLoopRunSpecific + 309 17 com.apple.dock 0x000000010201f063 0x10201a000 + 20579 18 libdyld.dylib 0x00007fff9873c5fd start + 1

w0lfschild commented 8 years ago

Hmm sorry for not responding earlier make sure you're using the latest version maybe?

What do you get when you type this in console?

/usr/libexec/PlistBuddy -c "print CFBundleVersion" /Library/Application\ Support/SIMBL/Plugins/cDock.bundle/Contents/Info.plist
9jkh commented 8 years ago

Thanks for getting back to me on this. First, the crashes had been occurring with the 0.9.8. Have just today installed the 0.9.11, and, fingers crossed, I will see how that goes.

The output of that command is 0.10.779. Is that the correct SIMBL?

w0lfschild commented 8 years ago

No the correct output should be 2012

Delete the bundle /Library/Application\ Support/SIMBL/Plugins/cDock.bundle and try re-opening cDock2

9jkh commented 8 years ago

Moved the bundle to the Trash, quit and reopened cDock, but that doesn't bring in a newer version of the bundle, and cDock is now dead. No SIMBL now. Is there some place to download the 2012?

w0lfschild commented 8 years ago

Hmm could be that you don't have the right permissions for /Library/Application\ Support/SIMBL

You can manually copy the bundle from cDock (Contents/Resources/cDock.bundle) to /Library/Application\ Support/SIMBL/Plugins

9jkh commented 8 years ago

Might be because I'm running standard; I su to my admin to authenticate. I'll see if running admin changes anything. I've looked around but can't find that. Can you give me a link to Contents/Resources/cDock.bundle. Thanks for the help.

w0lfschild commented 8 years ago

@9jkh

Right click on cDock and select Show Package Contents to get to the contents folder.

@dkfiresky

Maybe. The permissions are set when cDock runs cDock-Installer (If SIMBL needs to be installed or updated). I'm not sure of how cDock works on Standard user accounts post Apples implementation of System Integrity Protection.

#!/bin/sh

log_dir="$HOME"/Library/"Application Support"/cDock/logs
if [[ ! -e "$log_dir" ]]; then mkdir -pv "$log_dir"; fi
exec &>"$log_dir"/helper.log

echo "Removing old files"
if [[ -h /Library/Application\ Support/SIMBL/Plugins ]]; then rm -vr /Library/Application\ Support/SIMBL/Plugins; fi
if [[ -e "$HOME"/Library/ScriptingAdditions/SIMBL.osax ]]; then rm -vr "$HOME"/Library/ScriptingAdditions/SIMBL.osax; fi
if [[ -e "$HOME"/Library/ScriptingAdditions/EasySIMBL.osax ]]; then rm -vr "$HOME"/Library/ScriptingAdditions/EasySIMBL.osax; fi
if [[ -e /Library/ScriptingAdditions/SIMBL.osax ]]; then rm -vr /Library/ScriptingAdditions/SIMBL.osax; fi
if [[ -e /Library/ScriptingAdditions/EasySIMBL.osax ]]; then rm -vr /Library/ScriptingAdditions/EasySIMBL.osax; fi
if [[ -e /Library/LaunchAgents/net.culater.SIMBL.Agent.plist ]]; then rm -v /Library/LaunchAgents/net.culater.SIMBL.Agent.plist; fi
if [[ -e /System/Library/ScriptingAdditions/SIMBL.osax ]]; then rm -vr /System/Library/ScriptingAdditions/SIMBL.osax; fi
if [[ -e /System/Library/LaunchAgents/net.culater.SIMBL.Agent.plist ]]; then rm -v /System/Library/LaunchAgents/net.culater.SIMBL.Agent.plist; fi

echo "Installing new files"
cp -vr ./SIMBL.osax /System/Library/ScriptingAdditions/
cp -vp /System/Library/ScriptingAdditions/SIMBL.osax/Contents/Resources/SIMBL\ Agent.app/Contents/Resources/net.culater.SIMBL.Agent.plist /System/Library/LaunchAgents/
if [[ ! -e /Library/Application\ Support/SIMBL/Plugins ]]; then 
    mkdir -p /Library/Application\ Support/SIMBL/Plugins
    chmod 775 /Library/Application\ Support/SIMBL/Plugins
else
    chmod 775 /Library/Application\ Support/SIMBL/Plugins
fi

echo "Starting SIMBL"
open /System/Library/ScriptingAdditions/SIMBL.osax/Contents/Resources/SIMBL\ Agent.app
9jkh commented 8 years ago

Deleted. Will update. Btw, no SIP. Running 10.9.5.

9jkh commented 8 years ago

OK, moved the bundle from package contents (thought you were talking about getting it somewhere here in cDock GitHub.) Showing 2012 now. Are these the correct permissions?

ls -la /Library/Application\ Support/SIMBL/Plugins/cDock.bundle total 0 drwxr-xr-x 3 root admin 102 Jan 2 20:35 . drwxrwxr-x 3 root admin 102 Jan 16 19:07 .. drwxr-xr-x 4 xxxx (user) admin 136 Jan 2 20:35 Contents

9jkh commented 8 years ago

Your user is the owner? I changed that to root, since everything else there is owned by root. But seems to be working OK like that. I even have the separator now, which I wasn't getting before.

Except, what I'm not happy with is the indicator lights are now only a tiny dot. Not very visible. Preferred then as a solid bar. Are those tiny dots the new style?

w0lfschild commented 8 years ago

@9jkh

Except, what I'm not happy with is the indicator lights are now only a tiny dot. Not very visible. Preferred then as a solid bar. Are those tiny dots the new style?

  • Yes those are the new style. You can either use a custom image or resize them if you don't like them though.

@dkfiresky https://github.com/w0lfschild/cDock/issues/56#issuecomment-172276850

You're copying SIMBL there, but where is cDock.bundle? And I think it's possible to ask user for root there, if user's os doesn't support SIP.

  • cDock-Installer only runs If SIMBL needs to be installed or updated.
  • cDock-Installer does require root and it asks for it (4 times https://github.com/w0lfschild/cDock2/issues/5).
  • cDock.bundle is installed by cDock because the bundle is updated frequently and I don't want it asking for root (and it shouldn't have to if the permissions of the folder are right)

Since Apple already released 10.11.2 why bother and try to support old stuff. Just let it go

  • Because a large % of user still use older versions (10.9 ~15%, 10.10 ~30%). I'm pretty sure the majority of OS X users are not on the latest version of OS X as opposed to iOS where a huge majority are always on the latest version.

Plus, what if I have a lot bunch of SIMBL plugins installed, this line will remove them all?

  • No -h means that the file is a symbolic link. All that is being deleted is a link to some other folder.
9jkh commented 8 years ago

I've tried using the resize option for those dots: indicator height and width. But all that does is move them to different positions. Doesn't get them any larger or bolder. What theme would I need to be using to get them to appear the way they used to?

Using the 10.8 theme, with Dock Dark Mode/Dark. Unless I can find a way to get those dots to appear larger, I'm tempted to revert to the 0.10.779 (if that would bring back the old style of the indicator lights.) But do you think that older cDock.bundle version was responsible for the crashes?

Or can you please explain how to use an image for those lights?

(I can tell you that, if Apple were still supporting 10.6, I'd still be using that. Not happy with the UIs after 10.8. It will do, but not crazy about 10.9 either. Look what they did to the Dock!!!)

w0lfschild commented 8 years ago

Get a theme from here: http://www.leoparddocks.com/ and use the icons included.

Q: What is a cDock theme?
A: Folder with some files in it

<theme name>                    required
    <theme name>.plist          required
    background.png              optional
    background1.png             optional
    indicator_small.png         optional
    indicator_medium.png        optional
    indicator_large.png         optional
    indicator_small_simple.png  optional
    indicator_medium_simple.png optional

Q: How do I select a theme
A: With cDock or ...
    defaults write org.w0lf.cDock cd_enabled -bool true
    defaults write org.w0lf.cDock cd_theme -string <theme name> 

Q: What are the background.png images
A: They're used for...

    picture background 
    - background.png    > horizontal image
    - background1.png   > vertical image
    - overwritten by    > cd_dockBG

Q: What are the indicator.png images
A: They're used for...

    custom indicators
    - indicator_small.png           > horizontal small image
    - indicator_medium.png          > horizontal medium image
    - indicator_large.png           > horizontal large image
    - indicator_small_simple.png    > vertical small image
    - indicator_medium_simple.png   > vertical medium image

Thanks for using cDock!
w0lfschild commented 8 years ago

And yes the crashes were likely from using an old version.

9jkh commented 8 years ago

Thanks for all the help with this. For the time being, I've reverted to the older cDock.bundle (with the 9.11 app), because of the indicator light becoming so tiny, really just a pinpoint, if I use the newer bundle. I am reluctant to install another "hack" http://www.leoparddocks.com/ (not meant as a pejorative) to solve only this one issue. I'm basically only using cDock to get the Dock background black, because with the 10.9 default Dock, it's really quite difficult to discern the application icons against that very light background (especially since I have so many apps in the Dock, making them small, and the Dock positioned at the left, leaving even less room for icons.)

(In case there are any variations, attaching screenshot of old style indicator lights as they appear on my Dock.) cdock indicator lights old

With the 9.8, crashes were happening soon after login. I have logged out and back in quite a number of times now with this new combination of the 9.11 and the older bundle, and so far no crashes yet. If it starts crashing again, I will start using the newer bundle and see if that fixes it.

If it wouldn't be too much work for some future release, I wonder if there's any chance you might be able to include an option for the earlier indicator lights. If that's not possible, at least an option for a bigger dot--at least the size of the 10.8 default dot.

Again, very grateful for all your help with this.