Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Current Directory Exception/Error

Subject: Current Directory Exception/Error

From: Rachel

Date: 23 Nov, 2010 20:24:04

Message: 1 of 6

A problem just started with my version of Matlab. I'm using Matlab R2009a (student version) on an iMac running OS 10.5.8 (Leopard). I sometimes run COMSOL 3.5, which can interact with Matlab (the problem I'm having started during one of the Comsol w/ matlab sessions, so it seems a bit suspect).
I've been running this version of Matlab on this OS for a while, but just last week I started having problems when I try to change directories using the Current Directory window. I've included the full error at the bottom.
When I try to change directories, it pops up the error on the command window. No files are visible in the current directory, though it does actually change into it. I can run files and edit files fine without use of the window, but no files show up in the directory (they are all there, however). Everything else seems to run properly; the ease of use (double-clicking to open *.m files and so on) has just significantly decreased.
Anyone encountering anything similar or know any fixes for this?


ERROR MESSAGE:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.mathworks.mlwidgets.explorer.DocumentTableColumns$11.compare(DocumentTableColumns.java:204)
at com.mathworks.mlwidgets.explorer.DocumentTableColumns$11.compare(DocumentTableColumns.java:202)
at com.mathworks.mlwidgets.explorer.DocumentTableUtils$2.compare(DocumentTableUtils.java:59)
at com.mathworks.mlwidgets.explorer.DocumentTableUtils$2.compare(DocumentTableUtils.java:57)
at com.mathworks.mlwidgets.explorer.DocumentTableUtils$1.compare(DocumentTableUtils.java:43)
at com.mathworks.mlwidgets.explorer.DocumentTableUtils$1.compare(DocumentTableUtils.java:36)
at com.mathworks.widgets.grouptable.GroupingTableModel$18.run(GroupingTableModel.java:822)
at com.mathworks.widgets.grouptable.GroupingTableModel$20.run(GroupingTableModel.java:929)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Subject: Current Directory Exception/Error

From: Aurelien Queffurust

Date: 29 Nov, 2010 10:01:04

Message: 2 of 6

"Rachel " <rheadley@uw.edu> wrote in message <ich7t4$hg3$1@fred.mathworks.com>...
> A problem just started with my version of Matlab. I'm using Matlab R2009a (student version) on an iMac running OS 10.5.8 (Leopard). I sometimes run COMSOL 3.5, which can interact with Matlab (the problem I'm having started during one of the Comsol w/ matlab sessions, so it seems a bit suspect).
> I've been running this version of Matlab on this OS for a while, but just last week I started having problems when I try to change directories using the Current Directory window. I've included the full error at the bottom.
> When I try to change directories, it pops up the error on the command window. No files are visible in the current directory, though it does actually change into it. I can run files and edit files fine without use of the window, but no files show up in the directory (they are all there, however). Everything else seems to run properly; the ease of use (double-clicking to open *.m files and so on) has just significantly decreased.
> Anyone encountering anything similar or know any fixes for this?
>
>
> ERROR MESSAGE:
>
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> at com.mathworks.mlwidgets.explorer.DocumentTableColumns$11.compare(DocumentTableColumns.java:204)
> at com.mathworks.mlwidgets.explorer.DocumentTableColumns$11.compare(DocumentTableColumns.java:202)
> at com.mathworks.mlwidgets.explorer.DocumentTableUtils$2.compare(DocumentTableUtils.java:59)
> at com.mathworks.mlwidgets.explorer.DocumentTableUtils$2.compare(DocumentTableUtils.java:57)
> at com.mathworks.mlwidgets.explorer.DocumentTableUtils$1.compare(DocumentTableUtils.java:43)
> at com.mathworks.mlwidgets.explorer.DocumentTableUtils$1.compare(DocumentTableUtils.java:36)
> at com.mathworks.widgets.grouptable.GroupingTableModel$18.run(GroupingTableModel.java:822)
> at com.mathworks.widgets.grouptable.GroupingTableModel$20.run(GroupingTableModel.java:929)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)






Concerning you error message see the following bug report :
Exception displays in the Command Window after sorting on the Description column in the Current Directory browser
http://www.mathworks.com/support/bugreports/543280

Concerning the fact that you cannot see some files in Current folder whereas they exist:
See this bug report:
Current Folder browser can fail to show all of the contents of a folder containing a broken symbolic link on Unix and Macintosh platforms
http://www.mathworks.com/support/bugreports/585330


Aurélien,

http://blog.developpez.com/matlab4geek/

Subject: Current Directory Exception/Error

From: Rachel

Date: 29 Nov, 2010 22:45:25

Message: 3 of 6

Thank you. I can't believe part of the problem's solution was as simple as not sorting by Description when using Current Directory.

Subject: Current Directory Exception/Error

From: Raffaele Bornatico

Date: 7 Apr, 2011 13:09:05

Message: 4 of 6

"Aurelien Queffurust" wrote in message
> Concerning you error message see the following bug report :
> Exception displays in the Command Window after sorting on the Description column in the Current Directory browser
> http://www.mathworks.com/support/bugreports/543280
>
> Concerning the fact that you cannot see some files in Current folder whereas they exist:
> See this bug report:
> Current Folder browser can fail to show all of the contents of a folder containing a broken symbolic link on Unix and Macintosh platforms
> http://www.mathworks.com/support/bugreports/585330
>
>

I think my problem is very similar except I am running Matlab 2010a both on a Win 32 bit and 64bit. At startup the Current Folder does not show up. Command window displays: " Warning: Unable to create com.mathworks.mde.explorer.Explorer, for details see
 C:\(...) \Local\Temp\MATLABDesktopCreateError.log " (error log pasted at the end)

By trying Desktop>Deskop Layout>Default the Current Folder appears but is completely blank and on the command window I see:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.mathworks.mde.explorer.Explorer.requestFocus(Explorer.java:850)
at com.mathworks.mwswing.desk.DTClient.requestFocus(DTClient.java:528)
at com.mathworks.mwswing.desk.DTClient.requestFocus(DTClient.java:498)
at com.mathworks.mwswing.desk.DTClient$DeferredFocusRequest.doTask(DTClient.java:1462)
at com.mathworks.mwswing.desk.DeferredRunnable.run(DeferredRunnable.java:27)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Any hint is very much appreciated!!
thanks,
Raffaele


p.s: here the error log

java.lang.NullPointerException
at com.mathworks.mlwidgets.explorer.ExplorerTableConfigurationSerializer.findMode(ExplorerTableConfigurationSerializer.java:186)
at com.mathworks.mlwidgets.explorer.ExplorerTableConfigurationSerializer.loadGroupMode(ExplorerTableConfigurationSerializer.java:90)
at com.mathworks.mlwidgets.explorer.ExplorerTableConfigurationSerializer.load(ExplorerTableConfigurationSerializer.java:72)
at com.mathworks.widgets.grouptable.GroupingTableConfiguration.<init>(GroupingTableConfiguration.java:152)
at com.mathworks.mde.explorer.Explorer.buildTableConfiguration(Explorer.java:317)
at com.mathworks.mde.explorer.Explorer.<init>(Explorer.java:158)
at com.mathworks.mde.explorer.Explorer.getInstance(Explorer.java:887)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.mathworks.mwswing.desk.DTClient.createComponent(DTClient.java:280)
at com.mathworks.mwswing.desk.Desktop.createClientComponent(Desktop.java:5536)
at com.mathworks.mde.desk.MLDesktop.createClientComponent(MLDesktop.java:709)
at com.mathworks.mwswing.desk.Desktop.createClientComponentWrapper(Desktop.java:5551)
at com.mathworks.mwswing.desk.Desktop.setClientShowing(Desktop.java:5926)
at com.mathworks.mwswing.desk.Desktop.setClientShowing(Desktop.java:5913)
at com.mathworks.mwswing.desk.Desktop.restoreLayout(Desktop.java:5061)
at com.mathworks.mwswing.desk.Desktop.restoreLayout(Desktop.java:4791)
at com.mathworks.mde.desk.MLDesktop.restoreLayout(MLDesktop.java:1160)
at com.mathworks.mwswing.desk.Desktop.restorePreviousLayout(Desktop.java:3728)
at com.mathworks.mwswing.desk.Desktop.initMainFrame(Desktop.java:259)
at com.mathworks.mde.desk.MLDesktop.initMainFrame(MLDesktop.java:542)
at com.mathworks.mde.desk.MLDesktop$Initializer.run(MLDesktop.java:850)
at com.mathworks.jmi.AWTUtilities$Invoker$5.runWithOutput(AWTUtilities.java:481)
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:397)
at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:360)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Subject: Current Directory Exception/Error

From: Raffaele

Date: 12 Apr, 2011 12:42:04

Message: 5 of 6

Here the solution to the above problem. It worked perfectly for me!

>>
The issue is due to the preference file(s) being corrupted. We can regenerate the preferences by renaming
the preferences folder as follows:

1.) Type in 'prefdir' on your MATLAB prompt. This will return the folder that contains references for MATLAB
and related products.

2.) Make sure that MATLAB is closed and rename the preferences directory of your current MATLAB
version and all older versions of MATLAB(if you have others installed) to something else.

For example, in MATLAB 2010a, rename the directory R2010a to R2010aOld.

3.) Restart MATLAB. A new preferences directory will be created for the MATLAB version that is launched

Subject: Current Directory Exception/Error

From: Alessandro

Date: 15 May, 2012 09:58:06

Message: 6 of 6

Thank you Raffaele! It works fine!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us