Issue: ParforProgress2 Class Throws Errors in MATLAB 2024b
Description:
I encountered several errors while using the ParforProgress2 class in MATLAB 2024b. The errors seem to be related to the use of JavaBit and the ParforProgressClient2.createClient function. Below is the detailed error message.
Error Message:
Warning: An error was caught while executing the destructor of the 'ParforProgress2' class: This type of variable does not support dot indexing.
Error in ParforProgress2/delete (line 143)
o.JavaBit.done();
^^^^^^^^^^^^^^^^
Error in ParforProgress2 (line 61)
if nargin == 1 && iscell(s)
^
Error in ParforProgress2.loadobj (line 49)
o = ParforProgress2( {X.HostName, X.Port, X.OldVersion, X.DEBUG} );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in parallel.internal.pool.optionallyDeserialize (line 7)
out = distcompdeserialize(data);
^^^^^^^^^^^^^^^^^^^^^^^^
Warning: An error was encountered while loading an object of the 'ParforProgress2' class:
Unable to resolve the name 'ParforProgressClient2.createClient'.
Error using ParforProgress2 / increment (line 132)
Variables of this type do not support indexing with points.
MATLAB Version (I used):
System Information:
- OS: [ Windows 10]
- Java version: [ this information from MATLAB's
version -java command]
- MATLAB's Java version:
Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Steps to Reproduce:
- Run the following code with a simple
parfor loop using ParforProgress2 in MATLAB 2024b.
N = 1000;
try
ppm = ParforProgressStarter2('Test Task', N, 0.1, true, true, true);
catch me
error('Initialization failed: %s', me.message);
end
parfor i = 1:N
% Simulate some work
rand(1);
ppm.increment(i);
end
Potential Causes:
The error seems to be related to ParforProgressClient2.createClient being unrecognized, potentially due to the Java-related functionality not working correctly.
The JavaBit object appears to be incorrectly initialized or not properly accessible within the delete() method of ParforProgress2.
What I Have Tried:
I verified that MATLAB's built-in Java is correctly functioning by running version -java, which shows that MATLAB is using Java 1.8.
I also confirmed that the path includes the necessary files for ParforProgress2 and its dependencies.
However, the issue persists when running this on MATLAB 2024b.
Issue:
ParforProgress2Class Throws Errors in MATLAB 2024bDescription:
I encountered several errors while using the
ParforProgress2class in MATLAB 2024b. The errors seem to be related to the use ofJavaBitand theParforProgressClient2.createClientfunction. Below is the detailed error message.Error Message:
Warning: An error was caught while executing the destructor of the 'ParforProgress2' class: This type of variable does not support dot indexing.
Error in ParforProgress2/delete (line 143)
o.JavaBit.done();
^^^^^^^^^^^^^^^^
Error in ParforProgress2 (line 61)
if nargin == 1 && iscell(s)
^
Error in ParforProgress2.loadobj (line 49)
o = ParforProgress2( {X.HostName, X.Port, X.OldVersion, X.DEBUG} );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in parallel.internal.pool.optionallyDeserialize (line 7)
out = distcompdeserialize(data);
^^^^^^^^^^^^^^^^^^^^^^^^
Warning: An error was encountered while loading an object of the 'ParforProgress2' class:
Unable to resolve the name 'ParforProgressClient2.createClient'.
Error using ParforProgress2 / increment (line 132)
Variables of this type do not support indexing with points.
MATLAB Version (I used):
System Information:
version -javacommand]Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed modeSteps to Reproduce:
parforloop usingParforProgress2in MATLAB 2024b.Potential Causes:
The error seems to be related to ParforProgressClient2.createClient being unrecognized, potentially due to the Java-related functionality not working correctly.
The JavaBit object appears to be incorrectly initialized or not properly accessible within the delete() method of ParforProgress2.
What I Have Tried:
I verified that MATLAB's built-in Java is correctly functioning by running version -java, which shows that MATLAB is using Java 1.8.
I also confirmed that the path includes the necessary files for ParforProgress2 and its dependencies.
However, the issue persists when running this on MATLAB 2024b.