Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 649 [details]
Test case project files
I've hit this weird bug with MonoMac on Lion:
When creating an NSStatusItem and opening its menu, all the menu items are disabled, even when they have actions attached to them.
This only happens when launching an app bundle standalone. This doesn't happen when running the app from within MonoDevelop, all menu items are clickable when running it this way.
I've reproduced this in the attached test case.
Open the project in MD.
Run the project: menu works as expected.
Create a .app using Project -> Create Mac Installer.
Open the bundle by double clicking it: menu doesn't work.
MonoMac version: 220.127.116.11
MonoDevelop version: 18.104.22.168
I have CCed Michael Hutchinson to this mail, because I believe he ran into a similar issue in the past.
The problem might be with the differences in Info.plist, but I can not be absolutely sure about it.
I doubt that this is a bug in the MonoMac bindings themselves, they are likely a problem with the packaging, but I do not know what is wrong, nor where to start with this.
For what it's worth, here's the diff between the project plist and the bundle plist:
--- Info.project.plist 2011-10-15 18:12:38.000000000 +0100
+++ Info.bundle.plist 2011-10-15 18:13:33.000000000 +0100
@@ -26,5 +26,7 @@
\ No newline at end of file
I've tried replacing the bundle plist with the project plist and then running the bundle, but it will crash on start without any messages.
Could http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MenuList/Articles/EnablingMenuItems.html have anything to do with this?
No idea. Have you tried running the bin/Debug MD-built app bundle from outside MD, i.e. without running mmp?
This works fine.
Weird, so it has something to do with mmp and the absence of a launch script?
It seems so...
Here's a diff of both .apps:
Hylke-Bonss-MacBook:menutest hbons$ diff -qr statusitemtest.bundle.app/ statusitemtest.project.app/
Only in statusitemtest.project.app/Contents/MacOS: mono-version-check
Files statusitemtest.bundle.app/Contents/MacOS/statusitemtest and statusitemtest.project.app/Contents/MacOS/statusitemtest differ
Only in statusitemtest.bundle.app/Contents: MonoBundle
Only in statusitemtest.project.app/Contents/Resources: MonoMac.dll
Only in statusitemtest.project.app/Contents/Resources: MonoMac.dll.mdb
Only in statusitemtest.project.app/Contents/Resources: statusitemtest.exe
Only in statusitemtest.project.app/Contents/Resources: statusitemtest.exe.mdb
Only in statusitemtest.project.app/: statusitemtest
If there's any more info you need, just say so.
FWIW, the SparkleShare project is blocked on this bug.
I cannot reproduce the problem with the attached project. It works fine, both when run from MD and when packaged.
What versions of the packages do you have?
I've had several people reproduce this problem.
Apologies in the delay in wrapping up this bug.
I'm unable to open the project attached in a modern version of Xamarin Studio / Xamarin.Mac. Please open a new bug if this is still an issue and attach a working repro case.