b-editor / beutl

Cross-platform video editing (compositing) software.
https://beutl.beditor.net
MIT License
280 stars 15 forks source link

Crashing When Opening MOV Files with AVFoundation #1015

Open yuto-trd opened 3 months ago

yuto-trd commented 3 months ago

Describe the bug

When opening MOV files with AVFoundation, the application crashes. The files open correctly with FFmpeg, so the issue seems to be related to AVFoundation’s handling of these files. (Files other than MOV have not been tested.)

To Reproduce

  1. Set AVFoundation as the highest priority decoder.
  2. Open a MOV file in the project.
  3. The application crashes.

Expected behavior

No response

Beutl version

1.0.0-preview.8

OS

macOS

Additional context

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Beutl [52073]
Path:                  /Users/USER/Downloads/Beutl.app/Contents/MacOS/Beutl
Identifier:            net.beditor.beutl
Version:               1.0.0.542 (1.0.0.542)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-07-07 19:51:22.1214 +0900
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        2E7ABBFB-C07F-CE8C-3711-762E9FB447F1

Sleep/Wake UUID:       D510E44F-3E8E-41D1-9638-EAD4022A1130

Time Awake Since Boot: 1100000 seconds
Time Since Wake:       4213 seconds

System Integrity Protection: enabled

Crashed Thread:        13  Beutl.RenderThread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000028
Exception Codes:       0x0000000000000001, 0x0000000000000028

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [52073]

VM Region Info: 0x28 is not in any region.  Bytes before following region: 4303863768
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      10087c000-100888000    [   48K] r-x/r-x SM=COW  /Users/USER/Downloads/Beutl.app/Contents/MacOS/Beutl

~~~~~~

Thread 13 Crashed:: Beutl.RenderThread
0   CoreImage                              0x18c526a68 -[CIContext(createCGImage) createCGImage:fromRect:format:colorSpace:] + 84
1   ???                                    0x10da9684c ???
2   ???                                    0x10da963ec ???
3   ???                                    0x10da939d8 ???
4   ???                                    0x10da90714 ???
5   ???                                    0x10da900c8 ???
6   ???                                    0x10da90024 ???
7   ???                                    0x10da8fe44 ???
8   ???                                    0x10da50854 ???
9   ???                                    0x10da51010 ???
10  ???                                    0x10da54edc ???
11  ???                                    0x10da53338 ???
12  ???                                    0x10da50854 ???
13  ???                                    0x10da51010 ???
14  ???                                    0x10da51898 ???
15  ???                                    0x10da50854 ???
16  ???                                    0x10da51010 ???
17  ???                                    0x10da51228 ???
18  ???                                    0x10da50854 ???
19  ???                                    0x10da51010 ???
20  ???                                    0x10da50dc4 ???
21  ???                                    0x10da50854 ???
22  ???                                    0x10da4a09c ???
23  ???                                    0x10da49244 ???
24  ???                                    0x10da49108 ???
25  ???                                    0x10da2c854 ???
26  ???                                    0x10da2b560 ???
27  ???                                    0x10da2aca0 ???
28  ???                                    0x105c2756c ???
29  ???                                    0x10c0b9604 ???
30  ???                                    0x105c27728 ???
31  ???                                    0x105c29b0c ???
32  ???                                    0x105c296f0 ???
33  ???                                    0x105c2959c ???
34  ???                                    0x104f2b3f8 ???
35  ???                                    0x104f3616c ???
36  libcoreclr.dylib                       0x10163b444 CallDescrWorkerInternal + 132
37  libcoreclr.dylib                       0x1014b6450 DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int) + 268
38  libcoreclr.dylib                       0x1014c9794 ThreadNative::KickOffThread_Worker(void*) + 148
39  libcoreclr.dylib                       0x101488988 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 256
40  libcoreclr.dylib                       0x101488ee0 ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
41  libcoreclr.dylib                       0x1014c986c ThreadNative::KickOffThread(void*) + 172
42  libcoreclr.dylib                       0x1013a1a40 CorUnix::CPalThread::ThreadEntry(void*) + 380
43  libsystem_pthread.dylib                0x18161ef94 _pthread_start + 136
44  libsystem_pthread.dylib                0x181619d34 thread_start + 8