Ticket #1809 (closed bug: fixed)
TLID:913 Crash when trying to insert .jpg instead of pdf
Reported by: | deyan | Owned by: | george |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | uncategorized | Version: | 2.0 |
Keywords: | Cc: | ||
Category: | unknown | Effort: | |
Importance: | Ticket_group: | ||
Estimated Number of Hours: | 0 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 0 |
Analysis_owners: | deyan | Design_owners: | george |
Imp._owners: | bobi, george | Test_owners: | vanya |
Analysis_reviewers: | mitex, george | Changelog: | |
Design_reviewers: | meddle, deyan, meddle | Imp._reviewers: | meddle, deyan, meddle |
Test_reviewers: | Analysis_score: | 2 | |
Design_score: | 1 | Imp._score: | 2 |
Test_score: | 2 |
Description (last modified by meddle) (diff)
- Choose Insert -> PDF... Choose "All files (*.*)" from the dropdown menu.
- Select "jpg logo sophie2.jpg" and click "Insert".
- Click OK to close the dialog
- A file dialog appears. Files of type dialog says"All files (*.*)" In the file browser folder and all files appear. When a folder is selected, instead of "Insert" an "Open" button with the same size appears.
- A dialog "Unsupported file" appears
- A file dialog appears. Files of type dialog says"All files (*.*)" In the file browser folder and all files appear.
Crash on step 2, attached log.
Attachments
Change History
comment:1 Changed 16 years ago by deyan
- Owner set to deyan
- Status changed from new to s1a_analysis_started
comment:2 Changed 16 years ago by deyan
- Status changed from s1a_analysis_started to s1b_analysis_finished
comment:3 Changed 16 years ago by mitex
- Design_owners set to mitex. bobi
- Status changed from s1b_analysis_finished to s1c_analysis_ok
- Imp._owners set to bobi
comment:4 Changed 16 years ago by mitex
- Owner changed from deyan to mitex
- Status changed from s1c_analysis_ok to s2a_design_started
comment:6 Changed 16 years ago by mitex
- Status changed from s2a_design_started to s3b_implementation_finished
The problem is that a RuntimeException is thrown from an auto property and the catch block waits for an IOException.
Solution:
In PDFResource.pdfFile do not throw an exception, instead write to the log and return null.
In PDFLogic, createPDFResource, show an error message if (pdfResource.pdfFile().get() == null) and then set pdfResource = null;
comment:8 Changed 16 years ago by meddle
- Status changed from s3b_implementation_finished to s1c_analysis_ok
- Analysis_reviewers set to mitex
- Analysis_score changed from 0 to 1
- Imp._reviewers set to meddle
- Design_score changed from 0 to 1
- Design_reviewers set to meddle
- Imp._score changed from 0 to 1
Mitex, I'm amassed again...
- I want branch, not patch, but this is small thing.
- Most importantly, it's important for every bug there MUST be a test that assure the bug will not pop again!
- You fixed that with Exception swallowing, I can't pass that implementation!
1p (30m, talked with some people about those kinds of bugs)
comment:9 Changed 16 years ago by george
- Design_owners changed from mitex,bobi to george
- Status changed from s1c_analysis_ok to s2a_design_started
- Total Hours set to 0
- Add Hours to Ticket set to 0
- Billable? set
- Owner changed from mitex to george
- Estimated Number of Hours set to 0
comment:10 Changed 16 years ago by george
The problem is that "All Files" dropdown always active, allowing the user to skip file filters, thus allowing him to add an image as a pdf file or even an unsupported file.
Solution: "All files" dropdown in FileDialog is now removed. This is not enough however, user can type in the name of an existing resource file, for example an image, when inserting a pdf file, and the result will be the same as without the FileDialog modification. That is why another check is made - if the opened file is accepted by the chosen file filter, in the FileDialogInput. Changes can be seen here: FileDialog.
comment:11 Changed 16 years ago by george
- Status changed from s2a_design_started to s2b_design_finished
comment:13 Changed 16 years ago by george
- Status changed from s2c_design_ok to s3a_implementation_started
comment:14 Changed 16 years ago by george
- Status changed from s3a_implementation_started to s3b_implementation_finished
comment:15 Changed 16 years ago by meddle
- Status changed from s3b_implementation_finished to s2c_design_ok
- Imp._owners changed from bobi to bobi, george
- Analysis_reviewers changed from mitex to mitex, george
- Analysis_score changed from 1 to 2
- Test_score changed from 0 to 2
- Imp._reviewers changed from meddle to meddle, deyan, meddle
- Design_reviewers changed from meddle to meddle, deyan, meddle
- Imp._score changed from 1 to 2
Failed with #1899
comment:16 Changed 15 years ago by vanya
- Status changed from s2c_design_ok to closed
- Test_owners set to vanya
- Resolution set to fixed