[SOLVED] [190914] Shotcut crash while creating MP4 file

Hello,

I just upgraded to 190914 on my Windows7 host, and Shotcut crashed while creating an MP4 file:

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	shotcut.exe
  Application Version:	0.0.0.0
  Application Timestamp:	5d7ca805
  Fault Module Name:	libstdc++-6.dll
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	00000000
  Exception Code:	40000015
  Exception Offset:	00019ca1
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	1036
  Additional Information 1:	6215
  Additional Information 2:	62151a9e3b0a4b17dad0468de05321a4
  Additional Information 3:	4838
  Additional Information 4:	4838f6285adbbada1eef2f678a9fd05a

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

What could I try to get going?

Thank you.

70449B62-AE36-4C30-AD46-F2A96F227D7E

Sorry to hear about that. The detail information you provided does not really help except to prove yeah it crashed. Does it happen repeatedly? Were you doing something else in Shotcut while exporting was running in the background? If so, whatever you were doing is likely the culprit, and we would need to know what you did - steps to reproduce the crash.

Yes, it happened again after running the compile job a second time, after switching from “DirectX” to “Automatic”.

With the computer being too slow (old Windows 7 computer), I wasn’t doing much besides using Chrome to read stuff on the web.

Could it be due to some issue with the VC++ runtime?

Is there a way to save a log before launching a job?

Sounds like you may have run out of memory. Are you running the 32-bit version? If so, Shotcut is limited to 3 GB RAM. One way to reduce memory prior to export is close other applications, close Shotcut, reopen the project, then export.

Yes, the 32 bit version.

I did close other apps, but it might not be enough.

FWIW, I’ve been using previous versions of Shotcut successfully on the same computer, so it might be a new bug.

==
Here’s a screenshot of Task Manager while Shotcut is at 13% exporting and the computer doesn’t feel slow:

==
Crashed at 37% :-/

Microsoft Visual C++ Runtime Library
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.

You can try to export from cmd.exe without running Shotcut frontend. It will help narrow down and reduce memory usage in case that is the problem:

  1. start an export
  2. right click the job and stop it
  3. right-click the job and view the XML
  4. save the XML
  5. close Shotcut
  6. Windows Start > Run : cmd
  7. set LC_ALL=C
  8. "C:\Program Files\Shotcut\qmelt.exe" -verbose -progress "xml:c:\path\to\your\saved-xml"

Thanks for the tip.

It crashes thusly after running about two hours:

[swscaler @ 193bcd00] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 195776c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 192d9840] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 0f5600c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 193bcd00] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 195776c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 195776c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 195776c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 195776c0] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[ac3 @ 0ec76700] frame sync error
[producer avformat-novalidate] D:/Temp/input.mpg
[swscaler @ 195776c0] audio decoding error -1094995529
YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[ac3 @ 0ec76700] frame sync error
[producer avformat-novalidate] D:/Temp/input.mpg
audio decoding error -1094995529
[ac3 @ 0ec76700] frame sync error
[producer avformat-novalidate] D:/Temp/input.mpg
audio decoding error -1094995529
[mp4 @ 0b3012c0] Starting second pass: moving the moov atom to the beginning of the file
[AVIOContext @ 0b2a0f40] Statistics: 404844033 bytes read, 0 seeks
[libx264 @ 0b301b80] frame I:1235 Avg QP:14.57 size: 21336
[libx264 @ 0b301b80] frame P:37472 Avg QP:19.98 size: 1877
[libx264 @ 0b301b80] frame B:110369 Avg QP:21.04 size: 281
[libx264 @ 0b301b80] consecutive B-frames: 1.1% 0.4% 0.6% 97.9%
[libx264 @ 0b301b80] mb I I16…4: 49.5% 21.6% 28.9%
[libx264 @ 0b301b80] mb P I16…4: 0.4% 0.5% 0.2% P16…4: 15.8% 5.2% 3.3% 0.0% 0.0% skip:74.5%
[libx264 @ 0b301b80] mb B I16…4: 0.3% 0.2% 0.0% B16…8: 3.8% 1.1% 0.1% direct: 1.7% skip:92.8% L0:35.9% L1:4
9.3% BI:14.8%
[libx264 @ 0b301b80] 8x8 transform intra:30.9% inter:61.5%
[libx264 @ 0b301b80] coded y,uvDC,uvAC intra: 36.1% 46.3% 21.6% inter: 2.6% 3.8% 0.1%
[libx264 @ 0b301b80] i16 v,h,dc,p: 52% 22% 11% 16%
[libx264 @ 0b301b80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 29% 28% 3% 4% 4% 6% 4% 7%
[libx264 @ 0b301b80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 33% 13% 4% 5% 5% 7% 5% 6%
[libx264 @ 0b301b80] i8c dc,h,v,p: 61% 25% 11% 3%
[libx264 @ 0b301b80] Weighted P-Frames: Y:2.9% UV:1.0%
[libx264 @ 0b301b80] ref P L0: 70.3% 29.7%
[libx264 @ 0b301b80] ref B L0: 84.3% 15.7%
[libx264 @ 0b301b80] ref B L1: 94.8% 5.2%
[libx264 @ 0b301b80] kb/s:171.32
[aac @ 0ea7f200] Qavg: 50465.041
[AVIOContext @ 0b2a0c00] Statistics: 34 seeks, 3086 writeouts

[ac3 @ 0ec76700] frame sync error
[producer avformat-novalidate] D:/Temp/input.mpg
    audio decoding error -1094995529
[AVIOContext @ 0b2a0e00] Statistics: 7057485954 bytes read, 6 seeks
[AVIOContext @ 0b2a0d00] Statistics: 7071810391 bytes read, 10 seeks
QThread: Destroyed while thread is still running

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Since I was having the same issue with Vegas, before blaming Shotcut, and although I never had this problem before, I should have checked the input file: Since my camcorder uses FAT32, files have a 2GB size limit, so I used VOBMerge to join them into a single MPG file.

That single output file crashes both Shotcut and Vegas… but neither DOS¤ nor ffmpeg¤ did any better.

So I reencoded it in x264…

ffmpeg “merged.mpg” -c:v libx264 -pix_fmt yuv420p -c:a aac -b:a 128k -ac 2 -ar 44100 -threads 2 -f mp4 “merged.mp4”

… and : It finally worked!

Thank you very much!

¤ copy /b file1.mpg+file2.mpg merged.mpg
¤¤ ffmpeg -i “concat:file1.mpg|file2.mpg” -c copy -target pal-dvd merged.mpg

PS: FWIW, here’s what the first MPG file is:
C:>ffprobe -i M2U00422.MPG
ffprobe version 4.2.1 Copyright © 2007-2019 the FFmpeg developers
Input #0, mpeg, from ‘M2U00422.MPG’:
Duration: 00:29:57.12, start: 0.226767, bitrate: 9445 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr,
90k tbn, 50 tbc