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
Crash when screenshotting with long video title (No error display) #3334
Comments
ReproducingTo reproduce the crash:
An error message will be emitted to the mpv log:
IINA will then crash in Full Crash Dump:
AnalysisThe crash occurs on this line of var latestFile: URL = contents[0] Since mpv was unable to save the screenshot the screenshot directory is still empty and therefore the Of course IINA should have noticed mpv failed to create the screenshot and should not be calling this method. IINA is submitting a command to mpv to take the screenshot asynchronously. The results of the command are returned as a mpv FixingThe method Even though the method I will shortly post a pull request with these changes. This commit adds new text for the alert that will require localization. Note that drewbitt encountered this failure when streaming. If it is common for streams to have filenames so long as to trigger this failure then IINA may want to consider how this situation can be improved. Although there is a workaround described below, many users may not think to investigate configuring mpv options as a solution to this failure. WorkaroundAs lizyn showed in issue #3083, the mpv option Remember to restart IINA after setting this option. The syntax of a mpv screenshot template is documented here: mpv manual screenshot-template option |
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
Perhaps we should also report this upstream to mpv? |
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
mpv works fine in this case because by default the title is not used in the name of the screen shot: "mpv-shot0001.jpg" IINA has a |
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
Yeah, basically that, although it's not a priority to report I guess since we can handle it in IINA without too much trouble. |
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
This commit will address review comments on the changes to the methods MPVController.handleEvent and Utility.getLatestScreenshot.
This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
Rebased with develop and addressed review comment. This commit will: - Extend URL with a new optional computed property, creationDate - Change the method Utility.getLatestScreenshot to use the array max method to find the latest screenshot file
This commit will: - Change the method MPVController.handleEvent to raise an alert if screenshot generation failed - Change the method Utility.getLatestScreenshot to guard against an empty screenshot directory This commit adds new text for the alert that will require localization.
IINA 1.3.2 contains the fix for this issue. |
This is a bug in mpv in crashing with long video titles since it saves files by default containing the full filename. macOS filename limit is 255 characters. But, streams can often have far more than 255 character filenames. Iina will then crash with no error display. This should be handled better, likely with an error display that it can't save a file. You could attempt to truncate this to 255 characters as well but that approach doesn't seem ideal.
and a crash
Expected Behavior: Tells you if it can't screenshot and doesn't simply crash with no error
The text was updated successfully, but these errors were encountered: