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

zsh: segmentation fault mysides list on Ventura – Workaround -> Rearrange before list #29

Open
acsr opened this issue Oct 16, 2023 · 1 comment

Comments

@acsr
Copy link

acsr commented Oct 16, 2023

see also possible answers before my comment in similar issue #6 segmentation fault: 11

Issue:

After running mysides list the terminal output stoped after 3 item with error
zsh: segmentation fault mysides list
and a finder window stating unexpected quit of mysides (screenshot, exact message not available).

Workaround

  • I tried to rearrange the first item not listed after the error by dragging it 2 steps further down in the Favorites list.
  • After reissuing mysides list the whole list including this item was listed again.

Possible causing

  • Maybe the old stored format was rewritten on change, leading to be better accessible via a changed API.

I will come back later to add more experience if something changes

Installed version

I am using mysides installed at /usr/local/bin/mysides (creation date 26 Sep 2016, size 49.356 bytes)
Installed using brew install mysides --cask under Mojave or Catalina on an Intel Machine, migrated to Apple Silicon M1 under Monterey, now at Ventura 13.5.2 (22G91)

...
installer: Package name is mysides-1.0.1
...
@acsr
Copy link
Author

acsr commented May 31, 2024

I made some progress understanding the origin of the segmentation fault:

`mysides add´ works without flaws on Apple Silicon and Ventura (Sonoma not tested yet)

In General mysides add "[LinkName]" -> "file:///Location" works without flaws.

  • If the name already exists, the Sidebar item will be recreated with updated target at the end (can be used to rearrange)
  • I cannot remember any errors while adding.

The actual flaw is that there is NO validation during creation.

  1. This can be leading to completely loosing your Sidebar items when the target of an item does NOT EXISTS at all.
  2. This can be an issue if your target is an alias, and the destination is on a server, that is not mounted or cannot be mounted.

Sidebar item points at an alias with issues

If the target of the alias does not exists in the current session you have multiple cases:

  1. The actual alias does not exists
  2. The destination is not reachable, and the destination is on a server, that is not mounted or cannot be mounted.
  3. The target of the alias does not exists at all

In all cases the mysides list stops with an segmentation fault error listing the last item before the broken item.

If the target of the alias is on a server, and can be mounted after the first run, the next run will be succesful until you spot another broken item.

Fixing your backup of the Sidebar using mysides list

  1. Keep backups of the output of mysides list of your latest working setup just in case!
    • Use
      mysides list > ~/mysides_dump-`date "+%Y%m%d_%H%M%S"`.bak
      
  2. Create an mysides add script using your favorite text editor (I omit a oneliner solution here, feel free to add one in the comments)
  3. Test the script and create a dump again and check for errors
    grep "segmentation" ~/mysides_dump-*.bak
    
  4. Fix your script until it works, add comments or comment out as needed to identify footguns and remember them for later

Conclusion

mysides is still useful on Apple Silicon, and can help a lot to backup your sidebar setup and recover from broken items making your crafted sidebar vanish.

nevertheless a new release would help. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant