-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
18.05.03 video import leads to crash #549
Comments
I have not been able to reproduce this. After you clear all settings and app data and start shotcut, do you do anything before dropping a video clip from, I assume, Explorer? |
Yes, I drop the file from windows explorer. Interesting: it does not crash if I drop it from the same partition in which shotcut is. If I drop it from another partition however, it crashes. (Shotcut is on D:) |
I tested with clips on C:, D:, and E: where Shotcut is on C:. Do you know if there is a workaround? I will do some tests while running in a debugger next. Sometimes, that exposes a crash that normal running does not. |
Moving Shotcut to C:\Shotcut reduced the occurrence a little. It seems to affect .mp4 (from internet or rendered on pc) videos more than .mov videos (recorded at 30fps with obs). Thinking the location has an effect might be complete nonsense though. The file format observations might be nonsense as well. File size seems to not be a factor. Some 1 MB files crash, some 1GB files open without problem and vice versa. I arranged the following: shotcut.exe is in C:\Shotcut\ , all taken from the 18.05.03 zip. I put this https://mega.nz/#!zWBz1IpD!oKlaEas5scLv1GW1rmYYE_ZyIRZ7b2tgXvum-k_fa5o 1.2MB video also into C:\Shotcut\ It does crash when I drag it in (output below). Using "Open File" has same effect.
Could it be the The most important part to reproduce this (and see what first-time users see) seems to be not to change settings. For example changing video mode might have made the issue go away. PS: workaround (sorry, forgot to mention) has been for me so far to drag in a jpg image into the source view, after that it so far always didn't crash when I added a video. Hm. This begins to make sense, if setting the format/profile solves the issue and first adding an image solves the issue, then the culprit is probably the automatic resolution/framerate/etc/format identification system. PPS: importing clips testing probably only works if it is the first thing imported, so shotcut needs to be restarted before each clip tested. |
This should not be possible:
I can't even imagine how the consumer could request zero channels. Maybe the root problem, or maybe an unrelated side effect of the root problem. |
In relation to @bmatherly here is the command line output if I first import a 1920x1080 jpg image and after that import the video that would cause the crash: I import the photo:
I import the video:
|
If you do not add this to the Playlist or Timeline, then Shotcut does not determine the video mode from Automatic. Automatic resolution occurs when adding the first item to either of those. |
In the beginning of the bug hitting me, I assumed I have to drag the image to the timeline first for the workaround to work. I just tested a few more times, including clearing registry and AppData again. It works if I drag the image into shotcut and then drag the video into shotcut without any timeline interaction first. Here's a video of the crashing. https://youtu.be/3iIy_09i_VI Some more tests: If GPU is enabled, the crash doesn't happen. Turning GPU off leads to the crashes happening again. Setting the video mode to 1080p30fps before importing does not fix it. Disabling Realtime (frame dropping) seems to solve it. Enabling it back again makes it crash again on import. OpenGL/DirectX display mode changing has no effect (crashes on import either way). |
@qubodup Thanks for the workaround. Just tried ShortCut for the first time and was stumped... |
@WASCHMASCHINE glad to hear this thread helped. I updated the first post so googlers can be helped quicker. I just realized that I apparently can debug programs because I have VS2017 installed. Here's what it tells me:
|
The divide by zero error is most likely because of the 0 channels and 0Hz log message @bmatherly mentioned. You cannot use stock Visual Studio for debugging because Shotcut uses gcc and the mingw runtime and not msvcrt. You need to install something like VisualGDB or follow this article. I use Qt Creator and its debugger. However, I tested several times today in the (very slow) debugger with different clips, and I still did not reproduce it. At this point I am reviewing code to develop a hypothesis for the cause, which currently smells like a race condition around some initialization somewhere. |
I found the bug in MLT. On a machine with more than 2 cores, it is directly related to the Realtime setting in Shotcut. It may affect more than Windows, but less likely. It is difficult for me to test a fix. So, after tonight's nightly build, I will post a link of a new build to test. @bmatherly take a look at https://github.com/mltframework/mlt/blob/master/src/framework/mlt_consumer.c#L599 priv->channels, and frequency are not set until after start is called. Look a little above that, and you can see consumer_read_ahead_start() is called on the main thread on Windows. consumer_read_ahead_start() calls mlt_frame_get_audio(), which might have unset channels and frequency in consumer_private. |
swresample div by 0 was occurring at every start of Kdenlive 18.04.0 trial builds for Windows. The only workaround I found (yesterday night) was to comment the filter out in loader.ini... |
No more crashes, thanks!
|
It seems you did not clear your settings or left it set for mono. |
You're right, I left it in the state after yesterday's testing, where it still would crash. Cleared the settings and confirmed that new version doesn't crash any more with multiple videos (smallbunnies.mp4 output below), cleared settings again, confirmed 180503 still crashes with smallbunnies.mp4 just to make sure.
|
Excellent. There are also many fixes for the fade in/out filters. I feel 18.05 may deserve a re-release. |
Blank Shotcut 18.05.03 crashes when a video (h264 mp4) gets dragged into the source monitor (default view).
shotcut.exe has stopped working
A problem caused the program to stop working correctly. Please close the program.
Close the program
Debug the program
This stopped happening at some point, I think it was related to me selecting a video profile.
Edit: Workaround is to drag in a jpg image into the source view, after that, it so far never crashed when I added a video.
It can be reproduced by deleting HKEY_CURRENT_USER\SOFTWARE\Meltytech and C:\Users[username]\AppData\Local\Meltytech and then starting Shotcut 18.05.03 and dragging a video into the source monitor.
Not sure whether the command line output (win64) is useful:
The text was updated successfully, but these errors were encountered: