Opened 17 years ago

Closed 17 years ago

#4020 closed defect (duplicate)

'lyx --export latex' crashes with segfault

Reported by: john@… Owned by: nobody@…
Priority: high Milestone:
Component: general Version: unspecified
Severity: normal Keywords:
Cc: j.spitzmueller@…

Description

Description of Problem:
I have got LyX integrated with the build process for another software project, with LyX being used to build .tex files containing project documentation. After an update from FC6 to Fedora 7, I am getting a segfault every time I use the commandline 'lyx --export latex doc/book.lyx'. Previously this worked fine with LyX 1.4.3 on Fedora Core 6.

Steps to reproduce the problem:

  1. svn co http://ascendsvn.cheme.cmu.edu/ascend/code/branches/extfn/doc ascdoc [this is about a 1 MB checkout]
  2. lyx --export latex ascdoc/book.lyx

Actual Results:
lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions in Help->Introduction and send us a bug report, if necessary. Thanks !
Bye.

Expected Results:
Nothing Less Than Perfection

How often does this happen?
every time

Additional Information:
Here is a stack trace:

[john@jdpipe ascend]$ gdb --args lyx --export latex doc/book.lyx
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /usr/bin/lyx --export latex doc/book.lyx
[Thread debugging using libthread_db enabled]
[New Thread -1208809776 (LWP 3954)]
[Detaching after fork from child process 3959. (Try `set detach-on-fork off'.)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208809776 (LWP 3954)]
0x083a22b6 in lyx::LyXView::view (this=0x0) at LyXView.cpp:374
374 return &work_area_->bufferView();
(gdb) where
#0 0x083a22b6 in lyx::LyXView::view (this=0x0) at LyXView.cpp:374
#1 0x08188055 in lyx::LyXFunc::getStatus (this=0x916e288, cmd=@0xbf9d6738) at LyXFunc.cpp:388
#2 0x081916c9 in lyx::LyXFunc::dispatch (this=0x916e288, cmd=@0xbf9d6738) at LyXFunc.cpp:802
#3 0x0816dfd2 in lyx::dispatch (action=@0xbf9d6738) at LyX.cpp:1463
#4 0x0831bbce in loadIfNeeded (buffer=<value optimized out>, params=<value optimized out>) at InsetInclude.cpp:408
#5 0x08323930 in lyx::InsetInclude::validate (this=0x91be570, features=@0xbf9d6a44) at InsetInclude.cpp:690
#6 0x081dfaf4 in lyx::Paragraph::Pimpl::validate (this=0x91be068, features=@0xbf9d6a44, layout=@0x91b73b8) at Paragraph.cpp:1007
#7 0x081e022a in lyx::Paragraph::validate (this=0x91be038, features=@0xbf9d6a44) at Paragraph.cpp:1197
#8 0x08081ec8 in std::for_each<std::_List_const_iterator<lyx::Paragraph>, boost::_bi::bind_t<void, boost::_mfi::cmf1<void, lyx::Paragraph, lyx::LaTeXFeatures&>, boost::_bi::list2<boost::arg<1> (*)(), boost::reference_wrapper<lyx::LaTeXFeatures> > > > (first={_M_node = 0x91c5a48}, last=

{_M_node = 0x91a4710}, f=

{f_ = {f_ = (void ( const class lyx::Paragraph::*)(class lyx::LaTeXFeatures &,)) 17023040}, l_ = {<boost::_bi::storage2<boost::arg<1> (*)(),boost::reference_wrapper<lyx::LaTeXFeatures> >> = {<boost::_bi::storage1<boost::arg<1> (*)()>> = {<No data fields>}, a2_ = {t_ = 0xbf9d6a44}}, <No data fields>}}) at ../../boost/boost/bind/mem_fn_template.hpp:231

#9 0x080761bb in lyx::Buffer::validate (this=0x91a3c90, features=@0xbf9d6a44) at Buffer.cpp:1272
#10 0x080783b2 in lyx::Buffer::writeLaTeXSource (this=0x91a3c90, os=@0xbf9d6b8c, original_path=@0xbf9d6e20, runparams_in=@0xbf9d6d24, output_preamble=true,

output_body=true) at Buffer.cpp:942

#11 0x08079f2e in lyx::Buffer::makeLaTeXFile (this=0x91a3c90, fname=@0xbf9d6dac, original_path=@0xbf9d6e20, runparams=@0xbf9d6d24, output_preamble=true,

output_body=true) at Buffer.cpp:899

#12 0x08105ae1 in lyx::Exporter::Export (buffer=0x91a3c90, format=@0xbf9d6f54, put_in_tempdir=false, result_file=@0xbf9d6f14) at Exporter.cpp:201
#13 0x08107aac in lyx::Exporter::Export (buffer=0x91a3c90, format=@0xbf9d6f54, put_in_tempdir=false) at Exporter.cpp:270
#14 0x0807505c in lyx::Buffer::dispatch (this=0x91a3c90, func=@0xbf9d6f84, result=0xbf9d700d) at Buffer.cpp:1438
#15 0x0807512b in lyx::Buffer::dispatch (this=0x91a3c90, command=@0xbf9d7050, result=0xbf9d700d) at Buffer.cpp:1428
#16 0x0817db2c in lyx::LyX::exec (this=0xbf9d704c, argc=@0xbf9d7080, argv=0xbf9d7104) at LyX.cpp:423
#17 0x08066040 in main (argc=2, argv=0x91ba7fc) at main.cpp:48
#18 0x00917f70 in libc_start_main () from /lib/libc.so.6
#19 0x08065ea1 in _start ()
(gdb) q

Also, FYI:

[john@jdpipe ~]$ lyx --version
LyX 1.5.0rc2 (Wed, Jun 27, 2007)
Built on Jul 2 2007, 06:45:30
Configuration

Host type: i386-redhat-linux-gnu
Special build flags: aiksaurus pch warnings use-aspell use-ispell
C Compiler: gcc
C Compiler LyX flags:
C Compiler flags: -Wextra -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
C++ Compiler: g++ (4.1.2)
C++ Compiler LyX flags:
C++ Compiler flags: -Wextra -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
Linker flags:
Linker user flags:
Qt 4 Frontend:

Qt 4 version: 4.3.0

Packaging: posix
LyX binary dir: /usr/bin
LyX files dir: /usr/share/lyx

Change History (2)

comment:1 by Juergen Spitzmueller, 17 years ago

Cc: j.spitzmueller@… added

does the document contain child documents (includes)? If so, this is a
duplicate of #4018.

comment:2 by john@…, 17 years ago

Resolution: duplicate
Status: newclosed

Yes, contains subdocuments. Will mark as duplicate and add bug to Fedora bugzilla.

* This bug has been marked as a duplicate of 4018 *

Note: See TracTickets for help on using tickets.