GNOME Bugzilla – Bug 673992
segfault when two same labels for /page and /section are used
Last modified: 2012-04-16 08:24:09 UTC
/** \page label Page title \section label Section title \subsection label1 Subsection title */ segfaults for me.
Background: https://bugzilla.novell.com/show_bug.cgi?id=755402
If I understand correctly: ----- Breakpoint 3, FTVHelp::addContentsItem (this=0x11025d0, isDir=true, name=0x1550a90 "Page title", ref=0x0, file=0x10b6120 "label", anchor=0x0, separateIndex=true, addToNavIndex=true) at ftvhelp.cpp:568 568 if (!nl->isEmpty()) (gdb) p m_indent $2 = 0 (gdb) c Continuing. Breakpoint 1, FTVHelp::incContentsDepth (this=0x11025d0) at ftvhelp.cpp:523 523 m_indent++; (gdb) c Continuing. Breakpoint 1, FTVHelp::incContentsDepth (this=0x11025d0) at ftvhelp.cpp:523 523 m_indent++; (gdb) c Continuing. Breakpoint 3, FTVHelp::addContentsItem (this=0x11025d0, isDir=true, name=0x1105a30 "Subsection title", ref=0x0, file=0x1050680 "label", anchor=0x1109f80 "label1", separateIndex=false, addToNavIndex=true) at ftvhelp.cpp:568 568 if (!nl->isEmpty()) (gdb) c Continuing. ---- It seems that /section isn't added into m_indentNodes[1] as I would expect. Look: Breakpoint 2, FTVHelp::decContentsDepth (this=0x11025d0) at ftvhelp.cpp:534 534 if (m_indent>0) (gdb) p m_indent $3 = 2 (gdb) call *(m_indentNodes[0].getLast()) $5 = {isLast = true, isDir = true, ref = {m_data = 0x0}, file = {m_data = 0x110c340 "label"}, anchor = {m_data = 0x0}, name = { m_data = 0x154c470 "Page title"}, index = 0, children = {<QGList> = {<QCollection> = {_vptr.QCollection = 0x73c850, del_item = true}, firstNode = 0x0, lastNode = 0x0, curNode = 0x0, curIndex = -1, numNodes = 0, iterators = 0x0}, <No data fields>}, parent = 0x0, separateIndex = true, addToNavIndex = true} (gdb) call *(m_indentNodes[1].getLast()) Cannot access memory at address 0x0 <-------------------- (gdb) call *(m_indentNodes[2].getLast()) $6 = {isLast = true, isDir = true, ref = {m_data = 0x0}, file = {m_data = 0x154f700 "label"}, anchor = {m_data = 0x154f9f0 "label1"}, name = { m_data = 0xee6e60 "Subsection title"}, index = 0, children = {<QGList> = {<QCollection> = {_vptr.QCollection = 0x73c850, del_item = true}, firstNode = 0x0, lastNode = 0x0, curNode = 0x0, curIndex = -1, numNodes = 0, iterators = 0x0}, <No data fields>}, parent = 0x0, separateIndex = false, addToNavIndex = true} (gdb)
When I change label to label2 for /section: Breakpoint 3, FTVHelp::addContentsItem (this=0xee6ab0, isDir=true, name=0xff20a0 "Page title", ref=0x0, file=0x1483d10 "label", anchor=0x0, separateIndex=true, addToNavIndex=true) at ftvhelp.cpp:568 568 if (!nl->isEmpty()) (gdb) c Continuing. Breakpoint 1, FTVHelp::incContentsDepth (this=0xee6ab0) at ftvhelp.cpp:523 523 m_indent++; (gdb) c Continuing. Breakpoint 3, FTVHelp::addContentsItem (this=0xee6ab0, isDir=true, name=0xfb2740 "Section title", ref=0x0, file=0xf9d3d0 "label", anchor=0x14dcb60 "label2", separateIndex=false, addToNavIndex=true) at ftvhelp.cpp:568 568 if (!nl->isEmpty()) (gdb) c Continuing. Breakpoint 1, FTVHelp::incContentsDepth (this=0xee6ab0) at ftvhelp.cpp:523 523 m_indent++; (gdb) c Continuing. Breakpoint 3, FTVHelp::addContentsItem (this=0xee6ab0, isDir=true, name=0x14d9c60 "Subsection title", ref=0x0, file=0xf9d3d0 "label", anchor=0x14d6e60 "label1", separateIndex=false, addToNavIndex=true) at ftvhelp.cpp:568 568 if (!nl->isEmpty()) (gdb) c Continuing. Breakpoint 2, FTVHelp::decContentsDepth (this=0xee6ab0) at ftvhelp.cpp:534 534 if (m_indent>0) (gdb) p m_indent $7 = 2 (gdb) call *(m_indentNodes[0].getLast()) $8 = {isLast = true, isDir = true, ref = {m_data = 0x0}, file = {m_data = 0xff8c00 "label"}, anchor = {m_data = 0x0}, name = { m_data = 0xff47e0 "Page title"}, index = 0, children = {<QGList> = {<QCollection> = {_vptr.QCollection = 0x73c850, del_item = true}, firstNode = 0x0, lastNode = 0x0, curNode = 0x0, curIndex = -1, numNodes = 0, iterators = 0x0}, <No data fields>}, parent = 0x0, separateIndex = true, addToNavIndex = true} (gdb) call *(m_indentNodes[1].getLast()) $9 = {isLast = true, isDir = true, ref = {m_data = 0x0}, file = {m_data = 0x14aed80 "label"}, anchor = {m_data = 0x14aeda0 "label2"}, name = { m_data = 0x14d1e90 "Section title"}, index = 0, children = {<QGList> = {<QCollection> = {_vptr.QCollection = 0x73c850, del_item = true}, firstNode = 0x0, lastNode = 0x0, curNode = 0x0, curIndex = -1, numNodes = 0, iterators = 0x0}, <No data fields>}, parent = 0x1464d10, separateIndex = false, addToNavIndex = true} (gdb) call *(m_indentNodes[2].getLast()) $10 = {isLast = true, isDir = true, ref = {m_data = 0x0}, file = {m_data = 0xfe94c0 "label"}, anchor = {m_data = 0xf946c0 "label1"}, name = { m_data = 0xf946e0 "Subsection title"}, index = 0, children = {<QGList> = {<QCollection> = {_vptr.QCollection = 0x73c850, del_item = true}, firstNode = 0x0, lastNode = 0x0, curNode = 0x0, curIndex = -1, numNodes = 0, iterators = 0x0}, <No data fields>}, parent = 0x14abc00, separateIndex = false, addToNavIndex = true} (gdb)
Seems like a duplicate of bug #671426. Should already be fixed in the latest SVN snapshot. Can you verify this?
Yes, it is fixed yet. Thanks a lot! *** This bug has been marked as a duplicate of bug 671426 ***