Closed kronick closed 10 years ago
Does this happen when you don't have texture only turned on?
I've seen some stability problems win the texture only mode. I'll investigate this!
On Wed, Mar 6, 2013 at 3:18 PM, kronick notifications@github.com wrote:
The following code causes a deadlock on the "delete" call (calling player->close() causes the same problem) while clearing a large video file (I'm using one that's ~2GB):
ofQTKitPlayer *player new ofQTKitPlayer();player->loadMovie("a_large_video.mov", OF_QTKIT_DECODE_TEXTURE_ONLY); delete player;}
It seems to work fine when using OF_QTKIT_DECODE_PIXELS_AND_TEXTURE.
Stack trace is below. The last non-assembly bits are in [QTKitMovieRenderer dealloc]. This is on a iMac i7 OSX 10.8.2.
When #0 0x996e091a in __psynch_mutexwait ()
1 https://github.com/openframeworks/openFrameworks/issues/1 0x93b7c13b
in pthread_mutex_lock ()
2 https://github.com/openframeworks/openFrameworks/issues/2 0x9a34e9ec
in QTMLGrabMutex ()
3 https://github.com/openframeworks/openFrameworks/issues/3 0x9a38f51d
in QTVisualGraphGrabConfiguringMutex ()
4 https://github.com/openframeworks/openFrameworks/issues/4 0x9858e31b
in ___lldb_unnamed_function22307$$QuickTimeComponents ()
5 https://github.com/openframeworks/openFrameworks/issues/5 0x955c091f
in callComponentStorage_444 ()
6 https://github.com/openframeworks/openFrameworks/issues/6 0x955b1abf
in CallComponentFunctionCommonWithStorage(char, ComponentParameters, long ()(), unsigned long) ()
7 https://github.com/openframeworks/openFrameworks/issues/7 0x955b1aff
in CallComponentFunctionWithStorageProcInfo ()
8 https://github.com/openframeworks/openFrameworks/issues/8 0x9858ddf6
in BaseVC_ComponentDispatch ()
9 https://github.com/openframeworks/openFrameworks/issues/9 0x9552baee
in CallComponent ()
10 https://github.com/openframeworks/openFrameworks/issues/100x9552bb65 in DelegateComponentCall ()
11 https://github.com/openframeworks/openFrameworks/issues/110x9858e592 in OpenGLTVC_ComponentDispatch ()
12 https://github.com/openframeworks/openFrameworks/issues/120x9552baee in CallComponent ()
13 https://github.com/openframeworks/openFrameworks/issues/130x9552bb48 in CallComponentDispatch ()
14 https://github.com/openframeworks/openFrameworks/issues/140x9a38f755 in QTVCSetImageAvailableCallback ()
15 https://github.com/openframeworks/openFrameworks/issues/150x9a38f716 in QTVisualContextSetImageAvailableCallback ()
16 https://github.com/openframeworks/openFrameworks/issues/160x00262a6b in -[QTKitMovieRenderer dealloc] at
/path/to/project/openframeworks/libs/openFrameworksCompiled/project/osx/../../../openFrameworks/video/ofQTKitMovieRenderer.m:201
17 https://github.com/openframeworks/openFrameworks/issues/170x99cf28ff in -NSObject
release
18 https://github.com/openframeworks/openFrameworks/issues/180x00260edc in ofQTKitPlayer::close() at
/path/to/project/openframeworks/libs/openFrameworksCompiled/project/osx/../../../openFrameworks/video/ofQTKitPlayer.mm:102
19 https://github.com/openframeworks/openFrameworks/issues/190x002604b1 in ofQTKitPlayer::~ofQTKitPlayer() at
/path/to/project/openframeworks/libs/openFrameworksCompiled/project/osx/../../../openFrameworks/video/ofQTKitPlayer.mm:22
20 https://github.com/openframeworks/openFrameworks/issues/200x00260421 in ofQTKitPlayer::~ofQTKitPlayer() at
/path/to/project/openframeworks/libs/openFrameworksCompiled/project/osx/../../../openFrameworks/video/ofQTKitPlayer.mm:21
— Reply to this email directly or view it on GitHubhttps://github.com/openframeworks/openFrameworks/issues/1916 .
No, as I noted:
player->loadMovie("a_large_video.mov", OF_QTKIT_DECODE_PIXELS_AND_TEXTURE);
delete player;
Seems to work fine.
yes
this works:
//-------------------------------------------------------------- void testApp::update(){
player.close();
player.loadMovie("film.mov", OF_QTKIT_DECODE_PIXELS_AND_TEXTURE);
player.play();
player.update();
counter++;
}
and this gives you a beach ball (after prox count 30 on my powerbook, depends on memory?)
//-------------------------------------------------------------- void testApp::update(){
player.close();
player.loadMovie("film.mov", OF_QTKIT_DECODE_TEXTURE_ONLY);
player.play();
player.update();
counter++;
}
greetings ascorbin
There is a thread safety issue around texture only it seems
On Wed, Mar 6, 2013 at 4:20 PM, Owi Mahn notifications@github.com wrote:
yes
this works:
//-------------------------------------------------------------- void testApp::update(){
player.close(); player.loadMovie("film.mov", OF_QTKIT_DECODE_PIXELS_AND_TEXTURE); player.play(); player.update(); counter++;
}
and this gives you a beach ball (after prox count 30 on my powerbook, depends on memory?)
//-------------------------------------------------------------- void testApp::update(){
player.close(); player.loadMovie("film.mov", OF_QTKIT_DECODE_TEXTURE_ONLY); player.play(); player.update(); counter++;
}
greetings ascorbin
— Reply to this email directly or view it on GitHubhttps://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-14526831 .
ah, I think I am seeing related behavior - I've seen that CallComponent method in quite a few thread crashes. While I am not closing nor deleting the ofVideoPlayer, I am resetting and looping many times over. It randomly hangs on a frame - it doesn't advance and I can't tell why. If I drill down in the debugger into ofQTKitPlayer, I hit QTMovieRenderer.m's update and it doesn't think the frame is new.
Is there a workaround? I am by default using OF_QTKIT_DECODE_PIXELS_ONLY - looks like I should try using both pixels/texture?
thanks! Cindy
openframeworks 7.4, osx10.8.5
Hey Cindy,
There is definitely a bug with getting frames in loops with the current video player. It can sometimes be due to certain codecs, and larger videos often have problems --
Are you doing frame by frame processing in a loop to get direct pixel access? or are you playing the video back? If you're just looking for playback the AVFoundation alternative is shaping up nicely: https://github.com/obviousjim/ofxAVFVideoPlayer but is not yet ready to do any type of synchronous operations.
Otherwise with 10.6 SDK http://forum.openframeworks.cc/t/xcode-4-5-not-supporting-10-6-sdk/10343you can revert to the older Quicktime based video which is pretty solid.
Hope this helps!
On Mon, Jan 13, 2014 at 11:10 PM, cindy b notifications@github.com wrote:
ah, I think I am seeing related behavior - I've seen that CallComponent method in quite a few thread crashes. While I am not closing nor deleting the ofVideoPlayer, I am resetting and looping many times over. It randomly hangs on a frame - it doesn't advance and I can't tell why. If I drill down in the debugger into ofQTKitPlayer, I hit QTMovieRenderer.m's update and it doesn't think the frame is new.
Is there a workaround? I am by default using OF_QTKIT_DECODE_PIXELS_ONLY - looks like I should try using both pixels/texture?
thanks! Cindy
openframeworks 7.4, osx10.8.5
— Reply to this email directly or view it on GitHubhttps://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32237402 .
hi Jim-
I am using xcode 4.6.3 and oF 7.4 on osx 10.8.5
I am not doing pixel operations - just playback.. Using OpenNI to watch my hand move back and forth across the screen.
I have two videos - an attract loop that loops and the symphony video that I increase/descrease speed of playback. My hand "conduct" the movie- to go faster or slower. also using ofMaxim for the sound.
do you think I should try using the AVFoundation, or just point my Base SDK at 10.6?
thank you for the quick reply! - this is in production at the Boston Children's Museum so I need it to be fairly stable.
thanks!!! CIndy
From: James George notifications@github.com To: openframeworks/openFrameworks openFrameworks@noreply.github.com Cc: cindy b cindyloo_home@yahoo.com Sent: Tuesday, January 14, 2014 12:02 AM Subject: Re: [openFrameworks] ofQTKitPlayer deadlock on delete (#1916)
Hey Cindy,
There is definitely a bug with getting frames in loops with the current video player. It can sometimes be due to certain codecs, and larger videos often have problems --
Are you doing frame by frame processing in a loop to get direct pixel access? or are you playing the video back? If you're just looking for playback the AVFoundation alternative is shaping up nicely: https://github.com/obviousjim/ofxAVFVideoPlayer but is not yet ready to do any type of synchronous operations.
Otherwise with 10.6 SDK http://forum.openframeworks.cc/t/xcode-4-5-not-supporting-10-6-sdk/10343you can revert to the older Quicktime based video which is pretty solid.
Hope this helps!
On Mon, Jan 13, 2014 at 11:10 PM, cindy b notifications@github.com wrote:
ah, I think I am seeing related behavior - I've seen that CallComponent method in quite a few thread crashes. While I am not closing nor deleting the ofVideoPlayer, I am resetting and looping many times over. It randomly hangs on a frame - it doesn't advance and I can't tell why. If I drill down in the debugger into ofQTKitPlayer, I hit QTMovieRenderer.m's update and it doesn't think the frame is new.
Is there a workaround? I am by default using OF_QTKIT_DECODE_PIXELS_ONLY - looks like I should try using both pixels/texture?
thanks! Cindy
openframeworks 7.4, osx10.8.5
— Reply to this email directly or view it on GitHubhttps://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32237402 .
I also get this problem a lot (using xcode 0.74 and xcode 5.02)
As we use a lot of synchronous operations I'm unable to use the AV Foundation code and as I'm using the HAP addon (which is based on ofQTKitPlayer I can't use the old 10.6 method. Does anyone know of a way to avoid to crash on exit with an appropriately placed try/catch statement or the like?
Cheers James
On 14/01/2014 2:35 pm, cindy b wrote:
hi Jim-
I am using xcode 4.6.3 and oF 7.4 on osx 10.8.5
I am not doing pixel operations - just playback.. Using OpenNI to watch my hand move back and forth across the screen.
I have two videos - an attract loop that loops and the symphony video that I increase/descrease speed of playback. My hand "conduct" the movie- to go faster or slower. also using ofMaxim for the sound.
do you think I should try using the AVFoundation, or just point my Base SDK at 10.6?
thank you for the quick reply! - this is in production at the Boston Children's Museum so I need it to be fairly stable.
thanks!!! CIndy
From: James George notifications@github.com To: openframeworks/openFrameworks openFrameworks@noreply.github.com Cc: cindy b cindyloo_home@yahoo.com Sent: Tuesday, January 14, 2014 12:02 AM Subject: Re: [openFrameworks] ofQTKitPlayer deadlock on delete (#1916)
Hey Cindy,
There is definitely a bug with getting frames in loops with the current video player. It can sometimes be due to certain codecs, and larger videos often have problems --
Are you doing frame by frame processing in a loop to get direct pixel access? or are you playing the video back? If you're just looking for playback the AVFoundation alternative is shaping up nicely: https://github.com/obviousjim/ofxAVFVideoPlayer but is not yet ready to do any type of synchronous operations.
Otherwise with 10.6 SDK http://forum.openframeworks.cc/t/xcode-4-5-not-supporting-10-6-sdk/10343you
can revert to the older Quicktime based video which is pretty solid.
Hope this helps!
On Mon, Jan 13, 2014 at 11:10 PM, cindy b notifications@github.com wrote:
ah, I think I am seeing related behavior - I've seen that CallComponent method in quite a few thread crashes. While I am not closing nor deleting the ofVideoPlayer, I am resetting and looping many times over. It randomly hangs on a frame - it doesn't advance and I can't tell why. If I drill down in the debugger into ofQTKitPlayer, I hit QTMovieRenderer.m's update and it doesn't think the frame is new.
Is there a workaround? I am by default using OF_QTKIT_DECODE_PIXELS_ONLY - looks like I should try using both pixels/texture?
thanks! Cindy
openframeworks 7.4, osx10.8.5
— Reply to this email directly or view it on GitHubhttps://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32237402
.
- James — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32268979.
One thing you folks could try out would be using the current version of OF and see if this issue persists.
I can't as I'm using ofx fenster which doesn't work under 0.8 on osx (and windows).....just waiting for multi windows to be added into the core and I'll move away from ofxFenster. I thought multi windowing was going to be added in to 0.8.1 but I havn't seen anything about this lately - is this still the case?
Guess I should be able to use just the ofQTKitPlayer class from 0.8 under 0.74 though and see if that fixes things - is there any easy way with git to check the last commit/tag a file was changed?
On 14/01/2014 3:44 pm, Christoph Buchner wrote:
One thing you folks could try out would be using the current version of OF and see if this issue persists.
— Reply to this email directly or view it on GitHub https://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32275515.
No idea if that will work correctly, but you can browse the "history" view of any file on github by clicking the appropriate button. in this case: https://github.com/openframeworks/openFrameworks/commits/4e25bc677ae05b303497929cb1aa66adc7010a5b/libs/openFrameworks/video/ofQTKitPlayer.mm
Couldn't find any changes that look like they fixed this but I converted my code to use OF 0.8 (on windows with codeblocks) anyway and the issue still occurs.....same with current github repo
I'll try and get a test case happening
On 14/01/2014 7:00 pm, Christoph Buchner wrote:
No idea if that will work correctly, but you can browse the "history" view of any file on github by clicking the appropriate buttron. in this case: https://github.com/openframeworks/openFrameworks/commits/4e25bc677ae05b303497929cb1aa66adc7010a5b/libs/openFrameworks/video/ofQTKitPlayer.mm
— Reply to this email directly or view it on GitHub https://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32295348.
I updated to 0.8 also and it still hangs over time with large videos FYI.
Sent from my iPhone
On Jan 15, 2014, at 9:29 AM, sheridanis notifications@github.com wrote:
Couldn't find any changes that look like they fixed this but I converted my code to use OF 0.8 (on windows with codeblocks) anyway and the issue still occurs.....same with current github repo
I'll try and get a test case happening
On 14/01/2014 7:00 pm, Christoph Buchner wrote:
No idea if that will work correctly, but you can browse the "history" view of any file on github by clicking the appropriate buttron. in this case: https://github.com/openframeworks/openFrameworks/commits/4e25bc677ae05b303497929cb1aa66adc7010a5b/libs/openFrameworks/video/ofQTKitPlayer.mm
— Reply to this email directly or view it on GitHub https://github.com/openframeworks/openFrameworks/issues/1916#issuecomment-32295348.
— Reply to this email directly or view it on GitHub.
I'm seeing this simply by trying to play, stop, close and play different videos with ofVideoPlayer. It seems this line is deadlocking:
Edit: Switching open frameworks to build under OSX SDK 10.6 & the problem seems to have gone away...
Because QTKit and QuickTime are deprecated by Apple as of 10.9, we are focusing on AVF. Follow #2283 for developments. Remaining QTKit and QuickTime-specific issues will be closed with wont-fix
, but bugfix PRs will be accepted.
The following code causes a deadlock on the "delete" call (calling player->close() causes the same problem) while clearing a large video file (I'm using one that's ~2GB):
It seems to work fine when using OF_QTKIT_DECODE_PIXELS_AND_TEXTURE.
Stack trace is below. The last non-assembly bits are in [QTKitMovieRenderer dealloc]. This is on a iMac i7 OSX 10.8.2.