Bug 32553 - Mail Merge >Document with table directly at the top: only one is sent per e-mail, then LibO freezes
Summary: Mail Merge >Document with table directly at the top: only one is sent per e-m...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.3.0 RC1
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard:
Keywords:
: 31792 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-21 09:06 UTC by Cor Nouws
Modified: 2011-03-21 02:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
stace log (82.39 KB, application/x-bzip)
2010-12-21 13:33 UTC, Cor Nouws
Details
tst doc that hangs when mail-merge mailing (579.80 KB, application/vnd.oasis.opendocument.text)
2010-12-22 05:25 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2010-12-21 09:06:54 UTC
To reproduce
- writer document
- some fields from datasource
- Tools > Mail Merge Wizard
- step 8, send etc
- choose send by e-mail and PDF etc
- OK ....
  > no mails send

NB 1: sending as html for example does work
NB 2: works OK in OOo321 / OOo330rc8
Comment 1 Cor Nouws 2010-12-21 09:07:44 UTC
tested on Ubuntu
Comment 2 Jan Holesovsky 2010-12-21 12:22:59 UTC
Hi Cor, can you please provide us with a strace?  That would help a lot.

http://wiki.documentfoundation.org/BugReport#How_to_get_strace_log_.28on_Linux.29

Thank you in advance!
Comment 3 Cor Nouws 2010-12-21 13:33:40 UTC
Created attachment 41352 [details]
stace log 

BTW, I run LibO 330rc1 with the old user profile from OOo3.2.1
(will try with fresh profile too)
Comment 4 Cor Nouws 2010-12-21 13:51:46 UTC
LibO330rc1 with a fresh user profile shows the same problem.

Plus a new one:
Sending mail merge as HTML, freezes, unless I mail as e.g. txt first, and then as HTML, then it works fine.

Strace for that too... yes of course.
Comment 5 Cor Nouws 2010-12-21 14:16:04 UTC
attachments too large
have one for problem PDF not send
and one for HTML freezes
Comment 6 Jan Holesovsky 2010-12-22 01:54:18 UTC
Caolan: Can you please have a look?  I'll forward you the straces.
Comment 7 Caolán McNamara 2010-12-22 02:05:42 UTC
There is a "dbg = False" in /path/to/basis3.2/program/mailmerge.py which if changed to "dbg = True" will output various foo if the process is getting as far as the actual emailing of the document.
Comment 8 Cor Nouws 2010-12-22 04:37:50 UTC
how can I make that the output is written to a file?
It is too much to get from the terminal (with my skills anyway).

BTW: it seems that a first attempt to mail fails, then a second works, and then mail as PDF works too.
Eg. as PDF > no result; as HTML > works, as PDF works.

Odd that I did not notice that yesterday.

Pls advice on what I can do to help.
Comment 9 Caolán McNamara 2010-12-22 04:44:06 UTC
To redirect the output to a file....

e.g. shutdown Libo

/path/to/soffice > /tmp/thelog 2>&1

and attach the log here (well, check it for your email passwords first in it, it might log those too)
Comment 10 Cor Nouws 2010-12-22 04:53:24 UTC
Hmm, Now sending as HTML works right away. why do I get different results and
problems every time :-(

Below the output of just the HTML from the terminal (some private data
snipped/...)


~/LibO330rc1/libreoffice/program$ ./soffice
PyMailServiceProvider init
PyMailServiceProvider create with <uno.Enum com.sun.star.mail.MailServiceType
('SMTP')>
PyMailSMPTService init
PyMailSMPTService getSupportedConnectionTypes
PyMailSMPTService connect
Logging in, username ...
[....], pleased to meet you\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-SIZE 31457280\r\n'
reply: '250-DSN\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250-STARTTLS\r\n'
reply: '250-DELIVERBY\r\n'
reply: '250 HELP\r\n'
reply: retcode (250); Msg: smtp-vbr2.xs4all.nl Hello ....], pleased to meet you
ENHANCEDSTATUSCODES
PIPELINING
8BITMIME
SIZE 31457280
DSN
AUTH LOGIN PLAIN
STARTTLS
DELIVERBY
HELP
send: 'AUTH PLAIN ...==\r\n'
reply: '235 2.0.0 OK Authenticated\r\n'
reply: retcode (235); Msg: 2.0.0 OK Authenticated
PyMailSMPTService isConnected
PyMailSMPTService sendMailMessage
PyMailSMPTService subject tst 52553 #3
PyMailSMPTService from Cor Nouws
PyMailSMTPService from cno@nouenoff.nl
PyMailSMPTService send to (u'nouwsc@xs4all.nl',)
PyMailSMPTService flavors len 1
PyMailSMPTService mimetype is text/html; charset=utf-8
PyMailSMPTService recipients are [u'nouwsc@xs4all.nl']
send: u'mail FROM:<cno@nouenoff.nl> size=1450\r\n'
reply: '250 2.1.0 <cno@nouenoff.nl>... Sender ok\r\n'
reply: retcode (250); Msg: 2.1.0 <cno@nouenoff.nl>... Sender ok
send: u'rcpt TO:<nouwsc@xs4all.nl>\r\n'
reply: '250 2.1.5 <nouwsc@xs4all.nl>... Recipient ok\r\n'
reply: retcode (250); Msg: 2.1.5 <nouwsc@xs4all.nl>... Recipient ok
send: 'data\r\n'
reply: '354 Enter mail, end with "." on a line by itself\r\n'
reply: retcode (354); Msg: Enter mail, end with "." on a line by itself
data: (354, 'Enter mail, end with "." on a line by itself')
send: 'Content-Type: text/html; charset=UTF-8\r\nMIME-Version: 1.0\r\nSubject:
tst 52553 #3\r\nFrom: Cor Nouws <cno@nouenoff.nl>\r\nTo:
nouwsc@xs4all.nl\r\nX-Mailer: LibreOffice 3.3 via Caolan\'s mailmerge
component\r\nDate: Wed, 22 Dec 2010 13:42:25 +0100\r\n\r\n<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">\r\n<HTML>\r\n<HEAD>\r\n\t<META
HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html;
charset=utf-8">\r\n\t<TITLE></TITLE>\r\n\t<META NAME="GENERATOR"
CONTENT="LibreOffice 3.3  (Linux)">\r\n\t<META NAME="CREATED"
CONTENT="0;0">\r\n\t<META NAME="CHANGEDBY" CONTENT="Cor Nouws">\r\n\t<META
NAME="CHANGED" CONTENT="20101222;13422500">\r\n\t<STYLE
TYPE="text/css">\r\n\t<!--\r\n\t\t@page { size: 15.8cm 14cm; margin-left: 1cm;
margin-right: 1cm }\r\n\t\tP { margin-bottom: 0.21cm }\r\n\t\tTD P {
margin-bottom: 0cm }\r\n\t-->\r\n\t</STYLE>\r\n</HEAD>\r\n<BODY LANG="nl-NL"
DIR="LTR"><SPAN CLASS="sd-abs-pos" STYLE="position: absolute; top: 0.79cm;
left: 0.23cm; width: 583px">\r\n<IMG SRC="sv65g_tmp_m7f81eb.png"
NAME="graphics1" WIDTH=583 HEIGHT=476 BORDER=0></SPAN><SPAN CLASS="sd-abs-pos"
STYLE="position: absolute; top: 0.68cm; left: 0.23cm; width: 583px">\r\n<IMG
SRC="sv65g_tmp_ma390a6f.gif"></SPAN>\r\n<P STYLE="margin-bottom:
0cm"><BR>\r\n</P>\r\n<P STYLE="margin-bottom:
0cm"><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n<P
ALIGN=CENTER STYLE="margin-bottom: 0cm">Nouws
nouwsc@xs4all.nl</P>\r\n<P><BR>\r\n</P>\r\n<P><BR>\r\n</P>\r\n</BODY>\r\n</HTML>\r\n.\r\n'
reply: '250 2.0.0 smtp-vbr2.xs4all.nl accepted message oBMCgO3Q065956\r\n'
reply: retcode (250); Msg: 2.0.0 smtp-vbr2.xs4all.nl accepted message
oBMCgO3Q065956
data: (250, '2.0.0 smtp-vbr2.xs4all.nl accepted message oBMCgO3Q065956')
PyMailSMPTService sendMailMessage

[snip]
reply: '250 2.0.0 smtp-vbr2.xs4all.nl accepted message oBMCgO3S065956\r\n'
reply: retcode (250); Msg: 2.0.0 smtp-vbr2.xs4all.nl accepted message
oBMCgO3S065956
data: (250, '2.0.0 smtp-vbr2.xs4all.nl accepted message oBMCgO3S065956')
PyMailSMPTService isConnected
PyMailSMPTService disconnect
send: 'quit\r\n'
reply: '221 2.0.0 smtp-vbr2.xs4all.nl closing connection\r\n'
reply: retcode (221); Msg: 2.0.0 smtp-vbr2.xs4all.nl closing connection
Comment 11 Cor Nouws 2010-12-22 04:54:09 UTC
thanks for your advice Caolán - will try that now
Comment 12 Cor Nouws 2010-12-22 05:04:05 UTC
"why do I get different results and problems every time :-("
Reply to myself: Maybe because you work with different files :-)

Looks as if the freezing while trying to send is related to a file where there is a background image in a table. (So such a bad idea, though ?)

I think you have to look to the straces for info on that?
Comment 13 Caolán McNamara 2010-12-22 05:12:47 UTC
That email log looks like a successful email process.

So best thing is to provide a .odt which is a guaranteed hanger when mailed as .pdf. And if it hangs on being emailed as pdf does it also hang when just being saved as pdf ?
Comment 14 Cor Nouws 2010-12-22 05:25:30 UTC
Created attachment 41371 [details]
tst doc that hangs when mail-merge mailing

  "That email log looks like a successful email process."

Yes, I thougth I wrote that.

  "So best thing is to provide a .odt which is a guaranteed hanger when 
    mailed as .pdf." 

See attached.

  " And if it hangs on being emailed as pdf does it also hang when just 
    being saved as pdf ?

Tried that earlier - works fine,
Comment 15 Cor Nouws 2010-12-22 05:27:46 UTC
additional info:

the office freezes when merge-mailing the document.
However, the first of the serie is successfully send.
Comment 16 Cor Nouws 2011-01-03 01:11:25 UTC
additional info: 

https://bugs.freedesktop.org/show_bug.cgi?id=32790 :
"Mail Merge > Send via mail" uses mailaddress from first record for all records
Comment 17 Cor Nouws 2011-03-07 05:16:21 UTC
changed summary. It was " Send document as PDF with backgound image in table freezes LibO"

Now with additional trouble and tests, it turned out that the problem is that the document has a table that starts right at the top.
Thus, when you ad an paragraph before the table, the mail merge, sending via mail works fine.

This bug is also present in LibO 331 but not in OOo 330
Comment 18 Caolán McNamara 2011-03-18 04:11:20 UTC
reproducible
Comment 19 Caolán McNamara 2011-03-18 05:29:03 UTC
So, all the foo around checking the emailmerge python thing itself turns out to be irreverent, its writer that's hanging on copying the table into a temp doc
Comment 20 Caolán McNamara 2011-03-18 05:42:17 UTC
Headline issue fixed in master as:
http://cgit.freedesktop.org/libreoffice/writer/commit/?id=7482695994c5f6bf9995748944e38d2792aaed92
Comment 21 Cor Nouws 2011-03-18 05:49:10 UTC
Good news :-)

so maybe the same in bug 34187 ?
I have not seen any comment on my suggestion here
https://bugs.freedesktop.org/show_bug.cgi?id=34187#c11
Comment 22 Caolán McNamara 2011-03-18 05:56:16 UTC
additionally I think the existence of the flat xml filter causes the "get mime type from suffix to fail" which is another problem for e.g. sending attached .odts
Comment 23 Caolán McNamara 2011-03-18 06:15:54 UTC
Fixed that as http://cgit.freedesktop.org/libreoffice/writer/commit/?id=5c4a455137ae1fc74cdf88fe6d4d315b1948b4c0 to ensure we don't grab the flat xml "odt" mimetype which is empty rather than the normal "odt" mimetype
Comment 24 Caolán McNamara 2011-03-18 06:52:44 UTC
Similarly looking up the pdf export filter by suffix isn't always guaranteed to be the one we want for exporting a writer document, i.e. http://cgit.freedesktop.org/libreoffice/writer/commit/?id=97bce7aad1c3a6f3fd23a3380c79ca9c1515624c
Comment 25 Caolán McNamara 2011-03-18 07:02:53 UTC
*** Bug 31792 has been marked as a duplicate of this bug. ***
Comment 26 Caolán McNamara 2011-03-18 07:04:54 UTC
k, so 

a) reproducible hang: fixed
b) as PDF > no result; as HTML > works, as PDF works: fixed
c) as odt, no mimetype: fixed
Comment 27 Caolán McNamara 2011-03-21 02:22:45 UTC
Got enough acks, and cherry-picked for 3-3 and 3-3-2, not certain it'll make the cut by time for 3.3.2, but we'll see.