Bug 272307 [Mac] CocoaUIEnhancer crashes with NullPointer under Mac OS X Cocoa when running Riena example
When bringing up the Riena example app, we get a NullPointer Exception. The exception is logged and the app continues to run. I am unsure why that is happening. Same app runs without a problem with windows, linux, mac os x carbon. I will supply a screenshot of the debugger before the nullpointer happens and a screen shot of the actual app. Its a little tricky to set up the Riena example app yourself unless you like to download Riena and setup a target platform and all that. Then I am happy to post you a link with description. I will also attach the stacktrace with some error messages. Hope that helps to get to the cause of the problem.
bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java
import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.internal.WorkbenchWindow;
import org.eclipse.ui.internal.misc.StatusUtil;
import org.eclipse.ui.statushandlers.StatusManager;
/**
 * The CocoaUIEnhancer provides the standard "About" and "Preference" menu items
 * and links them to the corresponding workbench commands. 
 * This must be done in a MacOS X fragment because SWT doesn't provide an abstraction
 * for the (MacOS X only) application menu and we have to use MacOS specific natives.
 * The fragment is for the org.eclipse.ui plug-in because we need access to the
 * Workbench "About" and "Preference" actions.
 * 
 * @noreference this class is not intended to be referenced by any client.
 * @since 1.0
 */
public class CocoaUIEnhancer implements IStartup {
	private static final int kAboutMenuItem = 0;
	private static final int kPreferencesMenuItem = 2;
	private static final int kServicesMenuItem = 4;
	private static final int kHideApplicationMenuItem = 6;
	private static final int kQuitMenuItem = 10;
	
	static long sel_toolbarButtonClicked_;
	static long sel_preferencesMenuItemSelected_;
	static long sel_aboutMenuItemSelected_;
	private static final long NSWindowToolbarButton = 3;