Bug 43867 - MAILMERGE: Mail Merge with ole object in header of document, causes crash. SfxObjectShell::GetEmbeddedObjectContainer
Summary: MAILMERGE: Mail Merge with ole object in header of document, causes crash. Sf...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: mab3.4 mab3.5
  Show dependency treegraph
 
Reported: 2011-12-15 13:19 UTC by Paul Rolfe
Modified: 2012-01-09 08:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Zip file containing example document, name list, crash logs (62.75 KB, application/zip)
2011-12-15 13:19 UTC, Paul Rolfe
Details
hack to not crash anyway, doesn't help get the right output however :-) (770 bytes, patch)
2011-12-19 09:05 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Rolfe 2011-12-15 13:19:49 UTC
Created attachment 54474 [details]
Zip file containing example document, name list, crash logs

Problem description: 
When running mail merge with a document header that contains an image, libre office crashes out with no error or warning

Steps to reproduce:
Run Mail Merge
Create new document
In Document, insert a default header
Edit header, add a few blank lines
Add an image into the header
Add text into rest of document
run mail merge, print or create merged document

Current behavior:
LibreOffice crashes

Expected behavior:
Create the merged document w/o crashing !

Platform (if different from the browser): 
OS:  Linux 2.6.34.10-0.4-desktop x86_64
System:  openSUSE 11.3 (x86_64)
KDE:  4.4.4 (KDE 4.4.4) "release 3"
              
Browser: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Comment 1 Cor Nouws 2011-12-15 13:57:45 UTC
Hi Paul,

(In reply to comment #0)

> Steps to reproduce:
> Run Mail Merge
> Create new document
> In Document, insert a default header
> Edit header, add a few blank lines
> Add an image into the header
> Add text into rest of document
> run mail merge, print or create merged document

I do your steps above, and for the last one:
  Tools > Mail merge Wizard
  Jump to step 8
  > crash

So confirmed on Ubuntu, in my case with 3.5.0 beta1
Thanks for your report!
Cor
Comment 2 Cor Nouws 2011-12-15 14:00:14 UTC
graphic in headers are not uncommon, so I raise importance.
Comment 3 Caolán McNamara 2011-12-19 08:35:21 UTC
aha, I can reproduce this too, which makes a change :-)
Comment 4 Caolán McNamara 2011-12-19 09:05:46 UTC
Created attachment 54574 [details]
hack to not crash anyway, doesn't help get the right output however :-)
Comment 5 Caolán McNamara 2011-12-19 09:09:09 UTC
ole objects, rather than graphics, are the problem here
Comment 6 Caolán McNamara 2012-01-04 08:42:12 UTC
crash is one issue, missing ole object in header is three other combined bugs
Comment 7 Caolán McNamara 2012-01-04 08:56:01 UTC
missing preview image for object in header can be reproduced stand-alone from mailmerge with F11 to get style dialog, and "load styles", check "pages" and "overwrite"
Comment 8 Ferry Toth 2012-01-04 13:48:42 UTC
I am seeing this since LO 3.4.4 on Kubuntu.

As far as I can tell it has nothing to do with headers or OLE objects, at least not in my case.

The simplest type of email merge crashes (i.e. Hello <field> somemessage, Bye) without any special formatting, exactly as described above.
I have tried sending plain text, as html.
Tried various other data sources.
Tried various mailreader back ends (under <Tools><Options><Internet><E-mail>, I am hoping this is used for sending?). My default = Evolution, but also tried Thunderbird and Kmail.

Note that it did work on the previous stable version 3.3.x

Ferry
Comment 9 Ferry Toth 2012-01-04 15:05:12 UTC
Correction

Writer sends the mail merge directly over smtp, the settings are under <Tools><settings><Libreoffice Writer><Standard letter E-mail> and in my case the server passes the verification test.

Therefore it is normal that changing the e-mail client has no effect.

Nevertheless emailmerge crashes.

Ferry
Comment 10 Ferry Toth 2012-01-04 15:10:24 UTC
The crash shows the following in the console:
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode: 42 (X_SetInputFocus)
  Resource id:  0x6002336
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode: 42 (X_SetInputFocus)
  Resource id:  0x6002336
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode: 42 (X_SetInputFocus)
  Resource id:  0x6002625
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode: 42 (X_SetInputFocus)
  Resource id:  0x6002625
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::end: Painter not active, aborted
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread


Hope this helps,

Ferry
Comment 11 Caolán McNamara 2012-01-05 01:16:22 UTC
Ferry Toth: "As far as I can tell it has nothing to do with headers or OLE objects, at least not in my case."

You have a completely different bug. Your one is probably a QT-specific drawing issue, probably bug #40298
Comment 13 Ferry Toth 2012-01-05 12:02:01 UTC
A Qt problem? I doubt it.

But I will fire up gnome and see if the problem disappears.

BTW further tests show that the mail merge is able to send exactly mail to the 1st record before it crashes.

If you are right then this Qt problem happens right after sending the first message.

In any case it is still a regression as this did work in the previous version under Kubuntu.

Ferry
Comment 14 Ferry Toth 2012-01-05 14:53:26 UTC
@Caolán:

I am confirming my problem happens under KDE and not Gnome.

Just tested the following:
-Under KDE switched from oxygen-gtk to  Raleigh. In the past this solved certain troubles with Firefox and Evolution. In this case it does not help at all.
-Installed gnome package and opened another x session (so keeping kwin as window manager) selected type as gnome. Sent test email merge, no crash.

So for now this is a useful workaround.

Ferry
Comment 16 Ferry Toth 2012-01-06 14:03:14 UTC
@Caolán:

Has the problem I reported been fixed as well? (crashes on KDE)

Or do I need to create a new issue for this?

Sent out my mailing using Ubuntu Unity today. Great relief thanks!

Ferry
Comment 17 David Tardon 2012-01-07 01:30:56 UTC
dtardon->ftoth: the bug is mentioned in comment 11
Comment 18 Ferry Toth 2012-01-09 08:11:16 UTC
@dtardon:

Bug 40298 - EDITING: Crash when moving cells, QX11PixmapData::createCompatiblePixmapData

That is a very interesting description for a bug when moving cells and as Caolán mentions this is *probably* the cause for my e-mail merge problems.

And as I think 40298 is fixed now, I think it is a logical question to ask: has the mail merge problem on KDE disappeared now 40298 has been fixed? Or in other words, has this been verified?

If this is the case we can conclude that 40298 was *most likely* the cause and move on.

Otherwise I would like to create a new issue.

You see, some questions can be answered with a yes or no and save everybody a heap of time.

Ferry