GUI not refreshing

Hi, I'm running Mac OSX 10.6.8 on a macbook pro and recently installed the student version of matlab 2011a. I'm encountering a problem where sometimes, not always, the main matlab window is not refreshing unless i grab the bottom right corner and resize the screen a little. i'm able to type in the command window but i can't see it sometimes until i've resized the screen. this must be some sort of bug. who has encountered this? more importantly, how do i fix it?? thank you!

1 个评论

bym
bym 2011-12-20
+1 vote for 'best question title' I often find GUI (gooey) things not refreshing. Synonym for gooey is 'icky'

请先登录,再进行评论。

回答(4 个)

Jan
Jan 2011-12-18

0 个投票

I see this behaviour under 2009a and 2011b on Windows7SP1 also. I cannot reproduce it. I believe, the Java window manager misses the refresh event.
But who cares. I resize the window and it is refreshed again. I gave up to expect a perfectly professional appearence.

3 个评论

Sam
Sam 2011-12-19
I care. It's profoundly annoying and wasting my time. However, thank you for letting me know the problem has occurred elsewhere.
Jan
Jan 2011-12-19
I cannot rephrase "who cares" sufficiently. According to the guidelines rudeness is removed from the forum.
The complexity of Matlab's interface has exploded since release 6.5. Some details, like the accurate refresh, got lost.
How often does it occur? If it occurred much of the time, I suspect that even Jan would care.

请先登录,再进行评论。

Walter Roberson
Walter Roberson 2011-12-19

0 个投票

Sam, if I recall correctly, there were a bunch of graphics problems on Snow Leopard in the 2011a release. The graphics problems were different and mostly worse on Lion with 2011b, but still a "challenge" on Snow Leopard.
Can you check to see that Java version you are getting is the one that was installed with MATLAB? Several of the graphics problems had their root in an OS-X Security Update for Java in the early part of 2011 -- something that was fixed in Lion but only patched around in Snow Leopard I seem to remember. MATLAB generally has problems when used with any Java version other than the one it was installed with (because Java changes too much even in dot-dot releases.)

3 个评论

Sam
Sam 2011-12-19
Thank you Walter. It seems to depend on the matlab session i've opened; right now for example I have to resize the window for every line of code i type.
I just typed "which java" and was pointed to
/Applications/MATLAB_R2011a_Student.app/toolbox/matlab/general/java.m
and at the bottom of that .m file I found
% $Revision: 1.12.4.6 $ $Date: 2010/05/20 02:25:22 $
is this helpful? is that where i should be looking?
Sam
Sam 2011-12-20
oh, also typed "version -java" and got this:
Java 1.6.0_29-b11-402-10M3527 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
In MATLAB, try
getenv('MATLAB_JAVA'),system([getenv('MATLAB_JAVA') '/bin/java -version'])
Then, in the OS-X Terminal application, command
which java;java -version
If the two versions are different, then especially if the one inside MATLAB is older, there is more chance that you are using an appropriate Java, but if the two versions are the same then there is more risk that MATLAB needs to use an older version.
Note: inside MATLAB, the command
version -java
should also report the same java version as was found by the longer getenv() series. (If the two differ there is likely a problem!)
Unfortunately, the table of Java version that Yair was building does not happen to extend to versions as new as 2011a, but 1.6.0_12 would be a plausible guess.
(I note, though, that on our Linux system running 2008b that we are at 1.6.0_26 for both MATLAB and the system, which suggests that on our server a newer version got installed over top of the one bundled with MATLAB.)

请先登录,再进行评论。

Image Analyst
Image Analyst 2011-12-19

0 个投票

Sam, try throwing in a few "drawnow" at various key places. It's supposed to force a refresh of the screen. Maybe that will work - worth a try anyway.
James
James 2013-6-20

0 个投票

I am experience a very similar issue, except it has suddenly started happening today and it persists as soon as I start matlab. I've been using R2012a on a Mac with OSX 10.8 for at least several months now without issue. Today on starting Matlab I found no windows would update until I resize them; i.e. I can type into the command window and see what I've typed only after resizing the window. So everything else seems to be working, except the window doesn't refresh automatically.
I tried java -version like the person above, and I got back
Java 1.6.0_51-b11-456-11M4508 with Apple Inc. Java HotSpot™ 64-Bit Server VM mixed mode
though I don't know if this is helpful. I've just reinstalled matlab and XQuartz - no luck. Any help is really appreciated!!

2 个评论

see this thread:
running ./matlab -nodesktop seems to be working (although you have to work without the Java interface)
Can anybody estimate, that Matlab 2013a runs reliably on Macs in 5 or 8 years? The decision to base Matlab's GUI on an extremely complicated Java basement and to use the dynamically updated Java version under OS-X implies, that there is neither a guarantee, that it runs next week, nor in the far future. Under Windows Matlab uses at least a static version of Java, but this has the drawback, that it is very outdated soon. Then the possibility to use leaks in Java to gain admin privileges can be a serious problem. E.g. letting students run Matlab in a computer pool of the university is not secure.
For a productive work with Matlab on a Mac, freeze the system in a virtual machine without updates to Java. And then disconnect the machine from the net. This is not funny.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

提问:

Sam
2011-12-18

Community Treasure Hunt

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

Start Hunting!

Translated by