Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

Crash when 'playing' with Play()/Pause() #5

Closed Ceylo closed 13 years ago

Ceylo commented 13 years ago

Two related crash reports follow:

Process:         prog [2013]
Path:            /Users/ceylo/Development/sfeMovie/sample/./prog
Identifier:      prog
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [1835]

Date/Time:       2011-03-25 00:02:27.876 +0100
OS Version:      Mac OS X 10.6.7 (10J869)
Report Version:  6

Interval Since Last Report:          110456 sec
Crashes Since Last Report:           3
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      D3D26962-099F-477A-B902-88E74F4BCEAF

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread:  6

Thread 0:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib               0x00007fff8445d372 __bsdthread_create + 10
1   libSystem.B.dylib               0x00007fff8445d26a pthread_create + 905
2   libsfml-system.2.0.dylib        0x0000000100d030c1 sf::priv::ThreadImpl::ThreadImpl(sf::Thread*) + 33
3   libsfml-system.2.0.dylib        0x0000000100d02ca7 sf::Thread::Launch() + 71
4   libsfe-movie.dylib              0x000000010001184a sfe::Movie_video::Play() + 210 (Movie_video.cpp:239)
5   libsfe-movie.dylib              0x000000010000e82a sfe::Movie::Play() + 122 (Movie.cpp:117)
6   prog                            0x0000000100001aff main + 747
7   prog                            0x0000000100001664 start + 52

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib               0x00007fff8443d12a kevent + 10
1   libSystem.B.dylib               0x00007fff8443effd _dispatch_mgr_invoke + 154
2   libSystem.B.dylib               0x00007fff8443ecd4 _dispatch_queue_invoke + 185
3   libSystem.B.dylib               0x00007fff8443e7fe _dispatch_worker_thread2 + 252
4   libSystem.B.dylib               0x00007fff8443e128 _pthread_wqthread + 353
5   libSystem.B.dylib               0x00007fff8443dfc5 start_wqthread + 13

Thread 2:
0   libSystem.B.dylib               0x00007fff8442429a mach_msg_trap + 10
1   libSystem.B.dylib               0x00007fff8442490d mach_msg + 59
2   com.apple.opengl                0x00007fff86e15264 glcDebugListener + 313
3   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
4   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 3:
0   libSystem.B.dylib               0x00007fff844242fa semaphore_timedwait_signal_trap + 10
1   libSystem.B.dylib               0x00007fff84462c92 _pthread_cond_wait + 1015
2   com.apple.audio.CoreAudio       0x00007fff88f9367c CAGuard::WaitFor(unsigned long long) + 168
3   com.apple.audio.CoreAudio       0x00007fff88f95c0b CAGuard::WaitUntil(unsigned long long) + 185
4   com.apple.audio.CoreAudio       0x00007fff88f93d75 HP_IOThread::WorkLoop() + 1369
5   com.apple.audio.CoreAudio       0x00007fff88f93817 HP_IOThread::ThreadEntry(HP_IOThread*) + 9
6   com.apple.audio.CoreAudio       0x00007fff88f93745 CAPThread::Entry(CAPThread*) + 125
7   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
8   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 4:
0   libsfe-movie.dylib              0x000000010008de14 av_get_packet + 52
1   ???                             0x8000000000000000 0 + 9223372036854775808

Thread 5:
0   libSystem.B.dylib               0x00007fff8445ef8a __semwait_signal + 10
1   libSystem.B.dylib               0x00007fff8445ee19 nanosleep + 148
2   libSystem.B.dylib               0x00007fff8445ed83 usleep + 57
3   libsfe-movie.dylib              0x0000000100010ca9 sfe::Movie_video::WatchThread() + 27 (Movie_video.cpp:573)
4   libsfe-movie.dylib              0x0000000100013b39 sf::priv::ThreadMemberFunc<sfe::Movie_video>::Run() + 109 (Thread.inl:58)
5   libsfml-system.2.0.dylib        0x0000000100d0304d sf::priv::ThreadImpl::EntryPoint(void*) + 29
6   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
7   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 6 Crashed:
0   libsfe-movie.dylib              0x000000010019d394 decode_nal_units + 1220
1   libsfe-movie.dylib              0x000000010019dcbf decode_frame + 319
2   libsfe-movie.dylib              0x000000010031b44d avcodec_decode_video2 + 157
3   libsfe-movie.dylib              0x0000000100010d7b sfe::Movie_video::DecodeFrontFrame() + 137 (Movie_video.cpp:521)
4   libsfe-movie.dylib              0x00000001000110e1 sfe::Movie_video::LoadNextImage() + 159 (Movie_video.cpp:444)
5   libsfe-movie.dylib              0x000000010001138f sfe::Movie_video::Run() + 645 (Movie_video.cpp:363)
6   libsfe-movie.dylib              0x0000000100013b39 sf::priv::ThreadMemberFunc<sfe::Movie_video>::Run() + 109 (Thread.inl:58)
7   libsfml-system.2.0.dylib        0x0000000100d0304d sf::priv::ThreadImpl::EntryPoint(void*) + 29
8   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
9   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

And:

Process:         prog [1989]
Path:            /Users/ceylo/Development/sfeMovie/sample/./prog
Identifier:      prog
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [1835]

Date/Time:       2011-03-24 23:59:14.952 +0100
OS Version:      Mac OS X 10.6.7 (10J869)
Report Version:  6

Interval Since Last Report:          110265 sec
Crashes Since Last Report:           2
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      D3D26962-099F-477A-B902-88E74F4BCEAF

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000013
Crashed Thread:  6

Thread 0:  Dispatch queue: com.apple.main-thread
0   ....AppleIntelGMAX3100GLDriver  0x0000000112f364b8 glrLoadShrSysTexture + 2600
1   ....AppleIntelGMAX3100GLDriver  0x0000000112f33b88 gldModifyTexSubImage + 280
2   GLEngine                        0x00000001128154f4 glTexSubImage2D_Exec + 902
3   libGL.dylib                     0x00007fff822069b4 glTexSubImage2D + 66
4   libsfml-graphics.2.0.dylib      0x0000000100bbc907 sf::Image::EnsureTextureUpdate() const + 135
5   libsfml-graphics.2.0.dylib      0x0000000100bbc941 sf::Image::Bind() const + 17
6   libsfml-graphics.2.0.dylib      0x0000000100bde6ff sf::Renderer::SetTexture(sf::Image const*) + 47
7   libsfml-graphics.2.0.dylib      0x0000000100be3ffe sf::Sprite::Render(sf::RenderTarget&, sf::Renderer&) const + 206
8   libsfml-graphics.2.0.dylib      0x0000000100bdfd1d sf::RenderTarget::Draw(sf::Drawable const&) + 93
9   libsfe-movie.dylib              0x000000010001144b sfe::Movie_video::Render(sf::RenderTarget&) const + 57 (Movie_video.cpp:332)
10  libsfe-movie.dylib              0x000000010000e165 sfe::Movie::Render(sf::RenderTarget&, sf::Renderer&) const + 61 (Movie.cpp:306)
11  libsfml-graphics.2.0.dylib      0x0000000100bdfd1d sf::RenderTarget::Draw(sf::Drawable const&) + 93
12  prog                            0x0000000100001c20 main + 1036
13  prog                            0x0000000100001664 start + 52

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib               0x00007fff8443d12a kevent + 10
1   libSystem.B.dylib               0x00007fff8443effd _dispatch_mgr_invoke + 154
2   libSystem.B.dylib               0x00007fff8443ecd4 _dispatch_queue_invoke + 185
3   libSystem.B.dylib               0x00007fff8443e7fe _dispatch_worker_thread2 + 252
4   libSystem.B.dylib               0x00007fff8443e128 _pthread_wqthread + 353
5   libSystem.B.dylib               0x00007fff8443dfc5 start_wqthread + 13

Thread 2:
0   libSystem.B.dylib               0x00007fff8442429a mach_msg_trap + 10
1   libSystem.B.dylib               0x00007fff8442490d mach_msg + 59
2   com.apple.opengl                0x00007fff86e15264 glcDebugListener + 313
3   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
4   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 3:
0   libSystem.B.dylib               0x00007fff844242fa semaphore_timedwait_signal_trap + 10
1   libSystem.B.dylib               0x00007fff84462c92 _pthread_cond_wait + 1015
2   com.apple.audio.CoreAudio       0x00007fff88f9367c CAGuard::WaitFor(unsigned long long) + 168
3   com.apple.audio.CoreAudio       0x00007fff88f95c0b CAGuard::WaitUntil(unsigned long long) + 185
4   com.apple.audio.CoreAudio       0x00007fff88f93d75 HP_IOThread::WorkLoop() + 1369
5   com.apple.audio.CoreAudio       0x00007fff88f93817 HP_IOThread::ThreadEntry(HP_IOThread*) + 9
6   com.apple.audio.CoreAudio       0x00007fff88f93745 CAPThread::Entry(CAPThread*) + 125
7   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
8   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 4:
0   libSystem.B.dylib               0x00007fff8445ef8a __semwait_signal + 10
1   libSystem.B.dylib               0x00007fff8445ee19 nanosleep + 148
2   libSystem.B.dylib               0x00007fff8445ed83 usleep + 57
3   libsfml-audio.2.0.0.dylib       0x0000000100d1454b sf::SoundStream::Stream() + 363
4   libsfml-system.2.0.dylib        0x0000000100d0304d sf::priv::ThreadImpl::EntryPoint(void*) + 29
5   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
6   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 5:
0   libSystem.B.dylib               0x00007fff8445ef8a __semwait_signal + 10
1   libSystem.B.dylib               0x00007fff8445ee19 nanosleep + 148
2   libSystem.B.dylib               0x00007fff8445ed83 usleep + 57
3   libsfe-movie.dylib              0x0000000100010ca9 sfe::Movie_video::WatchThread() + 27 (Movie_video.cpp:573)
4   libsfe-movie.dylib              0x0000000100013b39 sf::priv::ThreadMemberFunc<sfe::Movie_video>::Run() + 109 (Thread.inl:58)
5   libsfml-system.2.0.dylib        0x0000000100d0304d sf::priv::ThreadImpl::EntryPoint(void*) + 29
6   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
7   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 6 Crashed:
0   libsfe-movie.dylib              0x000000010019db97 decode_frame + 23
1   libsfe-movie.dylib              0x000000010031b44d avcodec_decode_video2 + 157
2   libsfe-movie.dylib              0x0000000100010d7b sfe::Movie_video::DecodeFrontFrame() + 137 (Movie_video.cpp:521)
3   libsfe-movie.dylib              0x00000001000110ec sfe::Movie_video::LoadNextImage() + 170 (Movie_video.cpp:450)
4   libsfe-movie.dylib              0x000000010001138f sfe::Movie_video::Run() + 645 (Movie_video.cpp:363)
5   libsfe-movie.dylib              0x0000000100013b39 sf::priv::ThreadMemberFunc<sfe::Movie_video>::Run() + 109 (Thread.inl:58)
6   libsfml-system.2.0.dylib        0x0000000100d0304d sf::priv::ThreadImpl::EntryPoint(void*) + 29
7   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
8   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 6 crashed with X86 Thread State (64-bit):
  rax: 0x00000001005a1100  rbx: 0x00000001022c4a00  rcx: 0x0000000000000003  rdx: 0x0000000122a09e5c
  rdi: 0x00000001022c4a00  rsi: 0x000000010135d3a0  rbp: 0x00000001022c4a00  rsp: 0x0000000122a09da0
   r8: 0x0000000000000368   r9: 0x0000000122a09e40  r10: 0x00007fffffe00050  r11: 0x0000000000005362
  r12: 0x0000000000000000  r13: 0x0000000122a09e5c  r14: 0x000000010135d3a0  r15: 0x00000001012252b0
  rip: 0x000000010019db97  rfl: 0x0000000000010206  cr2: 0x0000000000000013
Ceylo commented 13 years ago

Maybe related:

Process:         a.out [1653]
Path:            /Users/ceylo/Development/sfeMovie/sample/./a.out
Identifier:      a.out
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [1527]

Date/Time:       2011-04-13 16:33:38.068 +0200
OS Version:      Mac OS X 10.6.7 (10J869)
Report Version:  6

Interval Since Last Report:          342372 sec
Crashes Since Last Report:           1
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      D3D26962-099F-477A-B902-88E74F4BCEAF

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
Crashed Thread:  4

Thread 0:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib               0x00007fff8445d372 __bsdthread_create + 10
1   libSystem.B.dylib               0x00007fff8445d26a pthread_create + 905
2   libsfml-system.2.0.dylib        0x000000010015e941 sf::priv::ThreadImpl::ThreadImpl(sf::Thread*) + 33
3   libsfml-system.2.0.dylib        0x000000010015e5e7 sf::Thread::Launch() + 71
4   libsfe-movie.dylib              0x000000010016d84a sfe::Movie_video::Play() + 210
5   libsfe-movie.dylib              0x000000010016a82a sfe::Movie::Play() + 122
6   a.out                           0x0000000100001a92 main + 782
7   a.out                           0x00000001000015d4 start + 52

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib               0x00007fff8443d12a kevent + 10
1   libSystem.B.dylib               0x00007fff8443effd _dispatch_mgr_invoke + 154
2   libSystem.B.dylib               0x00007fff8443ecd4 _dispatch_queue_invoke + 185
3   libSystem.B.dylib               0x00007fff8443e7fe _dispatch_worker_thread2 + 252
4   libSystem.B.dylib               0x00007fff8443e128 _pthread_wqthread + 353
5   libSystem.B.dylib               0x00007fff8443dfc5 start_wqthread + 13

Thread 2:
0   libSystem.B.dylib               0x00007fff8442429a mach_msg_trap + 10
1   libSystem.B.dylib               0x00007fff8442490d mach_msg + 59
2   com.apple.opengl                0x00007fff86e15264 glcDebugListener + 313
3   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
4   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 3:
0   libSystem.B.dylib               0x00007fff844242fa semaphore_timedwait_signal_trap + 10
1   libSystem.B.dylib               0x00007fff84462c92 _pthread_cond_wait + 1015
2   com.apple.audio.CoreAudio       0x00007fff88f9367c CAGuard::WaitFor(unsigned long long) + 168
3   com.apple.audio.CoreAudio       0x00007fff88f95c0b CAGuard::WaitUntil(unsigned long long) + 185
4   com.apple.audio.CoreAudio       0x00007fff88f93d75 HP_IOThread::WorkLoop() + 1369
5   com.apple.audio.CoreAudio       0x00007fff88f93817 HP_IOThread::ThreadEntry(HP_IOThread*) + 9
6   com.apple.audio.CoreAudio       0x00007fff88f93745 CAPThread::Entry(CAPThread*) + 125
7   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
8   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 4 Crashed:
0   libsfe-movie.dylib              0x00000001001eca76 av_read_packet + 230
1   libsfe-movie.dylib              0x00000001001ede5a av_read_frame_internal + 170
2   libsfe-movie.dylib              0x000000010016b643 sfe::Movie_audio::LoadFrame() + 115
3   libsfe-movie.dylib              0x000000010016b999 sfe::Movie_audio::OnGetData(sf::SoundStream::Chunk&) + 45
4   libsfml-audio.2.0.0.dylib       0x0000000100da01a8 sf::SoundStream::FillAndPushBuffer(unsigned int) + 56
5   libsfml-audio.2.0.0.dylib       0x0000000100da06cf sf::SoundStream::Stream() + 63
6   libsfml-system.2.0.dylib        0x000000010015e8cd sf::priv::ThreadImpl::EntryPoint(void*) + 29
7   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
8   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 5:
0   libSystem.B.dylib               0x00007fff8445ef8a __semwait_signal + 10
1   libSystem.B.dylib               0x00007fff8445ee19 nanosleep + 148
2   libSystem.B.dylib               0x00007fff8445ed83 usleep + 57
3   libsfe-movie.dylib              0x000000010016cca9 sfe::Movie_video::WatchThread() + 27
4   libsfe-movie.dylib              0x000000010016fb39 sf::priv::ThreadMemberFunc<sfe::Movie_video>::Run() + 109
5   libsfml-system.2.0.dylib        0x000000010015e8cd sf::priv::ThreadImpl::EntryPoint(void*) + 29
6   libSystem.B.dylib               0x00007fff8445d4f6 _pthread_start + 331
7   libSystem.B.dylib               0x00007fff8445d3a9 thread_start + 13

Thread 6:
0   libSystem.B.dylib               0x00007fffffe00eed __memcpy + 1869
1   libsfe-movie.dylib              0x000000010017f991 get_buffer + 49
2   ???                             0x0000000000008000 0 + 32768