On Mon, Oct 02, 2006 at 09:06:01AM +0200, Georg Baum wrote:
> Enrico Forestieri wrote:
>
> > I think that nothing is difficult, there only are things that you know
> > how to do and things that you don't know how to do...
> > When you don't know how to do something, then that is a difficult thing.
>
> If you tell me where the crash appears I can provide you with a workaround.
Thanks Georg, but I can't on cygwin (see below).
> >> You could dispatch them to the 1byte versions if you stick to
> >> latin1, or to the 2byte versions for UCS2, and you just need to implement
> >> those that lead to a crash. You do not need debugging symbols for that: A
> >> backtrace is also possible without.
> >
> > I'll see what I can do, but I am always scared in a way or another by
> > gdb on Windows.
>
> I can understand that, I don't like gdb either, but in this case you only
> need
>
> gdb lyx.exe
> r
> (make it crash)
> bt
I attach here the bt I get on cygwin. Do you see what I mean when I say
that I am always scared in a way or another by gdb on Windows? :(
When running LyX outside gdb I simply get:
Abort (core dumped)
Anyway, I can reproduce the crash on both linux and solaris.
All I have to do is replacing "#define SIZEOF_WCHAR_T 4" with
"#define SIZEOF_WCHAR_T 2" in src/config.h (after configuring)
and then "touch src/support/types.h" before "make".
Please attached find the bt's I get on linux and solaris. I use GCC 3.4.4
on cygwin, GCC 3.4.3 on solaris, and GCC 4.1.2 on linux (debian/testing).
I get the crash immediately at start on linux, but only after trying to
load a file (or even File->New) on cygwin and solaris (this must be
related to the GCC version).
The bt's on linux and solaris point to the same problem but I am lost
here as I am not able to interpret what is happening :(
--
Enrico
(gdb) r
Starting program: /usr/local/src/lyx/lyx-devel/build-cygwin/src/lyx-qt4.exe
[1] + 1316 Suspended (tty output) gdb ./src/lyx-qt4.exe
ef:/usr/local/src/lyx/lyx-devel/build-cygwin> fg
gdb ./src/lyx-qt4.exe
---Type <return> to continue, or q <return> to quit---
Loaded symbols for /usr/bin/cygwin1.dll
Loaded symbols for /c/WINNT/system32/ADVAPI32.DLL
Loaded symbols for /c/WINNT/system32/KERNEL32.DLL
Loaded symbols for /c/WINNT/system32/rpcrt4.dll
Loaded symbols for /usr/bin/cygpng12.dll
Loaded symbols for /usr/bin/cygz.dll
Loaded symbols for /usr/bin/cygaspell-15.dll
Loaded symbols for /usr/bin/cygiconv-2.dll
Loaded symbols for /c/WINNT/system32/COMDLG32.DLL
Loaded symbols for /c/WINNT/system32/SHLWAPI.DLL
Loaded symbols for /c/WINNT/system32/GDI32.DLL
Loaded symbols for /c/WINNT/system32/USER32.DLL
Loaded symbols for /c/WINNT/system32/msvcrt.dll
Loaded symbols for /c/WINNT/system32/comctl32.dll
Loaded symbols for /c/WINNT/system32/SHELL32.DLL
Loaded symbols for /c/WINNT/system32/imm32.dll
Loaded symbols for /c/WINNT/system32/OLE32.DLL
Loaded symbols for /c/WINNT/system32/OLEAUT32.DLL
Loaded symbols for /c/WINNT/system32/WINMM.DLL
Loaded symbols for /c/WINNT/system32/WINSPOOL.DRV
Loaded symbols for /c/WINNT/system32/mpr.dll
Loaded symbols for /c/WINNT/system32/ws2_32.dll
Loaded symbols for /c/WINNT/system32/WS2HELP.DLL
Loaded symbols for /usr/local/bin/cygAiksaurus-1-2-0.dll
Program exited with code 0103000.
(gdb) bt
No stack.
(gdb)
(gdb) r
Starting program: /usr/local/src/lyx/lyx-1.5.0svn/build/src/lyx-qt3
[Thread debugging using libthread_db enabled]
[New Thread -1491224896 (LWP 25690)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
terminate called after throwing an instance of 'std::bad_cast'
what(): St8bad_cast
Program received signal SIGABRT, Aborted.
[Switching to Thread -1491224896 (LWP 25690)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xa723d821 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xa723efb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xa741fb74 in __gnu_cxx::__verbose_terminate_handler ()
from /usr/lib/libstdc++.so.6
#4 0xa741d595 in std::set_unexpected () from /usr/lib/libstdc++.so.6
#5 0xa741d5d2 in std::terminate () from /usr/lib/libstdc++.so.6
#6 0xa741d70a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xa73b3b25 in std::__throw_bad_cast () from /usr/lib/libstdc++.so.6
#8 0x08532f2c in boost::basic_format<unsigned int, std::char_traits<unsigned
int>, std::allocator<unsigned int> >::parse ()
#9 0x08533297 in boost::basic_format<unsigned int, std::char_traits<unsigned
int>, std::allocator<unsigned int> >::basic_format ()
#10 0x0852ca54 in lyx::support::bformat<std::basic_string<unsigned int,
std::char_traits<unsigned int>, std::allocator<unsigned int> > > ()
#11 0x08152256 in LyX::queryUserLyXDir ()
#12 0x08153875 in LyX::init ()
#13 0x0815503f in LyX::exec2 ()
#14 0x083a7ff4 in lyx_gui::exec ()
#15 0x0815712d in LyX::priv_exec ()
#16 0x0815724f in LyX::exec ()
#17 0x08062d8e in main ()
(gdb) r
Starting program: /export/src/lyx-1.5.0svn/build/src/lyx-qt3
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
Drawing string
Drawing lyx::char_type const * s
terminate called after throwing an instance of 'std::bad_cast'
what(): St8bad_cast
Program received signal SIGABRT, Aborted.
0xfdfc0f90 in _lwp_kill () from /lib/libc.so.1
(gdb) bt
#0 0xfdfc0f90 in _lwp_kill () from /lib/libc.so.1
#1 0xfdf5fd80 in raise () from /lib/libc.so.1
#2 0xfdf3ffa0 in abort () from /lib/libc.so.1
#3 0xfe5b9a64 in __gnu_cxx::__verbose_terminate_handler ()
from /usr/sfw/lib/libstdc++.so.6
#4 0xfe5b776c in __cxxabiv1::__terminate () from /usr/sfw/lib/libstdc++.so.6
#5 0xfe5b77ac in std::terminate () from /usr/sfw/lib/libstdc++.so.6
#6 0xfe5b7924 in __cxa_throw () from /usr/sfw/lib/libstdc++.so.6
#7 0xfe5571c0 in std::__throw_bad_cast () from /usr/sfw/lib/libstdc++.so.6
#8 0x007953f4 in boost::basic_format<unsigned long, std::char_traits<unsigned
long>, std::allocator<unsigned long> >::parse ()
#9 0x007955e8 in boost::basic_format<unsigned long, std::char_traits<unsigned
long>, std::allocator<unsigned long> >::basic_format ()
#10 0x00558cac in lyx::support::bformat<std::basic_string<unsigned long,
std::char_traits<unsigned long>, std::allocator<unsigned long> > > ()
#11 0x0021f18c in LyXFunc::open ()
#12 0x002229f4 in LyXFunc::dispatch ()
#13 0x00457df4 in lyx::frontend::QLToolbar::clicked ()
#14 0x00457e5c in lyx::frontend::QLToolbar::qt_invoke ()
#15 0xfea95d6c in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#16 0xfea96680 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#17 0xfeacb1dc in QWidget::event () from /opt/qt/lib/libqt-mt.so.3
#18 0xfea3c4e0 in QApplication::internalNotify ()
---Type <return> to continue, or q <return> to quit---
from /opt/qt/lib/libqt-mt.so.3
#19 0xfea3c724 in QApplication::notify () from /opt/qt/lib/libqt-mt.so.3
#20 0xfe9dafec in QETWidget::translateMouseEvent ()
from /opt/qt/lib/libqt-mt.so.3
#21 0xfe9d9284 in QApplication::x11ProcessEvent ()
from /opt/qt/lib/libqt-mt.so.3
#22 0xfe9eb268 in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
#23 0xfea520a0 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
#24 0xfea51f88 in QEventLoop::exec () from /opt/qt/lib/libqt-mt.so.3
#25 0xfea3b474 in QApplication::exec () from /opt/qt/lib/libqt-mt.so.3
#26 0x003b6a28 in lyx::frontend::Application::start ()
#27 0x00210470 in LyX::exec2 ()
#28 0x004095d4 in lyx_gui::exec ()
#29 0x00210d74 in LyX::priv_exec ()
#30 0x00211264 in LyX::exec ()
#31 0x0015a6f0 in main ()