Georg,

the attached test case crashes in ExportData::addExternalFile, so
I suspect this is an artefact of your recent changes.

To trigger the crash:
* fire up lyx
* turn instant previewing on (Edit->Preferences dialog, Graphics pane).
* open crash.lyx
* open the External dialog (right click).
* Turn on previewing (LyX View tab) and select 'preview' as the display
  type.
* press 'Apply'

BANG! The backtrace is below, but it dies when accessing 
'externalfiles[format]' where 'format' == 'dvi'.

Any ideas?
Angus


void ExportData::addExternalFile(string const & format,
                                 string const & sourceName,
                                 string const & exportName)
{
        BOOST_ASSERT(lyx::support::AbsolutePath(sourceName));

        lyxerr << "format == " << format << std::endl;
        // Make sure that we have every file only once, otherwise copyFile()
        // would ask several times if it should overwrite a file.
-->     vector<ExportedFile> & files = externalfiles[format];

(gdb) bt
#0  0x080cfb1f in std::_Rb_tree<std::string, std::pair<std::string const, 
std::vector<ExportedFile, std::allocator<ExportedFile> > >, 
std::_Select1st<std::pair<std::string const, std::vector<ExportedFile, 
std::allocator<ExportedFile> > > >, std::less<std::string>, 
std::allocator<std::pair<std::string const, std::vector<ExportedFile, 
std::allocator<ExportedFile> > > > >::lower_bound(std::string const&) (this=0x0, 
[EMAIL PROTECTED]) at stl_tree.h:1319
#1  0x080cec19 in std::map<std::string, std::vector<ExportedFile, 
std::allocator<ExportedFile> >, std::less<std::string>, 
std::allocator<std::pair<std::string const, std::vector<ExportedFile, 
std::allocator<ExportedFile> > > > >::lower_bound(std::string const&) (this=0x0, 
[EMAIL PROTECTED]) at stl_map.h:508
#2  0x080ce37a in std::map<std::string, std::vector<ExportedFile, 
std::allocator<ExportedFile> >, std::less<std::string>, 
std::allocator<std::pair<std::string const, std::vector<ExportedFile, 
std::allocator<ExportedFile> > > > >::operator[](std::string const&) (this=0x0, [EMAIL 
PROTECTED]) at stl_map.h:316
#3  0x080cdc1a in ExportData::addExternalFile(std::string const&, std::string const&, 
std::string const&) (this=0x0, [EMAIL PROTECTED],
    [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../src/exporter.C:294
#4  0x080cdce6 in ExportData::addExternalFile(std::string const&, std::string const&) 
(this=0x0, [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../src/exporter.C:304
#5  0x081f1f81 in lyx::external::(anonymous 
namespace)::updateExternal(InsetExternalParams const&, std::string const&, Buffer 
const&, ExportData&, bool) (
    [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
    external_in_tmpdir=true) at stl_tree.h:202
#6  0x081f222f in lyx::external::writeExternal(InsetExternalParams const&, std::string 
const&, Buffer const&, std::ostream&, ExportData&, bool) (
    [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
    [EMAIL PROTECTED], external_in_tmpdir=true)
    at ../../../src/insets/ExternalSupport.C:286
#7  0x081c9b69 in InsetExternal::latex(Buffer const&, std::ostream&, OutputParams 
const&) const (this=0xa4b55b0, [EMAIL PROTECTED], [EMAIL PROTECTED],
    [EMAIL PROTECTED]) at stl_alloc.h:652
#8  0x081ca042 in (anonymous namespace)::latex_string(InsetExternal const&, Buffer 
const&) ([EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../../src/insets/insetexternal.C:776
#9  0x081ca218 in (anonymous 
namespace)::add_preview_and_start_loading(RenderMonitoredPreview&, InsetExternal 
const&, Buffer const&) ([EMAIL PROTECTED],
    [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../../src/insets/insetexternal.C:791
#10 0x081c9856 in InsetExternal::setParams(InsetExternalParams const&, Buffer const&) 
(this=0xa4b55b0, [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../../src/insets/insetexternal.C:625
#11 0x081c8d86 in InsetExternal::priv_dispatch(LCursor&, FuncRequest&) (
    this=0xa4b55b0, [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../../src/insets/insetexternal.C:452
#12 0x081b491c in InsetBase::dispatch(LCursor&, FuncRequest&) (this=0x0,
    [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../src/insets/insetbase.C:116
#13 0x0815c556 in LyXText::dispatch(LCursor&, FuncRequest&) (this=0xa4bf830,
    [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../src/text3.C:784
#14 0x081ebfb1 in InsetText::priv_dispatch(LCursor&, FuncRequest&) (
    this=0xa4bf7fc, [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../../src/insets/insettext.C:323
#15 0x081b491c in InsetBase::dispatch(LCursor&, FuncRequest&) (
    this=0x0,[EMAIL PROTECTED]) 
    at ../../../src/insets/insetbase.C:116
#16 0x080c4324 in LCursor::dispatch(FuncRequest const&) (this=0xa4354e0,
    [EMAIL PROTECTED]) at dociterator.h:76
#17 0x081019ff in LyXFunc::dispatch(FuncRequest const&, bool) (this=0xa435238,
    [EMAIL PROTECTED], verbose=false) at ../../src/lyxfunc.C:1396
#18 0x082e56ef in lyx::frontend::Kernel::dispatch(FuncRequest const&, bool) const 
(this=0x0, [EMAIL PROTECTED]) at LyXView.h:83
#19 0x082fa3e9 in lyx::frontend::ControlExternal::dispatchParams() (
    this=0xa4bcd58) at Dialog.h:173
#20 0x082e529a in lyx::frontend::Dialog::apply() (this=0xa449c98)
    at ../../../../src/frontends/controllers/Dialog.C:127
#21 0x082e4f6c in lyx::frontend::Dialog::ApplyButton() (this=0xa449c98)
    at ../../../../src/frontends/controllers/Dialog.C:36
#22 0x08268a7c in lyx::frontend::QDialogView::slotApply() (this=0xa4c5170)
    at Dialog.h:236
#23 0x082c67f7 in lyx::frontend::QDialogView::qt_invoke(int, QUObject*) (
    this=0xa4c5170, _id=5, _o=0xbfec4ff0) at QDialogView_moc.C:95
#24 0x005feaf7 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#25 0x005fe99d in QObject::activate_signal(int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#26 0x008edb2e in QButton::clicked() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#27 0x00683636 in QButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#28 0x00633577 in QWidget::event(QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#29 0x0059fe44 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#30 0x0059f673 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#31 0x00545dc8 in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#32 0x00543604 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#33 0x005587d1 in QEventLoop::processEvents(unsigned) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#34 0xbfec5700 in ?? ()
#35 0x0a381774 in ?? ()
#36 0x0a3818f8 in ?? ()
#37 0x00a0f09c in qt_wait_timer_max () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#38 0x083e52e8 in lyxerr ()
#39 0xbfec56c8 in ?? ()
#40 0x00a84cd8 in std::ostream::flush() () from /usr/lib/libstdc++.so.5

Attachment: crash.lyx
Description: application/lyx

Attachment: cvolume.fig
Description: application/xfig

Reply via email to