After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673992 - segfault when two same labels for /page and /section are used
segfault when two same labels for /page and /section are used
Status: RESOLVED DUPLICATE of bug 671426
Product: doxygen
Classification: Other
Component: general
1.8.0
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-04-12 13:20 UTC by Petr
Modified: 2012-04-16 08:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Petr 2012-04-12 13:20:24 UTC
/**

\page label Page title

\section label Section title

\subsection label1 Subsection title

*/

segfaults for me.
Comment 1 Petr 2012-04-12 13:50:29 UTC
Background:
https://bugzilla.novell.com/show_bug.cgi?id=755402
Comment 2 Petr 2012-04-12 14:08:27 UTC
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)
Comment 3 Petr 2012-04-12 14:09:41 UTC
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)
Comment 4 Dimitri van Heesch 2012-04-14 09:41:26 UTC
Seems like a duplicate of bug #671426. 
Should already be fixed in the latest SVN snapshot. Can you verify this?
Comment 5 Petr 2012-04-16 08:24:09 UTC
Yes, it is fixed yet. Thanks a lot!

*** This bug has been marked as a duplicate of bug 671426 ***