Ken & Mike on the MATLAB Desktop
October 6th, 2008
MATLAB and the new Java update on the Mac
If you are a mac user, you may have noticed some “changes” with the latest “Java for Mac OS X 10.5 Update 2″. Negative symptoms seem to vary from user to user but generally involve font issues in the editor. The following screenshot is from my mac; you can see the undesirably large fonts and the oddly mis-sized tabs at the bottom. If you haven’t noticed any problems, that’s good; you can go about your business.
For those of you affected, we have a few workarounds that ameliorate some of the issues:
- Font Size
Try replacing Monospace 12-pt with Andale Mono or Courrier New 9-pt in the editor font preferences. I haven’t tried Ken’s preferred Bitstream Vera Sans Monospaced, but that might be fine, too.
- Print Orientation
If you’re trying to print a figure or model and the “print page setup orientation” is disabled, you can print from the command line using the following commands to produce a PDF-file on disk in landscape format which can then be printed with the Preview application:
orient landscape
print('-dpdf')
Buttons and Toolbars
We don’t have a workaround for the sizing and inset issues, but we are coding up some new stuff for a future release.
Some of you may be wondering “how could we let this happen?” We have been working with Sun and Apple over the years to fix bugs, and they have been quite responsive to our needs, but we have very different release schedules and priorities, and so tests and resolutions are not able to be synchronized.
We test out MATLAB on various pre-release builds of all our platforms that helps both us and our vendors resolve issues before an official release. But, as some of you may know, some things always seem to change with the official release. We’re working hard to resolve all the new issues, and we hope that you continue to enjoy the over-all increase in quality, usefulness of features, and increased “mac-iness” of MATLAB.
On the positive side this update fixes a number of other bugs that have been plaguing us. If you notice additional issues or are having difficulty with these workarounds, please create a technical support request.
In completely unrelated news, check out our sweet new avatars. If they become popular enough, maybe I’ll make it into a tattoo ;-)
By
Michael Katz
Mike is a developer on the MATLAB Desktop team. When not describing himself in the third person, biking, homebrewing, or rooting for the home team, he's busy trying to make the world a better place for programming.
09:23 UTC |
Posted in Desktop, Editor |
Permalink |
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Leave a Reply
|
More importantly, what are you going to do about the abysmal performance of Matlab on Leopard. Many of my colleages are exasperated that on the same hardware (running multiple OSes to test), OS X Matlab is sluggish and flaky… Is there a timeline for tuning performance on OS X, do you care?
Hi Ian,
Can you be more specific about where you see performance differences? We are aware of some bottlenecks in our rendering pipeline on the Mac and I can assure you this is being addressed.
We certainly do care about MATLAB’s performance and appearance on the Mac. There are a number of devout Mac users at The MathWorks who are continually trying to push MATLAB forward on the platform.
Again, more specifics about the issues you are running into will be beneficial to us.
Thanks,
-Ken
Hi Ken,
Thanks for the heads up on this one but I hope there is a resolution soon. The editor is now almost impossible to use sensibly. I’ve tried the font fix to reduce the size but with characters jumping around as you try to click on them I’ve resorted to using text editor and *only* running the script in matlab.
Will have to try the next release next week…
I also agree with Ian’s comments but I have not got specific numbers with me right now. I use FFT and Wavelets a lot and have noticed significant performance drops across the last few releases.
I have in the past submitted these as bug reports (and CCd to our Australian EDU contacts) and at least the response I got was along the lines of: “oh yeah your right, it does run like crap”. But things just get slower with every release.
Otherwise, I do generally like using matlab.
Cheers
-pete
After installing Java For Mac OS X 10.5 Update 2 , MATLAB no longer even launches for me. It is incredibly frustrating.
Will,
Please contact technical support. http://www.mathworks.com/support/contact_us/index.html
Hi Peter,
You said you tried the font fix but you’re seeing characters jumping around. With Monospaced 9 or Courier 9 I get the “jumping” behavior but Andale Mono 9 and Courier New 9 seem to work fine. Have you tried one of those two fonts for the Desktop code font?
- Mark
How on earth do we get a landscape orientation for printing from the editor?
To flesh out the Matlab + Java on Mac performance problem, I think one can summarize the desktop interface as _S_L_O_W_, the graphics rendering as slow with a long pause every 3 seconds or so (for Java “garbage collection”, it turns out). The latter is incredibly frustrating because the only way to get smooth animation is to make a movie! Real-time is impossible. These are obvious problems, and I know that the desktop interface slowness has a bug report number, but I couldn’t find one for the Java garbage collection issue. The desktop GUI is more responsive with 2008b, and FFTs are also twice as fast (for 1024 points), but the graphics pausing is just as bad (for reference, it does *not* happen at all on other OSs).
One workaround for the desktop & editor problem I tried was to revert the JavaVM.framework/Versions folder using TimeMachine to the state prior to “Update 2″. That worked for text editing, but it broke some links making the Matlab updater fail to launch, and some other apps that depend on the JavaVM too. So, I re-applied Apple’s software update and those issues are resolved. I mentioned this because of Will’s problem above.
I am trying to deal with the Java+Matlab mess directly, with no system-based workarounds. In that respect, I did try Andale Mono 9, and it does work for me (I tried a bunch of things that did not work… so thanks for the tip!). I encourage the Mathworks to put a little more effort into their Java implementation on the Mac… this latest GUI snafu with Java Update 2 was a significant annoyance.
- Peter K.
Hi Peter,
Garbage collection is rarely, if ever, a problem with Java UIs. I’m not sure how you came to the conclusion that garbage collection is the culprit, but it seems more likely to me that you’re seeing this bug, for which there is a listed workaround.
The font and size issues you’re seeing with Java for OS X 10.5 Update 2 are unfortunately out of our control. We do try to preemptively test against new versions of Java before they are released, but at the end of the day, we cannot control what Apple releases.
I assure you we have a team that focuses on MATLAB on the Mac and we are working closely with Apple to resolve these issues.
-Ken
Michael,
You should be able to print in landscape by selecting landscape from the Print options (after you click print, not Page Setup) from the Edtior.
-Mike
Is there a way to have MATLAB use Java For Mac OS X 10.5 Update 1 (assuming this is the previous version) and all other apps use Java For Mac OS X 10.5 Update 2?
Tom,
There is no way to run multiple java versions on the mac. We have patches available for the document bar issue and the font issue.
Hi,
having updated java Matlab on my machine seems to launch with all the font/interface changes detailed above but there is no icon in the doc therefore the finder can only select x11 so i cannot input any text into matlab. Matlab is fully functional by clicking old commands, the problem seems to be the finder not setecting the application, any ideas??
Hi Felix,
I don’t fully understand your problem…could you restate it? Do you see the MATLAB Desktop? What do you mean by “the Finder can only select X11″ and “MATLAB is fully functional by clicking old commands”?
-Ken
Hi Ken,
OK so I click the launch MATLAB script, then X11 launches in the dock which is then usually accompanied by the actual matlab icon bouncing in the dock. Post java update there is no actual matlab icon bouncing in the dock next to X11, however, after a minute or so the matlab GUI window appears that can be selected with the cursor, but is still not identified by the finder - it still says X11 in the top left of the menu bar despite clicking around in the Matlab window. Matlab works fine except for the keyboard input which is sent to the X11 window presumably as it goes through the finder which is selecting X11. By double clicking old commands from the “history of commmands box” in the Matlab GUI everything functionally seems to be working how it should (except the font/interface differences mentioned before), the only problem being with keyboard input. Does this make it any clearer as to whats going on?
Felix
Hi Felix,
Thanks for the detailed explanation. At this point, though, I’m going to point you over to tech support, as this is out of my league.
-Ken
Which version of Java does this translate to? For example, I am running java version 1.5.0_16 with no (new) matlab problems and I don’t seem to need a java update according to system update. Thanks
The among the JRE versions covered in the update update Java for Mac OS X 10.5 Update 2 is J2SE 1.5.0_16
Hi Ken,
I have a similar problem as well:
Matlab boots up with X11, but takes much longer than usual. After it finally initializes, I cannot type into the command window since the system diverts all my keyboard input to the X11 window. Matlab only responds to mouse inputs, and never to any keyboard inputs.
Matlab is truly an indispensable tool, and I look forward to having the issue resolved.
Thank you,
Joe
Ken,
In regards to item 1 in this blog that mentions Matlabs abysmal performance on Mac OS. Install Bootcamp and Windows. Boot windows and install Matlab. Run the bench command, I usually run bench(3). Compare that to bench(3) on OS 10.5. Since it’s the same hardware the 2X speed difference has to be related to Matlab and/or the OS. I have asked this question through my sales rep, and he has chosen twice to not respond to my email. What’s up?
Bill
Joe and Felix,
I have the exact same problem, I can’t use the keyboard at all. I hope they can this fix ASAP, my work is on hold.
In the mean time I use a simple text editor to run comments, but this is a very slow workflow…
@Bill,
You’re right that hardware is probably not the limiting factor, but instead the software stack. The graphics stack on the Mac is currently not as optimal as it could be - we have a team working on this issue.
-Ken
@Joe, Felix and vat:
You are the first to encounter this issue, so there is no workaround yet. I will email each of you to get further details on the problem and then connect you with technical support.
-Ken
Two things:
1) a workaround for the Java/Font issue with 2008b; start using the 2009a pre-release. And then choose not to do any Java updates until someone else notices things are OK.
2) performance: run VMware Fusion with Windows XP, install Matlab, get 2X the performance without having to reboot into bootcamp. Yes, 2X performance even with the emulator in the way. Those who would choose not to buy XP might consider Linux. I’d be interested to hear any results.
Will students of the student edition get a patch for these issues as well?
I bought R2008b since my old student version didn’t have the controls toolbox and i’m taking controls this semester.
It’d be a real bummer that i just dropped $100 for MATLAB with a code editor is is effectively impossible to use.
I was losing my mind last night just trying to write a quick 10 line .m file for class since the cursor jumps all over the place.
change “will students of the student version”, to “purchasers of the student version.”
Typing+multitasking= nonsensical sentences
Ian,
We don’t have any new patches beyond the ones listed above, which should work with the student version.
I have the same problem as Joe, Felix and vat. Is there a solution yet?
Hi Josh,
What is the exact problem you’re seeing? What version of MATLAB are you using (type “version” at the MATLAB command prompt)? What version of Java are you using (type “version -java” at the MATLAB command prompt)?
-Ken
Ken,
I just installed a Java update last night, and the problem is gone!
The issue was exactly as Felix described.
My MATLAB version is 7.0.1.24704 (R14) Service Pack 1, and I am now running Java 1.5.0_19, and it’s working fine.
Thanks for your speedy assistance,
Josh.