Re: ige-mac-integration



Hi John Ralls and Others

Thanks for the reply, I made a debug build and noticed that in GNSMenuItem.[c|h] there where a check for "#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4" and it was using 10.4 code.

I tried to "export MACOSX_DEPLOYMENT_TARGET=1050" but it did not work. So I redefined it in the code and It do not crash anymore. Thanks.

I have two other problems:

    1) The menus don't use the Cmd-mac key as accel. I have set "gtk_osxapplication_set_use_quartz_accelerators" to true. But it's not working. It worked with the old implementation ?

    2) When I use "gtk_osxapplication_insert_app_menu_item" to move the "About" and "Preferences" MenuItem's to the Apple Menu. The Menu is still shown in the menubar even though the Menu is empty ?


Thanks, this is great.

--
Med Venlig Hilsen / Kind Regards

Mikkel Kruse Johnsen
Adm.Dir.

Linet
Ørholmgade 6 st tv
Copenhagen N 2200 Denmark
Work: +45 21287793
Mobile: +45 21287793
Email: mikkel linet dk

Web: Healthcare
in: Professional Profile


Medical Consultant


ons, 08 09 2010 kl. 17:40 -0700, skrev John Ralls:
On Sep 8, 2010, at 9:00 AM, Mikkel Kruse Johnsen wrote:

> Hi John Ralls
> 
> I'm using your ige-mac-integration package. But I have crashes on mac when menues changes (UIManager). Here is what I get:
> 
> ----
> 2010-09-08 16:44:51.488 mono[672:613] *** Assertion failure in -[NSMenu insertItem:atIndex:], /SourceCache/AppKit/AppKit-1038.32/Menus.subproj/NSMenu.m:554
> 2010-09-08 16:44:51.491 mono[672:613] An uncaught exception was raised
> 2010-09-08 16:44:51.496 mono[672:613] Invalid parameter not satisfying: (index >= 0) && (index <= [_itemArray count])
> 2010-09-08 16:44:51.498 mono[672:613] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: (index >= 0) && (index <= [_itemArray count])'
> -----
> 
> If I make this change to "src/cocoa_menu_item.c":
> 
> ----
> @@ -496,8 +501,9 @@ cocoa_menu_item_add_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
> 
>    if (index >= 0 && index < [cocoa_menu numberOfItems]) 
>      [ cocoa_menu insertItem:cocoa_item atIndex:index];
> -  else 
> -    [ cocoa_menu addItem:cocoa_item];
> +  else
> +    [cocoa_menu insertItem:cocoa_item atIndex:0];
> +    //[ cocoa_menu addItem:cocoa_item];
> 
>    cocoa_menu_item_sync(menu_item);
> }
> ---
> 
> Then everything works fine, accept that the menu's is reversed. But no crashes.
> 
> Do you have any idea what could be the problem ? 
> 
> (Se attachment for full dump)
> 
> Many thanks, for the otherwise great integration.

First of all, support is provided through the gtk-osx-users mailing list. I've copied the list with this reply, please be sure to "reply all" so that the list gets copies.

The stack trace appears to show that a formerly hidden menu item is being un-hidden, and the index is a negative number.. It's a very deep trace, though, and further down there was a collection of gtk_ui_manager_remove_ui.. Could it be that your code is trying to unhide a menu item that's been deleted?

I think that to understand what's going on you're going to have to do a debug build and debug the crash. You could start by setting a conditional breakpoint on the insertItem: atIndex: call in GNSMenuItem unhide, conditional on index < 0. You'll then be able to see which menu item is causing the problem and figure out its history and why it thinks it has a negative index.

Regards,
John Ralls



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]