Help! Segmentation violation while using stl

Hi!

I have a problem with G__exec_text( “{ #include }” ) in case of embedded CINT - in crashes if i use it as dll, or hangs if staticly linked.

Though it works fine from CINT command prompt

I’m still getting segmentation violation with slightly more complicated code. At least in debug build. here is the code:
RunMe.rar (953 Bytes)

Hi!
Any chance to fix the issue that is one post above?

I tried to narrow glitch source, it could be not just stl itself but how c++ classes maintain memory.

Hi,

[quote]I’m still getting segmentation violation with slightly more complicated code. At least in debug build. here is the code: [/quote]I was able to reproduce the problem (which appears on all platforms :frowning:).
You can work-around the problem by disabling CINT’s bytecode optimization [by issuing “O 0” letter o follow by number zero].
We will look for a solution.

Cheers,
Philippe.

PS. One possibility is that it is induce by the use of an interpreted vector of interpreted object.

[quote]I have a problem with G__exec_text( “{ #include }” ) in case of embedded CINT - in crashes if i use it as dll, or hangs if staticly linked. [/quote]Can you try the more direct G__loadfile("string");?

Cheers,
Philippe.

Thank you Philippe!
For now the only way i found that helped: not using classes and std at all. For collections i created some helper dll that provides basic collections functionality.

P.S. Is there a way to disable byte compiling in cint api?
say, G__exectext( “O 0” ); ?
or even from from script?

You can use: G__optimizemode(0);

Cheers,
Philippe.