Why does MATLAB crash when trying to close a Figure window in MATLAB 7.12 (R2011a) on Mac OS X 10.7?

1 view (last 30 days)
I am using MATLAB 7.12 (R2011a) or MATLAB 7.13 (R2011b) on Mac OS X10.7 (Lion) or Mac OS X10.6 (Snow Leopard), with either Java 1.6.0_26 or Java 1.6.0_29 and I see that closing a Figure window with Cmd+W does not always really close the Figure. When I perform the following steps, MATLAB crashes after trying to close the Figure the second time:
- clf
- CMD+~ twice to switch to MATLAB and back to the Figure
- CMD+W to close the Figure window
- CMD+~ right away to reopen the closed Figure
- Now CMD+W does not work and clicking on the red button in the upper left corner,
The crash has also been reported (with the same crash dump) when we try to close the figure by using a mouse click on the red dot.
MATLAB crashes with the following line(s) in the crash log:
ERROR: Stack Trace (from fault):
[snip]
...
[ 9] 0x000000010269b1e0 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00082400 __CFDataInit+001168
[ 10] 0x0000000109949e5c /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit+06930012 -[NSWindow __close]+000287
[ 11] 0x0000000109949d2c /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit+06929708 -[NSWindow _close:]+000146
[ 12] 0x000000010271aa1d /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00604701 -[NSObject performSelector:withObject:]+000061/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00604701 -[NSObject performSelector:withObject:]+000061
...
[snip]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Mar 2023
Edited: MathWorks Support Team on 19 Apr 2023
There is a bug in MATLAB 7.12 (R2011a), MATLAB 7.13 (R2011b), and MATLAB 7.14 (R2012a) on 64-bit Macintosh computers, when quickly switching between a Java window and the MATLAB Desktop.
The stack trace contains the following string:
[NSWindow __close]
The issue exists with the following Java seeds:
Java 1.6.0_26 which is
Apple Java for Mac OS X 10.7
Apple Java for Mac OS X 10.6 Update 5
Apple Java for Mac OS X 10.5 Update 10
and Java 1.6.0_29 which is
Apple Java for Mac OS X 10.7 Update 1
Apple Java for Mac OS X 10.6 Update 6
and Java 1.6.0_33
This issue is resolved by installing Mac OS X 10.8 (Mountain Lion).
MathWorks is currently investigating the underlying cause of the issue with Apple.
As a workaround, the figure window(s) can be closed from the command window:
close(figure_handle);
To improve the functionality, you could create a shortcut button for your MATLAB Desktop to close the current figure by following these steps:
1) Right click on the Shortcuts toolbar and select 'New Shortcut'
2) Name the shortcut 'Close Figure'
3) Paste the following code:
close(gcf);
Please refer to the following bug report on our website if you wish to track the progress of this issue:
Note: In order to be able to view the bug report you will need to log in with your MathWorks account credentials. If you do not have an account with MathWorks you can create one for free here:

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2011b

Community Treasure Hunt

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

Start Hunting!