GNOME Bugzilla – Bug 774478
[patch attached] Banshee 2.6.1 fails to launch on macOS 10.12.1
Last modified: 2020-03-17 10:01:53 UTC
Banshee fails to launch on macOS Sierra 10.12.1; it immediately dies. Opening it from terminal reveals the error: Warboss:~ nate$ /Applications/Banshee.app/Contents/MacOS/Banshee Application bundle has moved. Adjusting bundle... find: /Users/nateApplications/Banshee.app/Contents/Resources/etc: No such file or directory The path "/Users/nateApplications" is obviously not valid. The string "/Users/<user>" is being pre-pended to the bundle path, no matter where I put it. For example, if I move the bundle to the desktop: Warboss:~ nate$ /Users/nate/Desktop/Banshee.app/Contents/MacOS/Banshee Application bundle has moved. Adjusting bundle... find: /Users/nateUsers/nate/Desktop/Banshee.app/Contents/Resources/etc: No such file or directory Whatever is prepending the path with "/Users/<user>" needs to stop doing this. This looks the same as https://bugzilla.gnome.org/show_bug.cgi?id=725454, but whatever DMG was regenerated there is invalid. Please just stop pre-pending any path at all in the macOS version. It's unnecessary.
The problem is somewhere in banshee.darwin.in. Investigating.
The opening code that determines APP_ROOT (line 2) was wrong and did not need "$PWD/" prepended. That fixed the initial crash, but exposes another one with the GTK libraries having invalid paths. The part that adjusts the paths in the .in files doesn't seem to be doing its job and substituting ${APP_RESOURCES} into ${RES_DIR}.
Fixing that with `sed -i -E "s|\${APP_RESOURCES}|${RES_DIR}|g" ${file}` doesn't seem to eliminate the crash: [Info 09:51:04.313] Running Banshee 2.6.1: [git-checkout (darwin11.4.0, x86_64) @ 2013-04-19 10:31:24 CEST] Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: glibsharpglue-2 I'm missing something here--as can be expected with my first foray into Banshee development, I suppose. Possibly relevant: http://stackoverflow.com/questions/13885454/mono-on-osx-couldnt-find-gtksharpglue-2-dll#15655635
This diff fixes the problem for me and now I can use Banshee normally: http://pastebin.com/1Kj0Wsbe I'm not sure if this is the 100% correct fix or how to submit a patch, but hopefully it should illustrate to someone more familiar with the codebase the sort of thing that will be needed to resolve the issue.
Thanks for the patch! Could you attach it in a more manageable format please? You would do this by cloning the repository with git, making the commit with your changes, and then issuing `git format-patch HEAD~1`, which generates the file that you can attach here.
Created attachment 339989 [details] [review] Tested if speculative fix for the crash-on-launch issue on macOS This patch fixes the crash-on-launch issue encountered on macOS. Please feel free to rewrite it if necessary, as I am not yet familiar with the style guidelines for this project.
Awesome, that's more readable. Only thing is that you're fixing 3 problems here in 1 single commit. Ideally, please attach 3 patches. Each of them will fix a single issue. And in each commit message you would need to state the explanation of the change (basically enough to copy+paste what you wrote in the comments of this bug). Also please state the exact version of MacOS that you're using, in each of the commit messages. After that I can commit the files for you in the repo (preserving authorship). Thanks!
> commit the files ... I meant, commit the patches.
All right, let me try that again.
Review of attachment 339989 [details] [review]: Ignore this.
Created attachment 340017 [details] [review] Fixes the path-not-found issue on macOS 10.12.1 This fixes the first of three issues that were preventing Banshee 2.6.1 from launching on macOS 10.12.1
Created attachment 340018 [details] Fixes an issue with incorrect mono library paths and environment variables on macOS 10.12.1 This fixes the second of three issues that were preventing Banshee 2.6.1 from launching on macOS 10.12.1
Created attachment 340019 [details] [review] ixes an issue with incorrect mono library paths and environment variables on macOS 10.12.1 This fixes the second of three issues that were preventing Banshee 2.6.1 from launching on macOS 10.12.1.
Created attachment 340020 [details] [review] Fixes an issue with absolute path substitution for mono libraries and tango modules on macOS 10.12.1 This fixes the third of three issues that were preventing Banshee 2.6.1 from launching on macOS 10.12.1. Applying all three patches should restore Banshee's ability to launch on the Mac.
Done.
Ping?
Oops, I'm very sorry, I missed your comment#16 on my mailbox, luckily you pinged me (next time ping directly, no need to go through Bugzilla :) ). Patches look good to me technically, but they don't adjust to the commit-message guidelines. For example, first one: ``` Fix a path-not-found issue on macOS 10.12.1 ``` When it should be (first line as short as possible but including bug number, 3rd line and rest of lines explaining the problem as much detail as possible, not just the solution). For example: ``` macOS: fix "No such file or directory" at launch Banshee failed to launch on macOS Sierra 10.12.1; it immediately died. Opening it from terminal reveals the error: nate$ /Applications/Banshee.app/Contents/MacOS/Banshee Application bundle has moved. Adjusting bundle... find: /Users/nateApplications/Banshee.app/Contents/Resources/etc: No such file or directory The path "/Users/nateApplications" is obviously not valid. The string "/Users/<user>" was being pre-pended to the bundle path, no matter where I put it. For example, if I moved the bundle to the desktop: nate$ /Users/nate/Desktop/Banshee.app/Contents/MacOS/Banshee Application bundle has moved. Adjusting bundle... find: /Users/nateUsers/nate/Desktop/Banshee.app/Contents/Resources/etc: No such file or directory The problem is in banshee.darwin.in. The opening code that determines APP_ROOT (line 2) was wrong and did not need "$PWD/" prepended. ``` And so on with the other patches.
I missed the bug number, 1st line of commit message should be: macOS: fix "No such file or directory" at launch (bgo#774478)
Created attachment 354283 [details] [review] macOS: fix "no such file" issue
Created attachment 354284 [details] [review] macOS: fix failure to launch issue
Done. Let me know if any further work is needed. Also, is Banshee still actively developed?
> Done. Let me know if any further work is needed. I only see 1 line in your commit messages. In comment#18 I said that you should add all the details. > Also, is Banshee still actively developed? Unfortunately, not in the last months by me. But I plan to resurrect it at some point. (Hint: help is welcome ;) )
Are the rest of those details really that important? I didn't think so, but if you feel differently, I can add some more. As for Banshee's future, if you don't already know this, you should be aware that there's been some activity on banshee-list@gnome.org (https://mail.gnome.org/archives/banshee-list/) by people who are trying to restart development. Might make sense to coordinate and centralize efforts to prevent duplication.
Created attachment 354291 [details] [review] macOS: fix incorrect mono path issue Oops, forgot the third reformatted patch.
> Are the rest of those details really that important? I didn't think so, but if > you feel differently, I can add some more. If you don't add those details, you're just adding the *what* and not the *why*. For example: fix incorrect mono path issue. Why is it incorrect? > As for Banshee's future Thanks for letting me know, I'll take that in account.
Okay, I can elaborate a bit.
Created attachment 354292 [details] [review] macOS: fix no such file issue
Created attachment 354293 [details] [review] macOS: fix failure to locate bundle resources
Created attachment 354294 [details] [review] macOS: fix incorrect mono path issue
Is this thing on?
Sorry to be picky but the first two patches contain the same description. Each patch should have a description unique to the problem that is fixing.
Created attachment 354670 [details] [review] macOS: fix failure to locate bundle resources They're all fixing the same problem: Banshee not launching on macOS. To be honest I'm not sure why we even need three patches in the first place since the actual problem won't be solved unless all three are applied in tandem. Regardless, I've updated one of the patches to have a unique description.
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.