Vector<> memory problems

Greetings everybody,

I have a problem of memory with vector<> class and i hope you can help me.
I am using ROOT 5.26 and the problem is the following:

When i use the syntax

std::vector< std::vector< CLASS > > v;,
I have a memory map and backtrace error when my vectors have many elements.
I tried to do the same with some elements in my vector and it worked.
I did not use table because i do not know the size of my table: i read a XML file and that is why i choose vector class.

Is it possible to go throught this error ?
Do you have solutions ?

Help me please.

Thank you in advance.

Hi,

How did you access the vectors? Did you use push_back and/or resize?

Cheers,
Philippe.

I define the following vector:

To add elements in this vector i use the syntax:

Vec1.push_back( vector< double >()); Vec1[i].push_back( Element);

where i is an int
Element is the element i want to put in my vector.

To access my vector, i use:

I do not use resize

Hi,

Assuming that ‘i’ is correctly tracked and the ‘Element’ constructor is correctly implemented, this long fine. What is the stack trace? Did you try running with valgrind? What was the valgrind report?

Philippe.

So, on 5.26 version, i have this kind of error

*** glibc detected *** /home/froz/root/bin/root.exe: corrupted double-linked list: 0x0d725400 *** ======= Backtrace: ========= /lib/i386-linux-gnu/libc.so.6(+0x6ebc2)[0xb6e98bc2] /lib/i386-linux-gnu/libc.so.6(+0x6f01f)[0xb6e9901f] /lib/i386-linux-gnu/libc.so.6(+0x6feac)[0xb6e99eac] /lib/i386-linux-gnu/libc.so.6(__libc_malloc+0x68)[0xb6e9c498] /usr/lib/i386-linux-gnu/libstdc++.so.6(_Znwj+0x27)[0xb708e9d7] /home/froz/root/lib/libCint.so(_ZNSt11_Deque_baseIiSaIiEE17_M_initialize_mapEj+0x64)[0xb6880804] /home/froz/root/lib/libCint.so(G__exec_statement+0x195)[0xb69531f5] /home/froz/root/lib/libCint.so(G__interpret_func+0x2eb1)[0xb6901a71] /home/froz/root/lib/libCint.so(G__exec_asm+0x8072)[0xb688a2a2] /home/froz/root/lib/libCint.so(G__exec_bytecode+0x9bb)[0xb688ba7b] /home/froz/root/lib/libCint.so(_ZN4Cint19G__ExceptionWrapperEPFiP8G__valuePKcP8G__paramiES1_PcS5_i+0x6c)[0xb687346c] /home/froz/root/lib/libCint.so(G__exec_asm+0x5598)[0xb68877c8] /home/froz/root/lib/libCint.so(+0x12e98c)[0xb696198c] /home/froz/root/lib/libCint.so(G__exec_statement+0xcb96)[0xb695fbf6] /home/froz/root/lib/libCint.so(G__interpret_func+0x3419)[0xb6901fd9] /home/froz/root/lib/libCint.so(G__getfunction+0x20a8)[0xb68ee9e8] /home/froz/root/lib/libCint.so(G__getitem+0x815)[0xb68c5955] /home/froz/root/lib/libCint.so(G__getexpr+0x57c0)[0xb68cc440] /home/froz/root/lib/libCint.so(G__calc_internal+0x39b)[0xb68d83bb] /home/froz/root/lib/libCint.so(G__process_cmd+0x368e)[0xb696832e] /home/froz/root/lib/libCore.so(_ZN5TCint11ProcessLineEPKcPN12TInterpreter10EErrorCodeE+0x4da)[0xb72bbc9a] /home/froz/root/lib/libCore.so(_ZN5TCint16ProcessLineSynchEPKcPN12TInterpreter10EErrorCodeE+0xaf)[0xb72b15af] /home/froz/root/lib/libCore.so(_ZN12TApplication11ExecuteFileEPKcPib+0x8b7)[0xb7212907] /home/froz/root/lib/libCore.so(_ZN12TApplication11ProcessFileEPKcPib+0x2c)[0xb7212cec] /home/froz/root/lib/libCore.so(_ZN12TApplication11ProcessLineEPKcbPi+0x80f)[0xb721146f] /home/froz/root/lib/libRint.so(_ZN5TRint3RunEb+0x50f)[0xb70eaa7f] /home/froz/root/bin/root.exe(main+0x6f)[0x8048c8f] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb6e43113] /home/froz/root/bin/root.exe[0x8048d0d] ======= Memory map: ======== 08048000-0804a000 r-xp 00000000 07:00 677322 /home/froz/root/bin/root.exe 0804a000-0804b000 r--p 00001000 07:00 677322 /home/froz/root/bin/root.exe 0804b000-0804c000 rw-p 00002000 07:00 677322 /home/froz/root/bin/root.exe 09262000-0da2e000 rw-p 00000000 00:00 0 [heap] b5100000-b5121000 rw-p 00000000 00:00 0 b5121000-b5200000 ---p 00000000 00:00 0 b52b0000-b54e4000 rw-p 00000000 00:00 0 b54e4000-b5751000 rw-p 00000000 00:00 0 b5751000-b5852000 rw-p 00000000 00:00 0 b5888000-b5989000 rw-p 00000000 00:00 0 b5989000-b5ae0000 rw-p 00000000 00:00 0 b5c0a000-b5f5a000 r-xp 00000000 07:00 677192 /home/froz/root/lib/libGeom.so b5f5a000-b5f65000 r--p 0034f000 07:00 677192 /home/froz/root/lib/libGeom.so b5f65000-b5f69000 rw-p 0035a000 07:00 677192 /home/froz/root/lib/libGeom.so b5f69000-b5f70000 rw-p 00000000 00:00 0 b5f70000-b6174000 r-xp 00000000 07:00 677147 /home/froz/root/lib/libRIO.so b6174000-b6178000 r--p 00204000 07:00 677147 /home/froz/root/lib/libRIO.so b6178000-b617a000 rw-p 00208000 07:00 677147 /home/froz/root/lib/libRIO.so b617a000-b617c000 rw-p 00000000 00:00 0 b617c000-b61c1000 r-xp 00000000 07:00 677141 /home/froz/root/lib/libThread.so b61c1000-b61c2000 ---p 00045000 07:00 677141 /home/froz/root/lib/libThread.so b61c2000-b61c4000 r--p 00045000 07:00 677141 /home/froz/root/lib/libThread.so b61c4000-b61c5000 rw-p 00047000 07:00 677141 /home/froz/root/lib/libThread.so b61c5000-b61c6000 rw-p 00000000 00:00 0 b61c6000-b61d9000 r-xp 00000000 07:00 676922 /home/froz/root/cint/cint/stl/vectorbool.dll b61d9000-b61da000 r--p 00012000 07:00 676922 /home/froz/root/cint/cint/stl/vectorbool.dll b61da000-b61db000 rw-p 00013000 07:00 676922 /home/froz/root/cint/cint/stl/vectorbool.dll b61db000-b61f8000 r-xp 00000000 07:00 677059 /home/froz/root/lib/libvectorDict.so b61f8000-b61f9000 ---p 0001d000 07:00 677059 /home/froz/root/lib/libvectorDict.so b61f9000-b61fa000 r--p 0001d000 07:00 677059 /home/froz/root/lib/libvectorDict.so b61fa000-b61fb000 rw-p 0001e000 07:00 677059 /home/froz/root/lib/libvectorDict.so b61fb000-b6400000 r-xp 00000000 07:00 676852 /home/froz/root/cint/cint/stl/vector.dll b6400000-b6401000 r--p 00204000 07:00 676852 /home/froz/root/cint/cint/stl/vector.dll b6401000-b6406000 rw-p 00205000 07:00 676852 /home/froz/root/cint/cint/stl/vector.dll b6406000-b654c000 r-xp 00000000 07:00 18884 /usr/local/lib/libxml2.so.2.7.8 b654c000-b654d000 ---p 00146000 07:00 18884 /usr/local/lib/libxml2.so.2.7.8 b654d000-b6551000 r--p 00146000 07:00 18884 /usr/local/lib/libxml2.so.2.7.8 b6551000-b6552000 rw-p 0014a000 07:00 18884 /usr/local/lib/libxml2.so.2.7.8 b6552000-b6553000 rw-p 00000000 00:00 0 b6558000-b6565000 rw-p 00000000 00:00 0 b6565000-b6587000 r-xp 00000000 07:00 671146 /home/froz/root/lib/libXMLParser.so b6587000-b6588000 r--p 00022000 07:00 671146 /home/froz/root/lib/libXMLParser.so b6588000-b6589000 rw-p 00023000 07:00 671146 /home/froz/root/lib/libXMLParser.so b6589000-b658d000 rw-p 00000000 00:00 0 b658d000-b659c000 r-xp 00000000 07:00 677033 /home/froz/root/cint/cint/include/stdfunc.dll b659c000-b659d000 r--p 0000f000 07:00 677033 /home/froz/root/cint/cint/include/stdfunc.dll b659d000-b659e000 rw-p 00010000 07:00 677033 /home/froz/root/cint/cint/include/stdfunc.dll b659e000-b67ba000 r-xp 00000000 07:00 677143 /home/froz/root/lib/libMathCore.so b67ba000-b67bf000 r--p 0021b000 07:00 677143 /home/froz/root/lib/libMathCore.so b67bf000-b67c2000 rw-p 00220000 07:00 677143 /home/froz/root/lib/libMathCore.so b67c2000-b67c5000 rw-p 00000000 00:00 0 b67c5000-b67d0000 r-xp 00000000 07:00 653777 /lib/i386-linux-gnu/libnss_files-2.13.so b67d0000-b67d1000 r--p 0000a000 07:00 653777 /lib/i386-linux-gnu/libnss_files-2.13.so b67d1000-b67d2000 rw-p 0000b000 07:00 653777 /lib/i386-linux-gnu/libnss_files-2.13.so b67d2000-b67dc000 r-xp 00000000 07:00 653781 /lib/i386-linux-gnu/libnss_nis-2.13.so b67dc000-b67dd000 r--p 00009000 07:00 653781 /lib/i386-linux-gnu/libnss_nis-2.13.so b67dd000-b67de000 rw-p 0000a000 07:00 653781 /lib/i386-linux-gnu/libnss_nis-2.13.so b67de000-b67f3000 r-xp 00000000 07:00 653771 /lib/i386-linux-gnu/libnsl-2.13.so b67f3000-b67f4000 r--p 00015000 07:00 653771 /lib/i386-linux-gnu/libnsl-2.13.so b67f4000-b67f5000 rw-p 00016000 07:00 653771 /lib/i386-linux-gnu/libnsl-2.13.so b67f5000-b67f7000 rw-p 00000000 00:00 0 b67f7000-b67ff000 r-xp 00000000 07:00 653773 /lib/i386-linux-gnu/libnss_compat-2.13.so b67ff000-b6800000 r--p 00007000 07:00 653773 /lib/i386-linux-gnu/libnss_compat-2.13.so b6800000-b6801000 rw-p 00008000 07:00 653773 /lib/i386-linux-gnu/libnss_compat-2.13.so b6801000-b6804000 rw-p 00000000 00:00 0 b6804000-b682c000 r-xp 00000000 07:00 653766 /lib/i386-linux-gnu/libm-2.13.so b682c000-b682d000 r--p 00028000 07:00 653766 /lib/i386-linux-gnu/libm-2.13.so b682d000-b682e000 rw-p 00029000 07:00 653766 /lib/i386-linux-gnu/libm-2.13.so b682e000-b6831000 r-xp 00000000 07:00 653747 /lib/i386-linux-gnu/libdl-2.13.so b6831000-b6832000 r--p 00002000 07:00 653747 /lib/i386-linux-gnu/libdl-2.13.so b6832000-b6833000 rw-p 00003000 07:00 653747 /lib/i386-linux-gnu/libdl-2.13.so b6833000-b6a84000 r-xp 00000000 07:00 676349 /home/froz/root/lib/libCint.so b6a84000-b6a86000 r--p 00250000 07:00 676349 /home/froz/root/lib/libCint.so b6a86000-b6a89000 rw-p 00252000 07:00 676349 /home/froz/root/lib/libCint.so b6a89000-b6e15000 rw-p 00000000 00:00 0 b6e15000-b6e28000 r-xp 00000000 07:00 653819 /lib/i386-linux-gnu/libz.so.1.2.3.4 b6e28000-b6e29000 r--p 00012000 07:00 653819 /lib/i386-linux-gnu/libz.so.1.2.3.4 b6e29000-b6e2a000 rw-p 00013000 07:00 653819 /lib/i386-linux-gnu/libz.so.1.2.3.4 b6e2a000-b6fa0000 r-xp 00000000 07:00 653736 /lib/i386-linux-gnu/libc-2.13.so b6fa0000-b6fa2000 r--p 00176000 07:00 653736 /lib/i386-linux-gnu/libc-2.13.so b6fa2000-b6fa3000 rw-p 00178000 07:00 653736 /lib/i386-linux-gnu/libc-2.13.so b6fa3000-b6fa6000 rw-p 00000000 00:00 0 b6fa6000-b6fbd000 r-xp 00000000 07:00 653796 /lib/i386-linux-gnu/libpthread-2.13.so b6fbd000-b6fbe000 r--p 00016000 07:00 653796 /lib/i386-linux-gnu/libpthread-2.13.so b6fbe000-b6fbf000 rw-p 00017000 07:00 653796 /lib/i386-linux-gnu/libpthread-2.13.so b6fbf000-b6fc1000 rw-p 00000000 00:00 0 b6fc1000-b6fdd000 r-xp 00000000 07:00 653757 /lib/i386-linux-gnu/libgcc_s.so.1 b6fdd000-b6fde000 r--p 0001b000 07:00 653757 /lib/i386-linux-gnu/libgcc_s.so.1 b6fde000-b6fdf000 rw-p 0001c000 07:00 653757 /lib/i386-linux-gnu/libgcc_s.so.1 b6fdf000-b70bd000 r-xp 00000000 07:00 919372 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16 b70bd000-b70be000 ---p 000de000 07:00 919372 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16 b70be000-b70c2000 r--p 000de000 07:00 919372 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16 b70c2000-b70c3000 rw-p 000e2000 07:00 919372 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16 b70c3000-b70cc000 rw-p 00000000 00:00 0 b70cc000-b70dd000 rw-p 00000000 00:00 0 b70dd000-b710c000 r-xp 00000000 07:00 677189 /home/froz/root/lib/libRint.so b710c000-b710d000 r--p 0002e000 07:00 677189 /home/froz/root/lib/libRint.so b710d000-b710e000 rw-p 0002f000 07:00 677189 /home/froz/root/lib/libRint.so b710e000-b77e3000 r-xp 00000000 07:00 666748 /home/froz/root/lib/libCore.so b77e3000-b77f8000 r--p 006d4000 07:00 666748 /home/froz/root/lib/libCore.so b77f8000-b77ff000 rw-p 006e9000 07:00 666748 /home/froz/root/lib/libCore.so b77ff000-b7878000 rw-p 00000000 00:00 0 b7878000-b7879000 r-xp 00000000 00:00 0 [vdso] b7879000-b7897000 r-xp 00000000 07:00 653723 /lib/i386-linux-gnu/ld-2.13.so b7897000-b7898000 r--p 0001d000 07:00 653723 /lib/i386-linux-gnu/ld-2.13.so b7898000-b7899000 rw-p 0001e000 07:00 653723 /lib/i386-linux-gnu/ld-2.13.so bf90d000-bf9ad000 rw-p 00000000 00:00 0 [stack]

But i tried at home with the last version.
It is really different.

And many other text really hard to read.
Here is a little part ot the text:
First part with this kind of error

/home/froz/CoeurHomoPasdéplacement/AutoDict_vector_vector_TString_allocator_TString______cxx_ACLiC_dict.cxx:72:4: erreur: stray ‘\303’ in program /home/froz/CoeurHomoPasdéplacement/AutoDict_vector_vector_TString_allocator_TString______cxx_ACLiC_dict.cxx:72:4: erreur: stray ‘\251’ in program

Second part with

/home/froz/CoeurHomoPasdéplacement/AutoDict_vector_vector_TString_allocator_TString______cxx_ACLiC_dict.cxx:48:16: attention : ‘void ROOT::destruct_vectorlEvectorlETStringcOallocatorlETStringgRsPgRcOallocatorlEvectorlETStringcOallocatorlETStringgRsPgRsPgRsPgRcLcLiterator(void*)’ declared ‘static’ but never defined [-Wunused-function] g++: erreur: /home/froz/CoeurHomoPasdéplacement/AutoDict_vector_vector_TString_allocator_TString______cxx_ACLiC_dict.o: Aucun fichier ou dossier de ce type Error in <ACLiC>: Compilation failed! /home/froz/CoeurHomoPasdéplacement/AutoDict_random_access_iterator_vector_TString_allocator_TString____long__cxx_ACLiC_dict.cxx:82:4: erreur: stray ‘\303’ in program

This is just piece of error message. It is really long
After it builds the geometry, I have break segmentation violation and geometry is correctly printed…

There is a real pb with my vector …

[quote]So, on 5.26 version, i have this kind of error[/quote]The problem is due to a weakness in CINT template instantiation and is ‘fixed’ by generating the dictionary for the template instance.

This is what the latest version tries to do automatically.

/home/froz/CoeurHomoPasdéplacement/AutoDict_vector_vector_TString_allocator_TString______cxx_ACLiC_dict.cxx:72:4: erreur: stray ‘\303’ in programis … indeed fatal and is due to the é character in the directory name. Simply rename this directory with any accent and it will work nicely.

Cheers,
Philippe.

Seriously ???
I destroyed my brain all the day because of accent :slight_smile:

Thank you very much.

Is it going to work on the 5.26 version ?

It fixed the problem, i can print geometry but unfortunately, i still have an error message which is

[code] *** Break *** segmentation violation

===========================================================
There was a crash (#7 0xb729e93b in SigHandler(ESignals) () from /home/froz/root/lib/libCore.so).
This is the entire stack trace of all threads:

#0 0xb781f424 in __kernel_vsyscall ()
#1 0xb6e6c043 in waitpid () from /lib/i386-linux-gnu/libc.so.6
#2 0xb6e0d6e3 in ?? () from /lib/i386-linux-gnu/libc.so.6
#3 0xb6f5bebb in system () from /lib/i386-linux-gnu/libpthread.so.0
#4 0xb729783b in TUnixSystem::Exec(char const*) () from /home/froz/root/lib/libCore.so
#5 0xb729bd20 in TUnixSystem::StackTrace() () from /home/froz/root/lib/libCore.so
#6 0xb729e827 in TUnixSystem::DispatchSignals(ESignals) () from /home/froz/root/lib/libCore.so
#7 0xb729e93b in SigHandler(ESignals) () from /home/froz/root/lib/libCore.so
#8 0xb7295a72 in sighandler(int) () from /home/froz/root/lib/libCore.so
#9 0xb72c8d05 in textinput::TerminalConfigUnix::HandleSignal(int) () from /home/froz/root/lib/libCore.so
#10 0xb72c8d44 in (anonymous namespace)::TerminalConfigUnix__handleSignal(int) () from /home/froz/root/lib/libCore.so
#11
#12 0xb7401225 in G__G__Base2_15_0_178(G__value*, char const*, G__param*, int) () from /home/froz/root/lib/libCore.so
#13 0xb681a46c in Cint::G__ExceptionWrapper(int ()(G__value, char const*, G__param*, int), G__value*, char*, G__param*, int) () from /home/froz/root/lib/libCint.so
#14 0xb682e7c8 in G__exec_asm () from /home/froz/root/lib/libCint.so
#15 0xb690898c in G__exec_loop () from /home/froz/root/lib/libCint.so
#16 0xb6906bf6 in G__exec_statement () from /home/froz/root/lib/libCint.so
#17 0xb690812a in G__exec_loop () from /home/froz/root/lib/libCint.so
#18 0xb6906bf6 in G__exec_statement () from /home/froz/root/lib/libCint.so
#19 0xb69031f6 in G__exec_statement () from /home/froz/root/lib/libCint.so
#20 0xb68a8fd9 in G__interpret_func () from /home/froz/root/lib/libCint.so
#21 0xb68959e8 in G__getfunction () from /home/froz/root/lib/libCint.so
#22 0xb686c955 in G__getitem () from /home/froz/root/lib/libCint.so
#23 0xb6873440 in G__getexpr () from /home/froz/root/lib/libCint.so
#24 0xb687f3bb in G__calc_internal () from /home/froz/root/lib/libCint.so
#25 0xb690f32e in G__process_cmd () from /home/froz/root/lib/libCint.so
#26 0xb7262c9a in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/froz/root/lib/libCore.so
#27 0xb72585af in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /home/froz/root/lib/libCore.so
#28 0xb71b9907 in TApplication::ExecuteFile(char const*, int*, bool) () from /home/froz/root/lib/libCore.so
#29 0xb71b9cec in TApplication::ProcessFile(char const*, int*, bool) () from /home/froz/root/lib/libCore.so
#30 0xb71b846f in TApplication::ProcessLine(char const*, bool, int*) () from /home/froz/root/lib/libCore.so
#31 0xb7091a7f in TRint::Run(bool) () from /home/froz/root/lib/libRint.so
#32 0x08048c8f in main ()

Root > Function AssemblageThomas() busy flag cleared[/code]

Is it a real probleme ?

[quote]Is it going to work on the 5.26 version ?[/quote]In 5.26, you need to semi-manually generate the dictionary by write a small script like:[code]#include
#include “TString.h”
#ifdef MAKECINT
#pragma link C++ class vector<vector >+;
#endif[code] and compile this script via ACLiC.

[quote]Is it a real probleme ?[/quote]Probably. The easiest way to see whether this problem is induce by a deficiency in CINT is to compile the script/command with ACLiC.

Cheers,
Philippe.

Can I write it on the top of my .C file ?

And about the last error ? Do you know what it is ?

I really want to thank you again for your help. It is really important for me.

[quote]Can I write it on the top of my .C file ?[/quote]Yes.

[quote]And about the last error ? Do you know what it is ?[/quote]No, I do not have enough information (which version of ROOT, which code, does it work when compiled with ACLiC) to make a determination.

Cheers,
Philippe.

I am using last version of root (5.32).
That does not work with Aclic
The following message appears:

root [0] Processing AssemblageThomas.C+... Info in <TUnixSystem::ACLiC>: creating shared library /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas_C.so In file included from /home/froz/CoeurHomoPasdeplacement/AssemblageThomas_C_ACLiC_dict.h:34:0, from /home/froz/CoeurHomoPasdeplacement/AssemblageThomas_C_ACLiC_dict.cxx:17: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:40:15: attention : converting to non-pointer type ‘int’ from NULL [-Wconversion-null] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘void DOMRecursiveNode(const char*, const char*)’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:66:28: erreur: ‘ParseContext’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘char ParseContext(TXMLNode*, const char*)’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:79:8: erreur: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘void DOMRecursiveAttribute(const char*)’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:94:20: erreur: ‘ParseContext2’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘char ParseContext2(TXMLNode*)’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:113:9: erreur: cannot convert ‘std::vector<TString>’ to ‘char’ in return /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘void AssemblageThomas()’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:122:1: erreur: ‘gSystem’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:123:1: erreur: ‘TGeoManager’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:123:14: erreur: ‘geom’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:123:25: erreur: expected type-specifier before ‘TGeoManager’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:123:25: erreur: expected ‘;’ before ‘TGeoManager’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:134:8: erreur: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:135:27: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:168:41: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:223:17: attention : NULL utilisé en arithmétique [-Wpointer-arith] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:224:9: attention : unused variable ‘Temp’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:241:1: erreur: ‘TGeoMaterial’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:241:15: erreur: ‘vacuum’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:241:28: erreur: expected type-specifier before ‘TGeoMaterial’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:241:28: erreur: expected ‘;’ before ‘TGeoMaterial’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:243:1: erreur: ‘TGeoMedium’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:243:13: erreur: ‘Sodium’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:243:26: erreur: expected type-specifier before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:243:26: erreur: expected ‘;’ before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:245:13: erreur: ‘ASA’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:245:23: erreur: expected type-specifier before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:245:23: erreur: expected ‘;’ before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:247:13: erreur: ‘ARA’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:247:23: erreur: expected type-specifier before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:247:23: erreur: expected ‘;’ before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:249:13: erreur: ‘BDC’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:249:23: erreur: expected type-specifier before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:249:23: erreur: expected ‘;’ before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:252:13: erreur: ‘Fuel’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:255:16: erreur: expected type-specifier before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:255:16: erreur: expected ‘;’ before ‘TGeoMedium’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:268:9: attention : unused variable ‘SolutionPositive’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:272:17: erreur: ‘SolutionPositive’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:290:1: erreur: ‘TGeoPgon’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:290:11: erreur: ‘hexaW’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:290:23: erreur: expected type-specifier before ‘TGeoPgon’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:290:23: erreur: expected ‘;’ before ‘TGeoPgon’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:293:1: erreur: ‘TGeoVolume’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:293:13: erreur: ‘world’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:293:25: erreur: expected type-specifier before ‘TGeoVolume’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:293:25: erreur: expected ‘;’ before ‘TGeoVolume’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:328:13: erreur: ‘AssCoeur’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:333:13: erreur: ‘PgonShape’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:333:36: erreur: expected primary-expression before ‘)’ token /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:333:37: erreur: expected ‘;’ before ‘AssCoeur’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:337:41: erreur: expected type-specifier before ‘TGeoTranslation’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:337:41: erreur: expected ‘)’ before ‘TGeoTranslation’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:347:13: erreur: ‘hexaR’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:347:25: erreur: expected type-specifier before ‘TGeoPgon’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:347:25: erreur: expected ‘;’ before ‘TGeoPgon’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:350:15: erreur: ‘boitierR’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:350:30: erreur: expected type-specifier before ‘TGeoVolume’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:350:30: erreur: expected ‘;’ before ‘TGeoVolume’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:353:36: erreur: expected type-specifier before ‘TGeoTranslation’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:353:36: erreur: expected ‘)’ before ‘TGeoTranslation’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:397:56: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:399:43: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:409:113: attention : left operand of comma operator has no effect [-Wunused-value] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:419:43: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:431:10: erreur: ‘in’ was not declared in this scope /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:432:9: erreur: expected ‘;’ before ‘else’ /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:143:5: attention : unused variable ‘NombreElementsAx’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:264:8: attention : unused variable ‘RayonCercleCirconscrit’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:282:11: attention : unused variable ‘NbReflecteurs’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:377:5: attention : unused variable ‘compteur’ [-Wunused-variable] /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘char ParseContext2(TXMLNode*)’: /home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:114:1: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type] g++: erreur: /home/froz/CoeurHomoPasdeplacement/AssemblageThomas_C_ACLiC_dict.o: Aucun fichier ou dossier de ce type Error in <ACLiC>: Compilation failed! Error: Function AssemblageThomas() is not defined in current scope :0: *** Interpreter error recovered ***

Hi,

[quote]/home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C:66:28: erreur: ‘ParseContext’ was not declared in this scope
/home/froz/CoeurHomoPasdeplacement/./AssemblageThomas.C: In function ‘char ParseContext(TXMLNode*, const char*)’:[/quote]You need to declare this function (and/or include the header file that does) before using it.

Philippe.

I am not sure about that because my function is declared.

I will make some investigations.

Thank you for your great help

Dear pcanal,

As i told you, it works on root 5.32.
But on root 5.26, i still have the “memory map” error.

I see that .cxx files are not generated by root.
I added the following lines to my .C

#ifdef __MAKECINT__ #pragma link C++ class vector<vector<TString> >+; #endif

Is it not enough to generate the .cxx ?

Thank you in advance

[quote]Is it not enough to generate the .cxx ?[/quote]Yes if you compile the code with ACLiC.

Cheers,
Philippe.