Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.NullPointerException on Mac OSX

397 views
Skip to first unread message

Alec Nagel

unread,
Dec 9, 2010, 7:40:22 PM12/9/10
to
I get a lot of red Java exceptions when I run the Matlab desktop on my MacBook. For example whenever I switch between the main window and the help window with my mouse, the following error message pops up:

java.lang.NullPointerException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
at java.lang.reflect.Field.get(Field.java:358)
at apple.awt.CAccessible.getCAccessible(CAccessible.java:37)
at apple.awt.CAccessibility$30.call(CAccessibility.java:505)
at apple.awt.CAccessibility$30.call(CAccessibility.java:501)
at apple.awt.CToolkit$CallableWrapper.run(CToolkit.java:1107)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1197)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Or sometimes just simply: java.lang.NullPointerException

I am running Matlab R2010b under OSX 10.6.5 (Snow Leopard).

I thought I had found a fix for this in another thread, where someone reports a similar error: http://www.mathworks.com/matlabcentral/newsreader/view_thread/260767. I followed the instructions mentioned there (taken from this website: http://chxor.chxo.com/post/183013153/installing-java-1-5-on-snow-leopard) and it was fine for a while. Then I started getting some of the red error messages again. I thought that I had maybe done an OSX update in the meantime, in which case I would need to install Java 1.5 again. So I did, but it just got worse.

I'm wondering whether the reason for it not working this time could be that there is a new Java 1.5 (update 8) out, whereas last time I probably used update 7. I really don't see why I should need to be doing this hacking in the first place, though.

Are other people having the same problem. Does anybody know how to fix this?

Thanks!

Brian Arnold

unread,
Dec 10, 2010, 10:25:19 AM12/10/10
to
Hi Alec,

I don't think the issue you are reporting is related to the other issue
you found by searching, and installing older, unsupported versions of
Java on Snow Leopard is likely to cause other stability problems with
MATLAB.

The issue you are reporting is related to "accessibility", otherwise
known as Universal Access (as in, the System Preferences panel). Do you
have any third party extensions that require Universal Access to be
enabled? If so, try un-installing them (don't simply turn them off),
turn off Universal Access, and logout/login or restart, to see if the
problem is resolved by doing that.

Good luck,

- Brian

Alec Nagel

unread,
Dec 14, 2010, 5:03:05 PM12/14/10
to
Thank you so much for your reply, Brian!

I did indeed have several applications that require Universal Access to be enabled. After uninstalling them the error messages have indeed disappeared.

Several of these applications are quite useful to me, however, so I am reluctant to stop using them. Is it the enabling of Universal Access per se that causes the error messages or are there particular applications that are somehow incompatible with Matlab?

- Alec

Brian Arnold <Brian....@mathworks.com> wrote in message <idtgov$a5h$1...@fred.mathworks.com>...

Brian Arnold

unread,
Dec 16, 2010, 9:15:04 AM12/16/10
to
Hi Alec,

Universal Access itself is not likely to be a source of the problem. In
the past we have found incompatibilities with third party products that
require Universal Access. I would systematically re-install the products
you uninstalled, logging out or restarting for each and testing MATLAB,
to determine which one is causing the incompatibility.

Regards,

kun deng

unread,
Mar 8, 2011, 2:42:04 PM3/8/11
to
Has any one solved this problem?
Alec, are you using better touch tool?

"Alec Nagel" wrote in message <idrstm$nrv$1...@fred.mathworks.com>...

Alec Nagel

unread,
Mar 8, 2011, 3:56:20 PM3/8/11
to
"kun deng" <kun....@asu.edu> wrote in message <il60qc$kbu$1...@fred.mathworks.com>...

> Has any one solved this problem?

Hi,

I did not really find any solution except stopping to use the apps that required Universal Access.

As advised, I uninstalled all of them, and the error messages disappeared. I then tried to install the most important ones, and it seemed to be working fine, but after a few days the error messages started coming again.

While switching between the main window and the help window will often cause the error messages, it turns out that sometimes when that doesn't give an error, clicking a few links in the help window will give an error message. And once the first one has come, pretty much anything will cause a new one.

I have sometimes gotten these error messages even when no applications using Universal Access were installed, but Universal Access was turned on.

> Alec, are you using better touch tool?

No. I've been planning to, but have been reluctant to try because I expected it might create this same error, and I am just so tired of seeing these error messages in Matlab...

Are you using it? Does it give you the same error?

regards,
Alec

K D

unread,
Mar 15, 2011, 6:42:29 PM3/15/11
to
Yes, it causes the same problem.

bettertouchtool bettersnaptool and cinch all cause the same error.


On Mar 8, 4:56 pm, "Alec Nagel" <spamawa...@gmail.com> wrote:
> "kun deng" <kun.d...@asu.edu> wrote in message <il60qc$kb...@fred.mathworks.com>...

Steven Lord

unread,
Nov 13, 2014, 12:16:37 PM11/13/14
to

"Alvin " <alvin....@gmail.com> wrote in message
news:m3i8ve$5b0$1...@newscl01ah.mathworks.com...
> I followed the same instructions on disabling UA, removing the apps and
> rebooting but still can't get Matlab to even start.
> I am extremely disappointed.

Contact Technical Support for help with this installation/startup issue.

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Alvin

unread,
Nov 13, 2014, 12:16:37 PM11/13/14
to
I followed the same instructions on disabling UA, removing the apps and rebooting but still can't get Matlab to even start.
I am extremely disappointed.


"CdC" wrote in message <m3g55v$ksd$1...@newscl01ah.mathworks.com>...
> I can no longer run Matlab on my Mac OS X Yosemite.
> I am having this same problem.
> I cannot remove all of the apps that require universal access because I need them (e.g. Google Chrome.app, Skype).
> This seems like more Matlab's issue than everyone else's...
> Solution needed rather urgently.
> Can anyone help?
>
>
> C

Jemmima

unread,
Jan 5, 2015, 9:26:16 AM1/5/15
to
"Steven Lord" <Steve...@mathworks.com> wrote in message <m3ikkr$4gt$1...@newscl01ah.mathworks.com>...
I have raised a support request - is that the correct route? I was hoping to find a resolution fairly quickly as i need to use it now - getting the same issues as above.

Steven Lord

unread,
Jan 5, 2015, 11:07:16 AM1/5/15
to


"Jemmima " <mimes...@gmail.com> wrote in message
news:m8e6u0$4ri$1...@newscl01ah.mathworks.com...
> "Steven Lord" <Steve...@mathworks.com> wrote in message
> <m3ikkr$4gt$1...@newscl01ah.mathworks.com>...
>>
>> "Alvin " <alvin....@gmail.com> wrote in message
>> news:m3i8ve$5b0$1...@newscl01ah.mathworks.com...
>> > I followed the same instructions on disabling UA, removing the apps and
>> > rebooting but still can't get Matlab to even start.
>> > I am extremely disappointed.
>>
>> Contact Technical Support for help with this installation/startup issue.
>>
>> --
>> Steve Lord
>> sl...@mathworks.com
>> To contact Technical Support use the Contact Us link on
>> http://www.mathworks.com
>
> I have raised a support request - is that the correct route?

Yes, either via the online form or by calling.

> I was hoping to find a resolution fairly quickly as i need to use it now -
> getting the same issues as above.

The MathWorks was closed Thursday and Friday last week for the New Years
holiday (or at least the headquarters in Natick was; I'm assuming the other
US offices and the international offices were closed as well) but Support
should be responding to support requests that came in those two days now. If
you need a quicker response, pick up the phone and give your local office a
call.
0 new messages