Issue 15401 - rotated jpg crashes draw
Summary: rotated jpg crashes draw
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC All
: P2 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords: oooqa
: 15445 16289 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-06-08 08:10 UTC by kingshome
Modified: 2003-09-08 16:52 UTC (History)
2 users (show)

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


Attachments
jpg file that crashes beta2 draw (2.52 KB, image/jpeg)
2003-06-10 12:02 UTC, kingshome
no flags Details
draw file with inserted jpg (8.99 KB, application/octet-stream)
2003-06-10 12:04 UTC, kingshome
no flags Details
draw file with rotated jpg (9.09 KB, application/octet-stream)
2003-06-10 12:05 UTC, kingshome
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description kingshome 2003-06-08 08:10:39 UTC
Crash occurs after the following procedure:

1	Start a new draw document.  Do not draw anything.
2	Insert a jpg graphic into the document.
3	Right click on the image, select Position and Size.
4	Select the Rotation tab
5	Change the rotation angle (e.g. 90 degrees)
5	Print the document.

Draw crashes with 'unrecoverable error'

If you start the draw document and draw something in it before inserting
the jpg, sometimes it won't crash, but I can't consistently reproduce this
behaviour.

.gif and .bmp files seem to be ok.
Comment 1 kelvine 2003-06-08 08:18:02 UTC
Hi,

I confirmed this using Windows XP Home and different printer drivers 
and could reproduce the problem.

Kelvin
Comment 2 kingshome 2003-06-08 11:05:51 UTC
Exactly the same thing happens if you insert a jpg graphic into a new 
Impress presentation, rotate it and then try to print out the page.
Comment 3 dankegel 2003-06-09 16:46:57 UTC
Excellent catch, thanks.  I've reproduced this on Linux.

Here's a valgrind stack dump (see http://kegel.com/openoffice/#dump):
Invalid memory access of size 1
at 0x40352546: (within libvcl644li.so)
by 0x4035434E: Printer::GetPreparedMetaFile(GDIMetaFile const&,
GDIMetaFile&, long, long) (in libvcl644li.so)
by 0x40307629: ImplQPrinter::ImplPrintHdl(Timer*) (in libvcl644li.so)
by 0x4030741C: ImplQPrinter::LinkStubImplPrintHdl(void*, void*) (in
libvcl644li.so)
by 0x402C13DB: Timer::Timeout() (in libvcl644li.so)
by 0x402C10DF: ImplTimerCallbackProc() (in libvcl644li.so)
by 0x4045ECB1: SalData::Timeout() const (in libvcl644li.so)
by 0x4045E71E: SalXLib::CheckTimeout(bool) (in libvcl644li.so)
by 0x4045EAE9: SalXLib::Yield(unsigned char) (in libvcl644li.so)
by 0x4046786B: SalInstance::Yield(unsigned char) (in libvcl644li.so)
by 0x402BB772: Application::Yield() (in libvcl644li.so)
by 0x402BB674: Application::Execute() (in libvcl644li.so)
by 0x8065846: desktop::Desktop::Main() (in soffice.bin)
by 0x402C0486: SVMain() (in libvcl644li.so)
by 0x4045D719: main (in libvcl644li.so)
by 0x41508913: __libc_start_main (in /lib/libc-2.2.93.so)
by 0x805EAA0: (within soffice.bin)
Address 0x0 is not stack'd, malloc'd or free'd
sh: line 1: crash_report: command not found
Comment 4 wolframgarten 2003-06-10 08:29:52 UTC
Reassigned to Thorsten. Please have a look at the stack. The crash was
only reproduceable once here. Thanks.
Comment 5 wolframgarten 2003-06-10 09:40:49 UTC
Changed priority to p2.
Comment 6 thb 2003-06-10 11:07:46 UTC
John, Dan, thanks a lot for bringing this up. I have severe problems reproducing the 
bug, both on Linux and Windows. Does it only happen occasionally for you? Or always? If 
always, could you share details regarding specific JPEG file and printer used? I 
presume you used an English beta 2, correct?
Comment 7 kingshome 2003-06-10 12:02:46 UTC
Created attachment 6768 [details]
jpg file that crashes beta2 draw
Comment 8 kingshome 2003-06-10 12:04:06 UTC
Created attachment 6769 [details]
draw file with inserted jpg
Comment 9 kingshome 2003-06-10 12:05:01 UTC
Created attachment 6770 [details]
draw file with rotated jpg
Comment 10 kingshome 2003-06-10 12:07:26 UTC
English edition of beta2, set to UK English

I have attached files:
carrot.jpg is one of the jpg files I used to test (yes, I am a keen 
gardener)
draw1.sxd is the draw file with the inserted jpg, no modifications 
made.
draw2.sxd is the same file, with the carrot rotated 90 degrees.  
Trying to print draw2.jpg results in a crash.

The printer is a samsung ML6060 on Windows NT.

Additional information:
I tried the same procedure on my copy of Staroffice 6.1beta2, and the 
same crash occurred.  I then allowed the staroffice crash report to be 
sent back to Sun - at 11:32 0n 10-06-03.  There's no referrer code on 
the return email from Sun so I can't specify it any closer, though the 
address sent to is john@kingshome.co.uk, and not my posting address on 
 gmane.comp.openoffice.questions.

Also check out the thread of a posting I made on officesuite.com.
betatest.draw on 08-06-03. There's someone else with a similar problem 
(the program didn't crash but hung up)

I can confirm that it happens **every time** a jpg is rotated in an 
new draw file.
Comment 11 thb 2003-06-10 12:13:43 UTC
Thanks for the quick followup, John. I'm now able to reproduce the crash, but only for 
OOo beta 2 . Anyway, that's all I need for debugging.
Comment 12 thb 2003-06-10 15:39:56 UTC
Ah, I already fixed this one with internal bugid #109548# about a month ago. If anybody 
needs an urgent fix: update vcl/source/gdi/print2.cxx to at least version 1.17. 
Reason was a wrong palette access to a bitmap which didn't have a palette. Reason that 
this was triggered by rotation is that rotation always adds a transparency mask to 
bitmaps (although strictly speaking, this could be optimized away for multiple-of-90-
degree rotations).
Comment 13 thb 2003-06-10 15:55:06 UTC
Issue already fixed with bugid #109548#.
Comment 14 thb 2003-06-10 15:55:28 UTC
Please verify.
Comment 15 thb 2003-06-10 15:55:53 UTC
Please verify.
Comment 16 dankegel 2003-06-11 08:18:51 UTC
*** Issue 15445 has been marked as a duplicate of this issue. ***
Comment 17 wolframgarten 2003-06-11 09:25:34 UTC
Verified.
Comment 18 wolframgarten 2003-06-11 09:26:28 UTC
Fix will be included in 1.1 RC. Thank you very much for your help!!
Closed.
Comment 19 dankegel 2003-07-12 07:48:53 UTC
*** Issue 16289 has been marked as a duplicate of this issue. ***