Command window corruption bug in Linux
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
The following code seems to corrupt the user-terminal: background changes color, and characters meld into each other when scrolling.
for i=1:1000,'x',drawnow('update'),pause(0.0001),end
The corruption is repaired, by issuing a clc command.
The code may look rather pointless, but is in fact an abstraction of what with software project we are working on. We have a C++ codebase with a mex interface. The C++ methods we call can take a long while to compute, and intermediate results are being "mexPrintf"-printed. We issue a 'drawnow('update'),pause(0.0001)' after each newline to have the effect of updating the Command Window, while the C++ code is being run.
Best regards, Joris
1 件のコメント
f
2017 年 4 月 18 日
I have this bug too. Ubuntu 16.10, Intel 520 graphics (Skylake). Whenever I use something that scrolls heavily, the command window gets corrupted.
回答 (2 件)
Folkert Bleichrodt
2017 年 3 月 29 日
I think I found the issue (and a fix). I set the MATLAB_JAVA environment variable to point to the jre version installed on my machine, so that Matlab does not uses its own java jre version. Simply put this in your .bashrc file:
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre
or when starting matlab use
$ MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre matlab -desktop -nosplash
I don't get the same glitches anymore when I run your code.
2 件のコメント
Christoph
2018 年 12 月 4 日
Hi Dr Bleichrodt,
thanks for your answer.
Would it perhaps be possible for you (or anyone else for that matter) to help me adjusting this fix to the following situation:
My libjvm.so lies in
/usr/lib/jvm/java-11-openjdk-amd64/lib/server
When set mu MATLAB_JAVA to
/usr/lib/jvm/java-11-openjdk-amd64/
The problem is that Matlab (v2016a) attaches a misguided suffix to my MATLAB_JAVA:
/usr/lib/jvm/java-11-openjdk-amd64//lib/amd64/server/libjvm.so
(i.e., the "amd64" seems to have moved to the "java-11-openjdk-amd64" and is no longer a subdirectory).
So, how can I change what is appended to MATLAB_JAVA in order to find the libjvm.so?
Many thanks,
Christoph
dnavidad
2019 年 11 月 2 日
Hello Joris
Have you solved your problem? I have the same one and I am using the same version of Matlab that you does. 2016a. The problem is so annoyning, it is not only the command windows who is corrupted but everything is mixed up, in the workspace window you see the text of your actual script and things like that.
Please, I would be glad if you could help.
I tried what was suggested by Dr Bleichrodt, but it does not work for me.
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre. I do not get any error but, Matlab is still doing the same thing...
Folkert Bleichrodt
2017 年 3 月 29 日
編集済み: Folkert Bleichrodt
2017 年 3 月 30 日
Hi Joris, I have the same problem in Matlab R2017a, which version do you use? I have this with an NVIDIA + intel graphics card combination. Clearing the screen by running
clc
seems to resolve the issue (temporarily). My guess is that it is either the java runtime environment or some graphics card driver issue.
Best regards, Folkert
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!