Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash when adding/removing movie



try disposing the Movie AND its MovieController (first dispose the
MovieController!)

> I am wondering if there is a specific teardown sequence I need to do
> when closing/removing a movie to avoid this crash.  I am also wondering
> if putting the QTComponent's AWT representation inside a Swing
> component could be to blame, although I've read it's ok to do that. Or
> is it just trouble with JSplitPane.
>
> 1.4.2 on 10.3.8, building with XCode.
>
> When I open a new movie, I do this:
>
> movie.setRate(0); // stop movie
> removeAll(); // remove this movie from the JPanel
>
> String theURL = new String("file://" + fileName);
> // create the DataRef that contains the information about where the
> movie is
> DataRef urlMovie = new DataRef(theURL);
>
> movie = Movie.fromDataRef(urlMovie, StdQTConstants.newMovieActive);
> mc = new MovieController (movie);
> mc.setKeysEnabled (true);
> myQTComponent = QTFactory.makeQTComponent(mc);
> add(getVisualComponent());
>
> GridBagConstraints mGridConstraints = new GridBagConstraints();
> mGridConstraints.fill = GridBagConstraints.BOTH;
> mGridConstraints.weightx = mGridConstraints.weighty = 1.0;
> mGridConstraints.insets = new Insets(0, 0, 5, 5);
> mGridBag.setConstraints(getVisualComponent(), mGridConstraints);
>
>
> I could not seem to repro this problem if I use QTJComponent, but then
> I don't get a movie controller, which I need to have.
>
> Crash log:
>
> Exception:  EXC_BAD_ACCESS (0x0001)
> Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> Thread 0 Crashed:
> 0   libjvm.dylib                   0x94c2cb44 JVM_MonitorNotify +
> 0x1994
> 1   <<00000000>> 0x03f2a16c 0 + 0x3f2a16c
> 2   libjvm.dylib                   0x94c39ff8
> JVM_GetCPMethodClassNameUTF + 0xb38
> 3   libjvm.dylib                   0x94c5b448 JVM_GetCPClassNameUTF +
> 0x998
> 4   libjvm.dylib                   0x94c8b314 JVM_GetClassNameUTF +
> 0x24a4
> 5   libjvm.dylib                   0x94c8ff90 JVM_GetClassNameUTF +
> 0x7120
> 6   libjvm.dylib                   0x94cb61dc
> JVM_GetClassDeclaredConstructors + 0x542c
> 7   libjvm.dylib                   0x94caf344
> JVM_GetInheritedAccessControlContext + 0x3bc4
> 8   libjvm.dylib                   0x94d7ebd4 JVM_UnloadLibrary +
> 0x3e2b4
> 9   libjvm.dylib                   0x94cee478 JVM_GetLastErrorString +
> 0x14a8
> 10  libjvm.dylib                   0x94e2a2dc jio_vsnprintf + 0x19fdc
> 11  libCocoaInterface.jnilib       0x0941430c IdlerIdleApplierFunction
> + 0xf80
> 12  libCocoaInterface.jnilib       0x094159e8 IdlerIdleApplierFunction
> + 0x265c
> 13  com.apple.AppKit               0x92dc7c2c -[NSView
> _drawRect:clip:] + 0x770
> 14  com.apple.AppKit               0x92dd8670 -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 0xe8
> 15  com.apple.AppKit               0x92e0e3d0 _recursiveDisplayInRect2
> + 0x54
> 16  com.apple.CoreFoundation       0x9019f18c CFArrayApplyFunction +
> 0x198
> 17  com.apple.AppKit               0x92dd8774 -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 0x1ec
> 18  com.apple.AppKit               0x92dc3f44 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
> rectIsVisibleRectForView:topView:] + 0x9c
> 19  com.apple.AppKit               0x92dc4360 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
> rectIsVisibleRectForView:topView:] + 0x4b8
> 20  com.apple.AppKit               0x92dc4360 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
> rectIsVisibleRectForView:topView:] + 0x4b8
> 21  com.apple.AppKit               0x92e10ef0 -[NSFrameView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
> rectIsVisibleRectForView:topView:] + 0x124
> 22  com.apple.AppKit               0x92df808c -[NSThemeFrame
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:
> rectIsVisibleRectForView:topView:] + 0xc0
> 23  com.apple.AppKit               0x92dd5244 -[NSView
> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] +
> 0x180
> 24  com.apple.AppKit               0x92dee274 -[NSView
> displayIfNeeded] + 0xa8
> 25  com.apple.AppKit               0x92dfef4c -[NSWindow
> displayIfNeeded] + 0xb4
> 26  com.apple.AppKit               0x92ddf5ac
> _handleWindowNeedsDisplay + 0xe0
> 27  com.apple.CoreFoundation       0x90191ca0 __CFRunLoopDoObservers +
> 0x194
> 28  com.apple.CoreFoundation       0x9019153c __CFRunLoopRun + 0x18c
>
>
> Thanks much in advance!
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> QuickTime-java mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quicktime-java/email@hidden
>
> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden

References: 
 >Crash when adding/removing movie (From: Jim Leno <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.