On Apr 20, 2006, at 1:28 PM, Georg Baum wrote:

Bennett Helm wrote:

Sure ... but I'll need more explicit instructions on doing this.
(Also: which file is isFileReadable in?)

It is in src/support/filetools.C.

The problem is that isFileReadable is called very often, so an unconditional breakpoint does not work. Unfortunately conditional breakpoints don't work
with strings in gdb, so you have to apply the attached patch.

OK. Patch applied. Start gdb, and here's the output:

(gdb) b 'lyx::support::breaker()'
Breakpoint 1 at 0x157244: file filetools.C, line 146.
(gdb) r
Starting program: /Applications/LyX-test.app/Contents/MacOS/lyx
Reading symbols for shared libraries .............................................................. ....... done
Reading symbols for shared libraries . done
Menu warning: menu entry "Plain Text as Lines..." does not contain shortcut `A'.
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
LyXComm: Pipe /Users/bennett/Library/Application Support/ LyX-1.4svn/.lyxpipe.in already exists. If no other LyX program is active, please delete the pipe by hand and try again.

Breakpoint 1, lyx::support::breaker () at filetools.C:146
146     }
(gdb) c
Continuing.

Breakpoint 1, lyx::support::breaker () at filetools.C:146
146     }
(gdb) c
Continuing.

Breakpoint 1, lyx::support::breaker () at filetools.C:146
146     }
(gdb) c
Continuing.
path_posix_windows.cpp:235: failed assertion `src.size() == std::strlen( src.c_str() )'

Program received signal SIGABRT, Aborted.
0x90047e4c in kill ()
(gdb) bt
#0  0x90047e4c in kill ()
#1  0x9012dff4 in abort ()
#2  0x001b5bac in __eprintf () at insetbibitem.C:160
#3 0x00139890 in boost::filesystem::path::m_path_append (this=0xbfffc560, [EMAIL PROTECTED], checker=0x1390c4 <boost::filesystem::no_check(std::string const&)>) at /usr/include/ gcc/darwin/3.3/c++/bits/basic_string.h:901 #4 0x00139440 in boost::filesystem::path::path (this=0xbfffc560, [EMAIL PROTECTED]) at path_posix_windows.cpp:203 #5 0x001572d8 in lyx::support::isFileReadable ([EMAIL PROTECTED]) at filetools.C:155 #6 0x00151674 in (anonymous namespace)::normalize_name ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at insetbibtex.C:116 #7 0x00151eb4 in InsetBibtex::latex (this=0x1153c3b0, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at /usr/ include/gcc/darwin/3.3/c++/bits/stl_alloc.h:652 #8 0x000f5014 in Paragraph::Pimpl::simpleTeXSpecialChars (this=0x1153c360, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], c=1 '\001') at paragraph_pimpl.C:582 #9 0x000ef924 in Paragraph::simpleTeXOnePar (this=0xe019538, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../boost/ boost/shared_ptr.hpp:246 #10 0x000e7db0 in (anonymous namespace)::TeXOnePar ([EMAIL PROTECTED], [EMAIL PROTECTED], pit={<_List_iterator_base> = {_M_node = 0xe019530}, <No data fields>}, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at /usr/include/gcc/ darwin/3.3/c++/bits/stl_iterator_base_funcs.h:112 #11 0x000e8850 in latexParagraphs ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at output_latex.C:528 #12 0x000445c4 in Buffer::makeLaTeXFile (this=0x115325c0, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], output_preamble=3221214256, output_body=9787024) at /usr/include/gcc/ darwin/3.3/c++/bits/stl_alloc.h:656 #13 0x00043b80 in Buffer::makeLaTeXFile (this=0x115325c0, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], output_preamble=true, output_body=true) at buffer.C:818 #14 0x0007747c in Exporter::Export (buffer=0x115325c0, [EMAIL PROTECTED], put_in_tempdir=true, [EMAIL PROTECTED]) at exporter.C:215 #15 0x00078284 in Exporter::preview (buffer=0x115325c0, [EMAIL PROTECTED]) at exporter.C:273 #16 0x000acfe8 in LyXFunc::dispatch (this=0xd94ddd0, [EMAIL PROTECTED]) at lyxfunc.C:848 #17 0x000a9144 in LyXFunc::processKeySym (this=0xd94ddd0, keysym={px = 0x1152e760, pn = {pi_ = 0xd94f2a0}}, state=ctrl) at lyxfunc.C:331 #18 0x00009ab8 in BufferView::Pimpl::workAreaKeyPress (this=0xd94e580, key=Cannot access memory at address 0x0
) at frontends/LyXView.h:83
#19 0x00003e94 in BufferView::workAreaKeyPress (this=0x0, key=Cannot access memory at address 0x0
) at ../boost/boost/detail/sp_counted_base_gcc_ppc.hpp:167
#20 0x0042391c in QContentPane::keyeventTimeout (this=0xd94eaf0) at ../../../boost/boost/detail/sp_counted_base_gcc_ppc.hpp:167 #21 0x005257fc in QContentPane::qt_invoke (this=0xd94eaf0, _id=47, _o=0xbfffe720) at QContentPane_moc.C:91 #22 0x00279e88 in QObject::activate_signal () at ControlCommandBuffer.C:137 #23 0x00279d70 in QObject::activate_signal () at ControlCommandBuffer.C:137
#24 0x003b7a78 in QTimer::event () at GraphicsCacheItem.C:448
#25 0x0025f6a8 in QApplication::internalNotify () at /usr/include/gcc/ darwin/3.3/c++/bits/stl_alloc.h:656 #26 0x0025f2a0 in QApplication::notify () at /usr/include/gcc/darwin/ 3.3/c++/bits/stl_alloc.h:656
#27 0x004270a0 in QEventLoop::macHandleTimer () at QLPainter.C:250
#28 0x0028adb0 in QApplication::globalEventProcessor () at lcolorcache.C:47
#29 0x931d7794 in DispatchEventToHandlers ()
#30 0x931d6eec in SendEventToEventTargetInternal ()
#31 0x931d6d68 in SendEventToEventTargetWithOptions ()
#32 0x931de0c8 in ToolboxEventDispatcherHandler ()
#33 0x931d79e4 in DispatchEventToHandlers ()
#34 0x931d6eec in SendEventToEventTargetInternal ()
#35 0x931ddc8c in SendEventToEventTarget ()
#36 0x0028a554 in qt_mac_send_event () at lcolorcache.C:47
#37 0x00427fb0 in QEventLoop::processEvents () at QLPainter.C:250
#38 0x00406bec in QEventLoop::enterLoop () at GraphicsCacheItem.C:448
#39 0x00406ad8 in QEventLoop::exec () at GraphicsCacheItem.C:448
#40 0x0017cd6c in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:277 #41 0x000981d4 in LyX::priv_exec (this=0xd906e70, [EMAIL PROTECTED], argv=0xbffff820) at lyx_main.C:287 #42 0x00096b14 in LyX::exec ([EMAIL PROTECTED], argv=0xbffff820) at ../ boost/boost/scoped_ptr.hpp:93
#43 0x00002f18 in main (argc=1, argv=0xbffff820) at main.C:47

Reply via email to