Java exception occurred when using uigetfile after parpool in standalone application
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello
I am getting the following error when running my standalone application after closing (either with 'Open' or 'Cancel') the uigetfile dialog box.
Error using matlab.ui.internal.dialog.FileOpenChooser/doShowDialog (line 88)
Java exception occurred:
java.lang.NullPointerException
at ca.odell.glazedlists.AbstractEventList.addAll(AbstractEventList.java:331)
at ca.odell.glazedlists.TransformedList.addAll(TransformedList.java:84)
at ca.odell.glazedlists.AbstractEventList.addAll(AbstractEventList.java:295)
at ca.odell.glazedlists.impl.ThreadSafeList.addAll(ThreadSafeList.java:198)
at com.mathworks.mde.editor.breakpoints.MatlabDebugger$4.completed(MatlabDebugger.java:254)
at com.mathworks.jmi.MatlabMCR$CompletionHandler.messageReceived(MatlabMCR.java:1574)
at com.mathworks.jmi.NativeMatlab.ProcessPendingEvents(Native Method)
at com.mathworks.jmi.NativeMatlab.processPendingEvents(NativeMatlab.java:538)
at com.mathworks.jmi.AWTUtilities$MatlabLatch.safeWait(AWTUtilities.java:831)
at com.mathworks.jmi.AWTUtilities$MatlabLatch.waitFcn(AWTUtilities.java:846)
at com.mathworks.jmi.AWTUtilities$Latch.acquire(AWTUtilities.java:709)
at com.mathworks.jmi.AWTUtilities$Invoker.invoke(AWTUtilities.java:445)
at com.mathworks.jmi.AWTUtilities.invokeAndWaitInternal(AWTUtilities.java:217)
at com.mathworks.jmi.AWTUtilities.invokeAndWait(AWTUtilities.java:84)
Error in matlab.ui.internal.dialog.FileChooser/showPeerAndBlockMATLAB (line 114)
Error in matlab.ui.internal.dialog.FileChooser/show (line 122)
Error in uigetputfile_helper (line 45)
Error in uigetfile (line 127)
MATLAB:Java:GenericException
My code can be simplified as
function run_test
setmcruserdata('ParallelProfile', 'MyProfile.settings');
test;
end
function test
parpool('MyProfile',4);
[f,p]=uigetfile('*.txt','Select files to open');
% Do something with [p f];
delete(gcp)
end
I don't get the error if I run the code from Matlab console or if I create the standalone application with uigetfile before calling parpool (but this is not what I need).
Does anyone know how to solve the problem?
I use Matlab R2014a on Windows7.
Thanks
Francesco
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!