07-27-2010 01:40 AM - edited 07-27-2010 03:34 AM
This pops up an error: "Uncaught exception: Java.lang.Error"
The exception cannot be caught, and does not appear in the debugger, only on the phone. It occurs after addMenuItem calls toString in the ApplicationMenuItem, but the string is fine -- a literal.
Call stack is several levels deep into unknown methods.
Works fine in simulators and on the Storm, but not on an 8330 running 4.5 .
Solved! Go to Solution.
07-27-2010 04:23 AM
Solved. For some reason you need PIM / Organizer permission to add system-wide menu items. I had the module set with this permission, but the CodeModuleGroup didn't have it.
They sure made it hard to debug this one -- it didn't throw a ControlledAccessException as it was supposed to. Instead, it threw something that can't even be caught, which means that if the users don't have the permissions set right, the app bombs with an error that could be anything.
Am checking for permissions in advance and prompting if necessary, but in the past have still had permissions-related support requests despite that, so it doesn't always work.