HaikuArchives / BeAE

Well featured audio editor for Haiku
Other
7 stars 8 forks source link

Loading audio file causes crash #28

Open Vidrep opened 6 years ago

Vidrep commented 6 years ago
Debug information for team /boot/home/HaikuArchives/BeAE/BeAE/BeAE (3468):
CPU(s): 4x Intel Core™ i5-3570
Memory: 7.95 GiB total, 591.30 MiB used
Haiku revision: hrev51795 Feb 11 2018 02:19:51 (x86_64)

Active Threads:
    thread 3473: w>Loading file ... 
    thread 3475: w>Preferences 
    thread 3476: _BMediaRoster_ 
    thread 3477: BeAE control 
    thread 3479: w>Load a soundfile... 
    thread 3482: w>Save soundfile... 
    thread 3484: w>BeAE - audio.mp3?utm_source=P 
    thread 3590: media extractor thread 
    thread 3591: team 3468 debug task 
    thread 3468: BeAE (main)
        state: Exception (Segment violation)

        Frame       IP          Function Name
        -----------------------------------------------
        0x7fff4f949490  0x17da6955fb9   memset + 0x111 
            Disassembly:
                memset:
                0x0000017da6955ea8:           4989f8  mov %rdi, %r8
                0x0000017da6955eab:         4883fa1f  cmp $0x1f, %rdx
                0x0000017da6955eaf:             775d  ja 0xa6955f0e
                0x0000017da6955eb1:         4883fa07  cmp $0x7, %rdx
                0x0000017da6955eb5:             7710  ja 0xa6955ec7
                0x0000017da6955eb7:         488d0c17  lea (%rdi,%rdx), %rcx
                0x0000017da6955ebb:           4889f8  mov %rdi, %rax
                0x0000017da6955ebe:           4885d2  test %rdx, %rdx
                0x0000017da6955ec1:             753c  jnz 0xa6955eff
                0x0000017da6955ec3:           4c89c0  mov %r8, %rax
                0x0000017da6955ec6:               c3  ret 
                0x0000017da6955ec7:         400fb6f6  movzx %sil, %esi
                0x0000017da6955ecb: 48b8010101010101  mov $0x101010101010101, %rax
                0x0000017da6955ed5:         480faff0  imul %rax, %rsi
                0x0000017da6955ed9:         4883ea08  sub $0x8, %rdx
                0x0000017da6955edd:         488d0c17  lea (%rdi,%rdx), %rcx
                0x0000017da6955ee1:         48c1ea03  shr $0x3, %rdx
                0x0000017da6955ee5:       488d54d708  lea 0x8(%rdi,%rdx,8), %rdx
                0x0000017da6955eea:           4889f8  mov %rdi, %rax
                0x0000017da6955eed:         4883c008  add $0x8, %rax
                0x0000017da6955ef1:         488970f8  mov %rsi, -0x8(%rax)
                0x0000017da6955ef5:           4839d0  cmp %rdx, %rax
                0x0000017da6955ef8:             75f3  jnz 0xa6955eed
                0x0000017da6955efa:           488931  mov %rsi, (%rcx)
                0x0000017da6955efd:             ebc4  jmp 0x17da6955ec3
                0x0000017da6955eff:         4883c001  add $0x1, %rax
                0x0000017da6955f03:         408870ff  mov %sil, -0x1(%rax)
                0x0000017da6955f07:           4839c8  cmp %rcx, %rax
                0x0000017da6955f0a:             75f3  jnz 0xa6955eff
                0x0000017da6955f0c:             ebb5  jmp 0x17da6955ec3
                0x0000017da6955f0e:   4881faff070000  cmp $0x7ff, %rdx
                0x0000017da6955f15:     0f8799000000  ja 0x17da6955fb4
                0x0000017da6955f1b:               55  push %rbp
                0x0000017da6955f1c:           4889e5  mov %rsp, %rbp
                0x0000017da6955f1f:           8975fc  mov %esi, -0x4(%rbp)
                0x0000017da6955f22:       660f6e45fc  movd -0x4(%rbp), %xmm0
                0x0000017da6955f27:         660f60c0  punpcklbw %xmm0, %xmm0
                0x0000017da6955f2b:         660f61c0  punpcklwd %xmm0, %xmm0
                0x0000017da6955f2f:       660f70c000  pshufd $0x0, %xmm0, %xmm0
                0x0000017da6955f34:         660f6fc8  movdqa %xmm0, %xmm1
                0x0000017da6955f38:       488d7c17f0  lea -0x10(%rdi,%rdx), %rdi
                0x0000017da6955f3d:           4c89c0  mov %r8, %rax
                0x0000017da6955f40:           83e00f  and $0xf, %eax
                0x0000017da6955f43:             7412  jz 0xa6955f57
                0x0000017da6955f45:       b910000000  mov $0x10, %ecx
                0x0000017da6955f4a:           4829c1  sub %rax, %rcx
                0x0000017da6955f4d:           4889c8  mov %rcx, %rax
                0x0000017da6955f50:           4829ca  sub %rcx, %rdx
                0x0000017da6955f53:         410f1100  movups %xmm0, (%r8)
                0x0000017da6955f57:           4c01c0  add %r8, %rax
                0x0000017da6955f5a:         4883fa3f  cmp $0x3f, %rdx
                0x0000017da6955f5e:             770b  ja 0xa6955f6b
                0x0000017da6955f60:           4889c6  mov %rax, %rsi
                0x0000017da6955f63:         4883fa0f  cmp $0xf, %rdx
                0x0000017da6955f67:             772c  ja 0xa6955f95
                0x0000017da6955f69:             eb44  jmp 0x17da6955faf
                0x0000017da6955f6b:         488d4ac0  lea -0x40(%rdx), %rcx
                0x0000017da6955f6f:         4883e1c0  and $0xffffffffffffffc0, %rcx
                0x0000017da6955f73:       488d740840  lea 0x40(%rax,%rcx), %rsi
                0x0000017da6955f78:           0f2900  movaps %xmm0, (%rax)
                0x0000017da6955f7b:         0f294010  movaps %xmm0, 0x10(%rax)
                0x0000017da6955f7f:         0f294020  movaps %xmm0, 0x20(%rax)
                0x0000017da6955f83:         4883c040  add $0x40, %rax
                0x0000017da6955f87:         0f2940f0  movaps %xmm0, -0x10(%rax)
                0x0000017da6955f8b:           4839c6  cmp %rax, %rsi
                0x0000017da6955f8e:             75e8  jnz 0xa6955f78
                0x0000017da6955f90:           83e23f  and $0x3f, %edx
                0x0000017da6955f93:             ebce  jmp 0x17da6955f63
                0x0000017da6955f95:         4883ea10  sub $0x10, %rdx
                0x0000017da6955f99:         4883e2f0  and $0xfffffffffffffff0, %rdx
                0x0000017da6955f9d:       488d441610  lea 0x10(%rsi,%rdx), %rax
                0x0000017da6955fa2:         4883c610  add $0x10, %rsi
                0x0000017da6955fa6:         0f2946f0  movaps %xmm0, -0x10(%rsi)
                0x0000017da6955faa:           4839f0  cmp %rsi, %rax
                0x0000017da6955fad:             75f3  jnz 0xa6955fa2
                0x0000017da6955faf:           0f110f  movups %xmm1, (%rdi)
                0x0000017da6955fb2:             eb0c  jmp 0x17da6955fc0
                0x0000017da6955fb4:           4889d1  mov %rdx, %rcx
                0x0000017da6955fb7:             89f0  mov %esi, %eax
                0x0000017da6955fb9:             f3aa  rep stosb  <--

            Frame memory:
                [0x7fff4f949488]  .I......   81 49 bb e3 9a 00 00 00
        0x7fff4f949a90  0x9ae3bb497c    MyApplication::RefsReceived(BMessage*) + 0x31c 
        0x7fff4f949be0  0x9ae3bb5d92    MyApplication::MessageReceived(BMessage*) + 0x1a2 
        0x7fff4f949bf0  0x133d5022ccd   BLooper::DispatchMessage(BMessage*, BHandler*) + 0x31 
        0x7fff4f949e30  0x133d501c1a4   BApplication::DispatchMessage(BMessage*, BHandler*) + 0x396 
        0x7fff4f949e90  0x133d5023056   BLooper::task_looper() + 0x1d6 
        0x7fff4f949eb0  0x133d5018e78   BApplication::Run() + 0x4a 
        0x7fff4f949ed0  0x9ae3b8319f    main + 0x1f 
        0x7fff4f949f00  0x9ae3b832e9    _start + 0x4f 
        0x7fff4f949f30  0x139c2dbbe3a   runtime_loader + 0x129 
        00000000    0x7ff81a418260  commpage_thread_exit + 0 
janus2 commented 6 years ago

From the title seems you have crash with every audio files. Is it the case? Otherwise I need the audio file.

Vidrep commented 6 years ago

The audio files that cause a crash have one thing in common - MJPEG (like album art) attached

Vidrep commented 6 years ago

Tested on x86_gcc2h with the same audio clips and all is well. So, the issue is only for 64 bit.

janus2 commented 6 years ago

Could be related to this https://dev.haiku-os.org/ticket/13981 ?

Vidrep commented 6 years ago

Looks likely. The bug also affects other apps which use ffmpeg, such as BePodder.

Vidrep commented 6 years ago

Here's a link to a sample audio clip which produces the problem: https://dev.haiku-os.org/raw-attachment/ticket/13410/VanillaFudge.mp3

janus2 commented 6 years ago

BePodder does not use ffmpeg plays the file using mediaplayer.

Vidrep commented 6 years ago

MediaPlayer uses ffmpeg to decode the audio/video, no?

janus2 commented 6 years ago

Yes

Vidrep commented 6 years ago

Another thing I tried, was to download (on 64 bit) an audio podcast using BePodder, then load it into BeAE. If the downloaded podcast has any kind of "art" attached, it will cause BeAE to crash.

janus2 commented 6 years ago

The mediaKit use that, but doesn't work very well... Lunch BeAE from the terminal and try to save a file, you will see a lot of messages.

janus2 commented 6 years ago

I don't think I can go much further with BeAE the same exact problems are present in MediaConverter

Vidrep commented 6 years ago

I'm on IRC now. Let's see if we can narrow down what's happening. 64 bit Haiku has a myriad of issues with any kind of mp3 audio. Maybe we can pass along our findings to PulkoMandy.

Vidrep commented 6 years ago

MediaConverter, BeAE, MediaPlayer and BePodder are all affected to one degree or another, particularly on 64 bit. gcc2h not so much.

Vidrep commented 6 years ago

Using ffmpeg_tools "ffplay", I was able to play both files without issue. So, where to look?

scottmc commented 6 years ago

Can you recheck this with a newer version of Haiku?