assert failed when using text search while page still loading
(gdb) bt #0 0xb778a424 in __kernel_vsyscall () #1 0xb70b2661 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb70b5a92 in *__GI_abort () at abort.c:92 #3 0xb70ab878 in *__GI___assert_fail ( assertion=0x816049e "i >= 0 && this->num - i > 0", file=0x816048e "../lout/misc.hh", line=167, function=0x8160540 "T* lout::misc::SimpleVector<T>::getRef(int) const [with T = dw::Textblock::Line]") at assert.c:81 #4 0x080a73f6 in lout::misc::SimpleVector<dw::Textblock::Line>::getRef ( this=0x905df50, i=-1) at ../lout/misc.hh:167 #5 0x080a8447 in dw::Textblock::TextblockIterator::getAllocation ( this=0x885ef98, start=0, end=5, allocation=0xbff2e818) at textblock_iterator.cc:288 #6 0x080c65f7 in dw::core::Iterator::scrollTo (it1=0x885ef98, it2=0x948efe0, start=0, end=5, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.cc:108 #7 0x080c621e in dw::core::DeepIterator::scrollTo (it1=0x88e86e8, it2=0x885efb8, start=0, end=5, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.hh:229 #8 0x080c629a in dw::core::CharIterator::scrollTo (it1=0x89c6e60, it2=0x8872900, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.hh:265 #9 0x080c5bcb in dw::core::FindtextState::search (this=0x8a02a40, key=0x88dbd70 "dillo", caseSens=false, backwards=false) at findtext.cc:120 #10 0x08057cad in dw::core::Layout::search (this=0x8a02970, str=0x88dbd70 "dillo", caseSens=false, backwards=0) at ../dw/layout.hh:444 #11 0x080579e5 in a_UIcmd_findtext_search (bw=0x8ae1940, key=0x88dbd70 "dillo", case_sens=0, backward=0) at uicmd.cc:1484 #12 0x0808c7c3 in Findbar::search_cb (vfb=0x8a08808) at findbar.cc:86 #13 0x081075e1 in Fl_Widget::do_callback (this=0x8882020, o=0x8882020, arg=0x8a08808) at Fl_Widget.cxx:328 #14 0x080e305d in do_callback (this=0x8882020) at ../FL/Fl_Widget.H:840 #15 Fl_Button::handle (this=0x8882020, event=12) at Fl_Button.cxx:164 #16 0x080503c9 in TipWinButton::handle (this=0x8882020, e=12) at tipwin.cc:158 #17 0x08050536 in CustButton::handle (this=0x8882020, e=12) at tipwin.cc:194 #18 0x080e4b64 in send (o=o at entry=0x8882020, event=event at entry=12) at Fl_Group.cxx:98 #19 0x080e5755 in Fl_Group::handle (this=0x8a08808, event=12) at Fl_Group.cxx:185 #20 0x0808cd72 in Findbar::handle (this=0x8a08808, event=12) at findbar.cc:192 #21 0x080e4b64 in send (o=o at entry=0x8a08808, event=event at entry=12) at Fl_Group.cxx:98 #22 0x080e5755 in Fl_Group::handle (this=0x88e9218, event=12) at Fl_Group.cxx:185 #23 0x08052f2f in UI::handle (this=0x88e9218, event=12) at ui.cc:788 #24 0x080dc5d2 in send (event=event at entry=12, to=to at entry=0x88e9218, window=<optimized out>) at Fl.cxx:1143 #25 0x080dd421 in Fl::handle_ (e=12, window=0x8806268) at Fl.cxx:1401 #26 0x080dd368 in Fl::handle_ (e=8, window=0x8806268) at Fl.cxx:1379 #27 0x0810bbc0 in fl_handle (thisevent=...) at Fl_x.cxx:2144 #28 0x0810d89e in do_queued_events () at Fl_x.cxx:210 #29 0x0810d93f in fl_wait (time_to_wait=0) at Fl_x.cxx:235 #30 0x080de3d2 in Fl::wait (time_to_wait=<optimized out>, time_to_wait at entry=<error reading variable: Could not find type for DW_OP_GNU_const_type>) at Fl.cxx:566 #31 0x080de46e in Fl::run () at Fl.cxx:589 #32 0x0804f933 in main (argc=1, argv=0xbff2f214) at dillo.cc:586 I see that it's unhappy in Textblock::TextblockIterator::getAllocation() where index was 34 and lineIndex = textblock->findLineOfWord (index); results in -1, which the getRef() doesn't want at all...
Here's a swag: - the search and the assembly of the page are in separate threads - the search finds the word - layout hasn't been done yet - so there is no line number to find Presumably, if things were earlier in the assembly of the page, the search would refuse to start, because it couldn't see the text to search. Suggested bodge: whatever chain of pointers the search follows, in order to decide whether to start, keep more of them private inside the page assembler, for longer, so that the searcher can't see this transient state. In the data structure, document the set of things that must be true before it can be published to other threads. On 10/24/14, eocene <eocene at gmx.com> wrote:
(gdb) bt #0 0xb778a424 in __kernel_vsyscall () #1 0xb70b2661 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb70b5a92 in *__GI_abort () at abort.c:92 #3 0xb70ab878 in *__GI___assert_fail ( assertion=0x816049e "i >= 0 && this->num - i > 0", file=0x816048e "../lout/misc.hh", line=167, function=0x8160540 "T* lout::misc::SimpleVector<T>::getRef(int) const [with T = dw::Textblock::Line]") at assert.c:81 #4 0x080a73f6 in lout::misc::SimpleVector<dw::Textblock::Line>::getRef ( this=0x905df50, i=-1) at ../lout/misc.hh:167 #5 0x080a8447 in dw::Textblock::TextblockIterator::getAllocation ( this=0x885ef98, start=0, end=5, allocation=0xbff2e818) at textblock_iterator.cc:288 #6 0x080c65f7 in dw::core::Iterator::scrollTo (it1=0x885ef98, it2=0x948efe0, start=0, end=5, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.cc:108 #7 0x080c621e in dw::core::DeepIterator::scrollTo (it1=0x88e86e8, it2=0x885efb8, start=0, end=5, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.hh:229 #8 0x080c629a in dw::core::CharIterator::scrollTo (it1=0x89c6e60, it2=0x8872900, hpos=dw::core::HPOS_INTO_VIEW, vpos=dw::core::VPOS_CENTER) at iterator.hh:265 #9 0x080c5bcb in dw::core::FindtextState::search (this=0x8a02a40, key=0x88dbd70 "dillo", caseSens=false, backwards=false) at findtext.cc:120 #10 0x08057cad in dw::core::Layout::search (this=0x8a02970, str=0x88dbd70 "dillo", caseSens=false, backwards=0) at ../dw/layout.hh:444 #11 0x080579e5 in a_UIcmd_findtext_search (bw=0x8ae1940, key=0x88dbd70 "dillo", case_sens=0, backward=0) at uicmd.cc:1484 #12 0x0808c7c3 in Findbar::search_cb (vfb=0x8a08808) at findbar.cc:86 #13 0x081075e1 in Fl_Widget::do_callback (this=0x8882020, o=0x8882020, arg=0x8a08808) at Fl_Widget.cxx:328 #14 0x080e305d in do_callback (this=0x8882020) at ../FL/Fl_Widget.H:840 #15 Fl_Button::handle (this=0x8882020, event=12) at Fl_Button.cxx:164 #16 0x080503c9 in TipWinButton::handle (this=0x8882020, e=12) at tipwin.cc:158 #17 0x08050536 in CustButton::handle (this=0x8882020, e=12) at tipwin.cc:194 #18 0x080e4b64 in send (o=o at entry=0x8882020, event=event at entry=12) at Fl_Group.cxx:98 #19 0x080e5755 in Fl_Group::handle (this=0x8a08808, event=12) at Fl_Group.cxx:185 #20 0x0808cd72 in Findbar::handle (this=0x8a08808, event=12) at findbar.cc:192 #21 0x080e4b64 in send (o=o at entry=0x8a08808, event=event at entry=12) at Fl_Group.cxx:98 #22 0x080e5755 in Fl_Group::handle (this=0x88e9218, event=12) at Fl_Group.cxx:185 #23 0x08052f2f in UI::handle (this=0x88e9218, event=12) at ui.cc:788 #24 0x080dc5d2 in send (event=event at entry=12, to=to at entry=0x88e9218, window=<optimized out>) at Fl.cxx:1143 #25 0x080dd421 in Fl::handle_ (e=12, window=0x8806268) at Fl.cxx:1401 #26 0x080dd368 in Fl::handle_ (e=8, window=0x8806268) at Fl.cxx:1379 #27 0x0810bbc0 in fl_handle (thisevent=...) at Fl_x.cxx:2144 #28 0x0810d89e in do_queued_events () at Fl_x.cxx:210 #29 0x0810d93f in fl_wait (time_to_wait=0) at Fl_x.cxx:235 #30 0x080de3d2 in Fl::wait (time_to_wait=<optimized out>, time_to_wait at entry=<error reading variable: Could not find type for DW_OP_GNU_const_type>) at Fl.cxx:566 #31 0x080de46e in Fl::run () at Fl.cxx:589 #32 0x0804f933 in main (argc=1, argv=0xbff2f214) at dillo.cc:586
I see that it's unhappy in Textblock::TextblockIterator::getAllocation() where index was 34 and lineIndex = textblock->findLineOfWord (index); results in -1, which the getRef() doesn't want at all...
_______________________________________________ Dillo-dev mailing list Dillo-dev at dillo.org http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
I've problems to reproduce it, but I'm guessing ... On Do, Okt 23, 2014, eocene wrote:
(gdb) bt #0 0xb778a424 in __kernel_vsyscall () #1 0xb70b2661 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb70b5a92 in *__GI_abort () at abort.c:92 #3 0xb70ab878 in *__GI___assert_fail ( assertion=0x816049e "i >= 0 && this->num - i > 0", file=0x816048e "../lout/misc.hh", line=167, function=0x8160540 "T* lout::misc::SimpleVector<T>::getRef(int) const [with T = dw::Textblock::Line]") at assert.c:81 #4 0x080a73f6 in lout::misc::SimpleVector<dw::Textblock::Line>::getRef ( this=0x905df50, i=-1) at ../lout/misc.hh:167 #5 0x080a8447 in dw::Textblock::TextblockIterator::getAllocation ( this=0x885ef98, start=0, end=5, allocation=0xbff2e818) at textblock_iterator.cc:288
A line is missing, but everything else seems OK. I guess that this has to do with the new line breaking (introduced with release 3.0.3), where some words are not immediately assigned to a line. I'll soon work on this. Sebastian
On Fri, Oct 24, 2014, Sebastian Geerken wrote:
I've problems to reproduce it, but I'm guessing ...
On Do, Okt 23, 2014, eocene wrote:
(gdb) bt #0 0xb778a424 in __kernel_vsyscall () #1 0xb70b2661 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb70b5a92 in *__GI_abort () at abort.c:92 #3 0xb70ab878 in *__GI___assert_fail ( assertion=0x816049e "i >= 0 && this->num - i > 0", file=0x816048e "../lout/misc.hh", line=167, function=0x8160540 "T* lout::misc::SimpleVector<T>::getRef(int) const [with T = dw::Textblock::Line]") at assert.c:81 #4 0x080a73f6 in lout::misc::SimpleVector<dw::Textblock::Line>::getRef ( this=0x905df50, i=-1) at ../lout/misc.hh:167 #5 0x080a8447 in dw::Textblock::TextblockIterator::getAllocation ( this=0x885ef98, start=0, end=5, allocation=0xbff2e818) at textblock_iterator.cc:288
A line is missing, but everything else seems OK. I guess that this has to do with the new line breaking (introduced with release 3.0.3), where some words are not immediately assigned to a line. I'll soon work on this.
I just pushed a fix. Does the problem still occur? Sebastian
Sebastian wrote:
On Fri, Oct 24, 2014, Sebastian Geerken wrote:
I've problems to reproduce it, but I'm guessing ...
On Do, Okt 23, 2014, eocene wrote:
(gdb) bt #0 0xb778a424 in __kernel_vsyscall () #1 0xb70b2661 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb70b5a92 in *__GI_abort () at abort.c:92 #3 0xb70ab878 in *__GI___assert_fail ( assertion=0x816049e "i >= 0 && this->num - i > 0", file=0x816048e "../lout/misc.hh", line=167, function=0x8160540 "T* lout::misc::SimpleVector<T>::getRef(int) const [with T = dw::Textblock::Line]") at assert.c:81 #4 0x080a73f6 in lout::misc::SimpleVector<dw::Textblock::Line>::getRef ( this=0x905df50, i=-1) at ../lout/misc.hh:167 #5 0x080a8447 in dw::Textblock::TextblockIterator::getAllocation ( this=0x885ef98, start=0, end=5, allocation=0xbff2e818) at textblock_iterator.cc:288
A line is missing, but everything else seems OK. I guess that this has to do with the new line breaking (introduced with release 3.0.3), where some words are not immediately assigned to a line. I'll soon work on this.
I just pushed a fix. Does the problem still occur?
I'll probably be lucky to trigger the right conditions again, but I'll try to make a habit of searching for text while waiting for pages to load and render...
participants (3)
-
eocene@gmx.com
-
james.from.wellington@gmail.com
-
sgeerken@dillo.org