Problems with THtml

Hi all,

After successfully installing root on my windows machine (vista, vc++ 9), compiling from source, integrating my own objects into the framework etc I’ve stumbled on bit of a problem with THtml.

If I load root and follow the documentations instructions i.e

root [0] THtml h;
root [1] h.MakeIndex();

I get loads of warnings of the form

THtml::CreateListOfClasses: Cannot determing declaration file for …

And root crashes saying that an ‘Assertion error’ has occured.

Having conquered most problems so far, the solution to this one is eluding me.

Thanks for any help you can give!
Chris

Hi,

I see that will need to add a bit of debug output in the future for THtml failures :slight_smile: First of all, which version of ROOT are you using? Then what’s your current working directory (i.e. where do you call “root”) and where are your sources? And for a given class of yours (let’s call it XYZ) that comes with a message “THtml::CreateListOfClasses: Cannot determine declaration file for XYZ”, can you send the output of XYZ::Class()->GetDeclFileName()?

None of that should trigger an assertion, though. For that you’ll have to run root in a debugger: start root like you did before, type “THtml h” [enter]. Start MS Visual Studio, select the menu entry Tools, Attach to Process, select the root process, and then type “h.MakeIndex();”[enter] into the ROOT window. MSVC should tell you where the assertion happened which in turn should help me fix the problem.

Cheers, Axel.

Hi Axel,

Thanks for your reply. I’ll have to reply to some of your mail later (all my root stuff is on my laptop which is unfortunately at home!) but I can reply to some of it now.

I am using the latest pro release (5.22/00) which I compile from source (in debug mode). I have installed root in C:\root (/cygdrive/c/root). My $(ROOTSYS) variable points to this loaction. All ROOT source files are in the format supplied when I untarred the downloaded file.

My code is in C:\root\Users\Targett\programming\faframework\code (/cygdrive/c/root/Users/Targett/programming/faframework/code). I run root from this location from where I type the aforementioned commands that cause the error.

I’ll do the rest of what you asked tonight. By the way, do you know what an assertion error is out of interest?

Thanks for your help,
Chris

I forgot to say. The errors of the form:

THtml::CreateListOfClasses: Cannot determine declaration file for XYZ”

are being given for the ROOT classes rather than my own classes.

I suspect as always it is something simple like it just can’t find the relevant files :slight_smile:

Cheers,
Chris

Hi Chris,

yes, THtml cannot find the ROOT sources - but that’s fine if you want to document your files and not ROOT’s.

An assertion is a piece of code a developer puts to make sure that something is the way it should be, e.g. assert(filename != NULL). But we use these only extremely rarely in ROOT, so I suspect that its’ not ROOT’s code that’s causing it. Nevertheless we’ll need to know why it happens.

How did you build ROOT - which compiler and version did you use?

Cheers, Axel.

Hi Axel,

Here is the information you requested.

To build root, I used MS VC++ compiler (cl.exe), version 15.00.30729.01

I have also used the precompiled binaries from the root website and I get exactly the same errors. I am always compiling in debug mode. I havn’t tried release mode.


Firstly, the output from VC++ when I attach the root process:

‘root.exe’: Loaded ‘C:\root\bin\libvectorDict.dll’, Symbols loaded.
Warning in THtml::CreateListOfClasses: Product not set. You should call gHtml->SetProduct(“MyProductName”);
Info in THtml::CreateListOfClasses: Initializing - DONE.
The thread ‘Win32 Thread’ (0x1638) has exited with code 3 (0x3).
The thread ‘Win32 Thread’ (0x179c) has exited with code 3 (0x3).
‘root.exe’: Loaded ‘C:\Windows\System32\winmm.dll’
‘root.exe’: Loaded ‘C:\Windows\System32\oleacc.dll’
The program ‘[1556] root.exe: Native’ has exited with code 3 (0x3).


The relevant code block appears to be xutility and this is the code producing the error:

void __CLR_OR_THIS_CALL _Orphan_me()
	{	// cut ties with parent
	if (_Mycont != 0 && _Mycont->_Myfirstiter != _IGNORE_MYITERLIST)
		{	// adopted, remove self from list
		_Iterator_base **_Pnext =
			(_Iterator_base **)&_Mycont->_Myfirstiter;
		while (*_Pnext != 0 && *_Pnext != this)
			_Pnext = &(*_Pnext)->_Mynextiter;

		if (*_Pnext == 0)
			_DEBUG_ERROR("ITERATOR LIST CORRUPTED!");
		*_Pnext = _Mynextiter;
		_Mycont = 0;
		}
	}

The call stack gives the following info:

libHtml.dll!std::_Iterator_base::_Orphan_me() Line 189 + 0x17 bytes C++


Thanks once again for your help. As you pointed out, I can indeed build the documentation for my own classes and am not concerned about building the doc for root. One thing that would be nice though is if I could link in the root doc with my own doc i.e. the user can click on a link to TObject (for example) that is used in my code and is taken to the rrot doc website.

Have a good we,

Cheers,
Chris

Hi Chris,

can you post the fill stack trace, not just the final frame? I.e. I’ll need to know where
libHtml.dll!std::_Iterator_base::_Orphan_me() Line 189 + 0x17 bytes C++
gets called from.

Your doc should be able to automatically link in ROOT’s doc. Your report seems to say that it doesn’t; I’ll check. I will also improve the reporting for the “Cannot determine declaration file for” warning. But please send me the full stack trace of the assert you see.

Cheers, Axel.

Hi,

the crash is fixed in the current trunk, and the warnings make much more sense now. Thanks for the report!

Cheers, Axel.