On 04/08/2013 10:18 AM, Kornel Benko wrote:
Am Sonntag, 7. April 2013 um 19:54:35, schrieb Richard Heck
<rgh...@lyx.org>
> I've pretty much completed this project, but before I commit it, let me
> post the changes to lassert.{h,cpp}, so people can comment on them if
> they wish to do so.
>
> Richard
You did not commit yet, didn't you?
No, not yet.
Somehow I am getting strange crashes while scrolling wit the mouse.
Here the backtrace of the first 12 levels:
(gdb) bt
#0 0x00007f38f43ae445 in __GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f38f43b1bab in __GI_abort () at abort.c:91
#2 0x0000000000b0fd51 in lyx::lyx_exit (exit_code=1) at
/usr/src/lyx/lyx-git/src/LyX.cpp:235
#3 0x0000000000ab1537 in boost::assertion_failed (expr=0x11ed00f "false",
function=0x11ed020 "void lyx::doAssert(const char*, const char*, long
int)",
file=0x11ecfc0 "/usr/src/lyx/lyx-git/src/support/lassert.cpp", line=37)
at /usr/src/lyx/lyx-git/src/boost.cpp:47
#4 0x0000000000fefc15 in lyx::doAssert (expr=0x10755f8 "par !=
int(paragraphs().size())",
file=0x1075528 "/usr/src/lyx/lyx-git/src/Text2.cpp", line=566)
at /usr/src/lyx/lyx-git/src/support/lassert.cpp:37
#5 0x0000000000a1a6c8 in lyx::Text::setCursor (this=0x2808e70,
cur=..., par=12, pos=0)
at /usr/src/lyx/lyx-git/src/Text2.cpp:566
#6 0x0000000000a1a864 in lyx::Text::setCursorIntern (this=0x2808e70,
cur=..., par=12, pos=0,
setfont=true, boundary=false) at /usr/src/lyx/lyx-git/src/Text2.cpp:593
#7 0x0000000000a1a601 in lyx::Text::setCursor (this=0x2808e70,
cur=..., par=12, pos=0,
setfont=true, boundary=false) at /usr/src/lyx/lyx-git/src/Text2.cpp:556
#8 0x000000000099ae61 in lyx::TextMetrics::setCursorFromCoordinates
(this=0x231c3b8, cur=...,
x=0, y=44) at /usr/src/lyx/lyx-git/src/TextMetrics.cpp:1576
#9 0x0000000000a03295 in lyx::BufferView::setCursorFromScrollbar
(this=0x2319e70)
at /usr/src/lyx/lyx-git/src/BufferView.cpp:666
#10 0x0000000000e055f0 in lyx::frontend::GuiWorkArea::scrollTo
(this=0x27dc710, value=66)
at /usr/src/lyx/lyx-git/src/frontends/qt4/GuiWorkArea.cpp:673
#11 0x0000000000e0bb24 in
lyx::frontend::GuiWorkArea::qt_static_metacall (_o=0x27dc710,
_c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff084f9140)
at /usr/BUILD/BuildLyxGit/src/frontends/qt4/moc_GuiWorkArea.cpp:67
#12 0x00007f38f52ed281 in QMetaObject::activate (sender=0x28c13c0,
m=<optimized out>,
local_signal_index=<optimized out>, argv=0x7fff084f9140) at
kernel/qobject.cpp:3547
...
Can someone make sense out of it?
The crash may be dependent on preferences, because I could not make it
crash on fresh
userdir.
It certainly looks like you must have "cursor follows scrollbar" set. Is
that the difference from the fresh userdir?
In any event, the assertion is here:
void Text::setCursor(CursorSlice & cur, pit_type par, pos_type pos)
{
LASSERT(par != int(paragraphs().size()), /**/);
cur.pit() = par;
cur.pos() = pos;
I'm not sure why we are making exactly this check.
Richard