Clear Filters
Clear Filters

function "getFileIn​foForTools​trip" endless loop

54 views (last 30 days)
Cindy
Cindy on 12 Aug 2024 at 12:30
Answered: Divyam on 20 Aug 2024 at 7:16
I use the cvx tool box in my code. "getFileInfoForToolstrip" function is called. And it become endless loop. It can't jump out of this function. But this function is written by MathWorks, I am confuse how i can solve it?
Following is the function I copy from the function.
function [isTestFile, isValidFile, isClassBasedTest] = getFileInfoForToolstrip(file)
[SL: snipped the full body of the MathWorks function]
  1 Comment
Ayush
Ayush on 13 Aug 2024 at 2:30
I am not able to reproduce the error, please share the MATLAB version or output of ver command. This information will help me understand the context and dependencies involved, and facilitate reproducing the issue more accurately.

Sign in to comment.

Answers (1)

Divyam
Divyam on 20 Aug 2024 at 7:16
Hi @Cindy, I have encountered this issue after the introduction of JavaScript Desktop to MATLAB. This issue is caused by numerous pieces of code which are waiting to be executed in the command window before you press "ENTER" after typing your command. The function "getFileInfoForToolstrip" is one of those pieces of code which blocks the MVM thread and causes the delay you are experiencing.
A couple of workarounds for this issue are:
  • Break down the MATLAB file into multiple files (if the size of your MATLAB file is a few thousand lines of code)
  • In MATLAB preferences, go to MATLAB > Editor/Debugger > Automatic Completions; switch "suggestions and completions" to "show on tab" and then avoid using tab completion.
I am no longer facing this issue since MATLAB version 2022b and later. You can download MATLAB 2022b using this link: https://www.mathworks.com/products/new_products/release2022b.html

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!