On Sun, May 14, 2006 at 08:52:37PM +0300, Mattias Nordstrom wrote:
> Have you been able to backtrace the segfault?

Yes I have been able, but it is not interesting ;(

[EMAIL PROTECTED]:~/work/vmime$ ./a.out hello.eml 
Clam Analyze
Subject: Hello from VMime!
Segmentation fault

(gdb) set args hello.eml
(gdb) run
Starting program: /home/florin/work/vmime/a.out hello.eml
Clam Analyze
Subject: Hello from VMime!

Program received signal SIGSEGV, Segmentation fault.
0x00002aef79b634da in std::vector<vmime::utility::ref<vmime::word>,
std::allocator<vmime::utility::ref<vmime::word> > >::begin () from
/usr/lib/libvmime.so.0
(gdb) bt
#0  0x00002aef79b634da in std::vector<vmime::utility::ref<vmime::word>, 
std::allocator<vmime::utility::ref<vmime::word> > >::begin ()
   from /usr/lib/libvmime.so.0
#1  0x00002aef79b61a03 in vmime::text::getWholeBuffer ()
   from /usr/lib/libvmime.so.0
#2  0x000000000040314b in main ()

> Running this code:

Your code runs fine. Mine crashes, and the difference is... dumping the
second header!

--- vmime.cpp   2006-05-14 13:06:11.000000000 -0500
+++ vmime_florin.cpp    2006-05-14 13:06:05.000000000 -0500
@@ -25,4 +25,8 @@
 std::cout << "Subject: " <<
 hdr->Subject()->getValue().dynamicCast<vmime::text>()->getConvertedText(ch)
 << std::endl;
+
+std::cout << "From: " <<
+hdr->From()->getValue().dynamicCast<vmime::text>()->getConvertedText(ch)
+<< std::endl;
 }

---cut here---

You can replace hdr->From() with hdr->To(), with no change in the observable
behavior.

florin

-- 
There was a typo, but on the wrong page.
   -- Vipin Kumar

Attachment: signature.asc
Description: Digital signature

Reply via email to