-
Notifications
You must be signed in to change notification settings - Fork 272
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
Better error reporting for image import failure #1674
Comments
Hello I'm an undergraduate student looking to work on an open source project for one of my classes. I would like to know where in the files can I find this issue. I may be interested on taking this issue on |
@victoriadealba Hi Victoria. Thank you for your interest! I've informed the devs about your query. Method Method Additionally below I'll link the wiki that guides to most developer documents where you can learn how to compile the source code specifically for this project among other things. https://github.com/pencil2d/pencil/wiki This page sort of mirrors the wiki on the landing page, but more importantly it has the class references generated by doxygen (c++ source documentation tool) If you have questions please ask them here or visit us on discord in the |
Thank you, |
This is mostly covered in the initial post:
So you need to change the return types from bool to Status (defined in core_lib/src/util/pencilerror.h), and then pass that Status object to an ErrorDialog. The Status object can store the title, description, and debugging information if there is an error. See The error dialog should produce messages that are unique for each of the types of errors described in the Steps to Reproduce section, and where relevant, should provide clear instructions to the user about what went wrong and how to correct the issue. The DebugDetails should at the very least contain the path to the image to import, and the format from QImageReader for bitmap image import, any other information specific to the error that might also be useful should be included (ex file permission flags when there is a file permission error). You can trigger a movie export error by changing the camera width to an odd number (double click on the camera layer), and then exporting as a mp4 movie. |
Hello! I'm a college student interested in contributing to Pencil2D and I noticed this issue hasn't been active in a while. Would it be okay if I tried working on it? |
Sure! As you said, there hasn’t been any activity here in a while, so Victoria has probably moved on to something else. Scribble has already added some technical details above, but if anything is still unclear, feel free to ask! |
Issue Summary
If an image import fails, the same dialog is shown for a variety of unrelated errors.
Actual Results
Currently if there is any issue with image importing, this dialog is displayed:
Expected Results
When image import fails, an error dialog is displayed similar to the one used for movie export errors detailing what exactly the error was, and providing debug details too if relevant.
Steps to reproduce
Layer type error:
Image reading error:
File not found error:
Note: There are other errors as well. See https://doc.qt.io/qt-5/qimagereader.html#ImageReaderError-enum
System Information
Pencil2D Version: 0.6.6
Operating System: Ubuntu 20.04
RAM Size: 16 GB
Graphics Tablet: None
Developer Notes
To implement this,
Editor::importImage
,Editor::importBitmapImage
, andEditor::importVectorImage
should returnStatus
objects with error information, andMainWindow::importImage
should read those objects and pass the Status data to anErrorDialog
if there's an issue.The text was updated successfully, but these errors were encountered: