<html><head></head><body bgcolor="#ffffff" text="#2e3436" link="#2a76c6" vlink="#2e3436"><div>Hi Lazarus Developers List,</div><div><br></div><div>Can you please help on this issue?</div><div>fpdoc fails when building Laazarus 1.6.2 documentation. This leads to a serious (RC) bug that may lead to remove Lazarus form next Debian release which will be really a pity.</div><div><br></div><div>On Sat, 2017-04-01 at 21:45 +0200, Paul Gevers wrote:</div><blockquote type="cite"><pre>First shot at debugging from my side.

Because the error says:
Exception at 00000000004BDB6C: EDOMError:
EDOMError in DOMDocument.CreateElement.

I searched for "DOMDocument.CreateElement". Low and behold, I find
something interesting in fpcsrc/packages/fcl-xml/src/dom.pp:

function TDOMDocument.CreateElement(const tagName: DOMString): TDOMElement;
begin
  if not IsXmlName(tagName) then
    raise EDOMError.Create(INVALID_CHARACTER_ERR,
'DOMDocument.CreateElement');
  TDOMNode(Result) := Alloc(TDOMElement);

Result.Create(Self);
  Result.FNSI.QName := FNames.FindOrAdd(DOMPChar(tagName), Length(tagName));
  Result.AttachDefaultAttrs;
end;

First idea that pops into my mind is: it looks like the source of
lazarus has characters that fp-docs can't convert. Apparently an error
is raised, but converted by fp-docs into exit code 0.

Interesting to note, is the delta between 2.4.6 and 3.0.0:
-  if not IsXmlName(tagName, FXMLVersion = xmlVersion11) then
+  if not IsXmlName(tagName) then
which was done in this commit:
<a href="http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=20422">http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=20422</a>

Sending now as I am about to stop for today, but summary as I currently
suspect the situation is:
1) fp-doc fails to create error exit code during error
2) lazarus may have xml files that need updating.

Probably the next time I spend time on this will be to bisect the
documentation creation to see which file(s) need fixing -> to
potentially solve issue 2 if that is indeed the issue.<br></pre><pre></pre></blockquote><div>It looks like the file extctrls.pp or the corresponding xml is not supported by the used version of fpdoc.</div><pre>]$fpdoc --content=lcl.xct --package=lcl --descr=../../xml/lcl/lcl.xml --input='../../../lcl/extctrls.pp -Fi../../../lcl/include'  --format=html --descr=../../xml/lcl/extctrls.xml</pre><pre>FPDoc - Free Pascal Documentation Tool</pre><pre>Version 3.0.0 [2017/02/08]</pre><pre>(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, <a href="mailto:sg@freepascal.org">sg@freepascal.org</a></pre><pre>(c) 2005 - 2012 various FPC contributors</pre><pre><br></pre><pre>Writing 757 pages...</pre><pre>Exception at 00000000004BDACC: EDOMError:</pre><pre>EDOMError in DOMDocument.CreateElement.</pre><pre></pre><div>While with an other page this leads to:</div><pre>$fpdoc --content=lcl.xct --package=lcl --descr=../../xml/lcl/lcl.xml --input='../../../lcl/interfaces/gtk/gtkwsextctrls.pp -Fi../../../lcl/include'  --format=html --descr=../../xml/lcl/interfaces/gtk/gtkwsextctrls.xml</pre><pre>FPDoc - Free Pascal Documentation Tool</pre><pre>Version 3.0.0 [2017/02/08]</pre><pre>(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, <a href="mailto:sg@freepascal.org">sg@freepascal.org</a></pre><pre>(c) 2005 - 2012 various FPC contributors</pre><pre><br></pre><pre>Writing 128 pages...</pre><pre>Using built-in CSS file</pre><pre>Creating plus image</pre><pre>Creating minus image</pre><pre>Done.</pre><pre></pre><div>Here there are no errors. Just goes fine to end.</div><div>-- </div><div><span style="font-family: monospace; white-space: pre;">Cheers,
Abou Al Montacir</span></div></body></html>