MarcusVollmer / HRV

Methods for analyzing Heart Rate Variability
http://marcusvollmer.github.io/HRV/
MIT License
78 stars 36 forks source link

Several UI related errors in Matlab 2021 on Mac OS11 #14

Open sedurCode opened 2 years ago

sedurCode commented 2 years ago

Throughtout use of the HRVTool application I am having several glitches and errors that occur when interacting with feature of the application and the GUI is generally very slow. The save button is also unresponsive.

There are several warnings on resize, GUI startup and other instances.

Examples from the command line:

Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923)
In HRVTool (line 250) 
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923)
In HRVTool (line 369) 
Warning: 'popupmenu' control requires a scalar Value.
Control will not be rendered until all of its parameter values are valid 
> In HRVTool/calc_on (line 2454)
In HRVTool (line 385) 
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool (line 387) 
Unable to perform assignment with 0 elements on the right-hand side.

Error in HRVTool/buttonStart_Callback (line 400)
    FileName = STR{VAL};

Error in HRVTool (line 389)
    buttonStart_Callback

Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923) 
Warning: 'popupmenu' control requires a scalar Value.
Control will not be rendered until all of its parameter values are valid 
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923) 
Warning: 'popupmenu' control requires a scalar Value.
Control will not be rendered until all of its parameter values are valid 
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923) 
Warning: 'popupmenu' control requires a scalar Value.
Control will not be rendered until all of its parameter values are valid 
Elapsed time is 0.069210 seconds.
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923)
In HRVTool/buttonFullscreen_Callback (line 2229)
In getpts (line 108)
In HRVTool/buttonPicker_Callback (line 1942)
In getpts (line 108)
In HRVTool/buttonPicker_Callback (line 1942) 
Error using getpts (line 174)
Interruption during mouse point selection.

Error in HRVTool/buttonContinuousVisibility_Callback (line 2057)
    [~,y] = getpts(F.ha5);

Error while evaluating UIControl Callback.

Reference to a cleared variable GETPTS_H1.

Error in getpts (line 122)
elseif (~ishghandle(GETPTS_H1) || ...

Error in HRVTool/buttonContinuousVisibility_Callback (line 2057)
    [~,y] = getpts(F.ha5);

Error while evaluating UIControl Callback.

Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. 
> In HRVTool/set_colors (line 2288)
In HRVTool/my_resizereq (line 3923)
In getpts (line 108)
In HRVTool/buttonPicker_Callback (line 1942)
In getpts (line 108)
In HRVTool/buttonPicker_Callback (line 1942) 
Index in position 1 exceeds array bounds.

Error in getcurpt (line 14)
x = pt(1,1);

Error in getpts>FirstButtonDown (line 220)
[x,y] = getcurpt(GETPTS_AX);

Error in getpts (line 36)
    feval(varargin{:});

Error while evaluating Figure WindowButtonDownFcn.

Given that there is this warning about deprecation of the java figure, I am assuming this would require a slightly more extensive rewrite than is ideally serviceable in a bug report that is as unhelpful as this one.

I have been using copypasta from the app source code in combination with your hrv class to do my analysis, so thank you for providing all of this work.

For reference the Matlab version I am using is R2021a build for apple mac (intel) The Mac OS version is 11.4

Thank you again for sharing these tools!

MarcusVollmer commented 2 years ago

Dear Simon,

Thank you for bringing up these problems. As I created the App options were limited and not all parts of HRVTool were supported with new UI-Objects introduced with the recent releases of Matlab. But there was some progress in the last years and I'll try to find some time for changing the App programming by either using new App-ready function like uifigure or uihtml. Unfortunately, this may also forces the users to upgrade their Matlab licenses to at least R2019b or R2020b.

Best, Marcus

sedurCode commented 2 years ago

Hi marcus, Totally appreciate that. Do you know if your application can be built into a standalone via the matlab compiler?

MarcusVollmer commented 2 years ago

Hi Simon,

I just tried it with Matlab Compiler v99 on Ubuntu 21 and it worked partly. I had to remove the addpath line in HRVTool.m and the standalone stops at line 362. That's because it fails to run the HRV_settings.m because it was generated during the initialization of HRVTool but the m file is therefore not compiled. It would work, if I preset default values within the App itself an allowing the modification of the settings using the interface instead of storing the options in a separate settings.m. Although the import of settings should work if the options are stored in a text file and being evaluated using an import function.

Best, Marcus

sedurCode commented 2 years ago

Thanks Marcus, Would you feel comfortable sharing your packaged application via email?

MarcusVollmer commented 2 years ago

Hi Simon,

I can build a standalone for Linux/Ubuntu and MacOS. But I still need some time for the modifications as already described (avoiding the use of settings files). I will get back to you till the end of this month if that's fine for you.

Best, Marcus

sedurCode commented 2 years ago

Hi Marcus, This is all excellent, thank you very much!

daniell-00 commented 2 months ago

Dear Marcus,

Is there any advance on this issue? I've been struggling with the similar error messages when I try to remove or add R peaks. Thanks in advance.

Best regards, Daniel

MarcusVollmer commented 2 weeks ago

Dear Daniel,

I'm busy with other projects, so there is no progress in updating the toolbox. As the error message suggests an error caused by the internal Matlab function getpts, it's not easy solve this error. Which versions of Matlab and the Image Processing Toolbox are you using?

Best, Marcus