Filter löschen
Filter löschen

function "getFileIn​foForTools​trip" endless loop

54 Ansichten (letzte 30 Tage)
Cindy
Cindy am 12 Aug. 2024 um 12:30
Beantwortet: Divyam am 20 Aug. 2024 um 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 Kommentar
Ayush
Ayush am 13 Aug. 2024 um 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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Divyam
Divyam am 20 Aug. 2024 um 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

Kategorien

Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by