Issue 82997 - Missing error handling in SalBitmap
Summary: Missing error handling in SalBitmap
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 2.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: thb
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-26 11:13 UTC by pmladek
Modified: 2009-07-20 14:53 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test PNG file that causes crash these days. (2.44 KB, image/png)
2007-10-26 11:14 UTC, pmladek
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pmladek 2007-10-26 11:13:06 UTC
This issue if forked from the issue #82970. We discussed it on irc yesterday.

It is pity if OOo crashes when user tries to load a huge picture and there is
not enough memory for it. It might also happen when there is a broken file with
broken dimensions...

We could define some limits into each graphics format file filter. But what
should  be these limits?

I think that the best solution would be to catch this situation directly in
X11SalBitmap::ImplCreateDIB when the memory is allocated. Though, it would need
to add a proper error handling of this situation. For example, it should not
happen that a picture is lost when a document is opened and saved.
Comment 1 pmladek 2007-10-26 11:14:05 UTC
Created attachment 49179 [details]
Test PNG file that causes crash these days.
Comment 2 philipp.lohmann 2007-10-31 10:40:03 UTC
target
Comment 3 philipp.lohmann 2008-01-08 16:30:02 UTC
catching bad_alloc in X11SalBitmap now; this results in an empty bitmap (as
discussed in issue 82970), which will fail to produce a BitmapWriteAccess. This
way e.g. the attached png file already gets not imported in the png filter
(albeit the error message appearing is misleading: no import filter found).

fixed in CWS vcl85
Comment 4 philipp.lohmann 2008-01-08 18:02:23 UTC
target
Comment 5 philipp.lohmann 2008-01-14 11:22:13 UTC
please verify in CWS vcl85
Comment 6 thb 2008-01-14 15:33:06 UTC
Verified the catching.
Comment 7 thorsten.ziehm 2009-07-20 14:53:03 UTC
This issue is closed automatically and wasn't rechecked in a current version of
OOo. The fixed issue should be integrated in OOo since more than half a year. If
you think this issue isn't fixed in a current version (OOo 3.1), please reopen
it and change the field 'Target Milestone' accordingly.

If you want to download a current version of OOo =>
http://download.openoffice.org/index.html
If you want to know more about the handling of fixed/verified issues =>
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues