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

Crash while building linux after changing icon.icns #68

Open
amazingmarvin opened this issue Sep 13, 2021 · 1 comment
Open

Crash while building linux after changing icon.icns #68

amazingmarvin opened this issue Sep 13, 2021 · 1 comment

Comments

@amazingmarvin
Copy link

I found what may be the same crash reported in electron-userland/electron-builder#5844

I recently changed my app's macos icon (the build works and the icon displays correctly), and now when I build for linux, the build crashes here:

maxIconInfo := result[len(result)-1]

The error message is panic: runtime error: index out of range [-1], meaning this result slice is empty.

Here's the old icon: https://s3.amazonaws.com/community.amazingmarvin.com/old_icon.icns
and the new icon: https://s3.amazonaws.com/community.amazingmarvin.com/new_icon.icns

Interestingly the old icon shows correctly in Finder whereas the new icon shows a generic image icon, so possibly the file format is invalid somehow (though using an online icns->png converter works):
image

@amazingmarvin
Copy link
Author

I rebuilt the icon using iconutil and it both looks correct in Finder and fixes the build. I will leave this open since I think it might be worth panicking with a better error when len(result) == 0, but feel free to close at your convenience!

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

0 participants