In function G4GDMLWrite::GenerateName in G4GDMLWrite.cpp, the serializer may put the pointer of the object in the end to ensure correct reference on name conflict. However, the stripping mechanism in G4GDMLRead::StripName searches for the string "0x" to find the pointer, which msvc sdk does not prepend. A workaround is to add a specific sequence before the pointer value and strip from there. This is a minor issue, since this will only cause the name to be longer and longer on save and load, and make locating the volume with name difficult. Also a minor issue when exporting regions, in G4GDMLParser::Write the region evaluation happens before the ref parameter in the function updates G4GDMLWrite::addPointerToName. This will make the gdml file invalid if the parser is set not to add pointer name, Write set to making refs. This can be avoided by careful coding, but setting the value in the first place may be a better solution.
As noted in GitHub PR#19, fixes will be be included in next patch release.
Restored as closed by mistake...
(In reply to Gabriele Cosmo from comment #1) > As noted in GitHub PR#19, fixes will be be included in next patch release. Still current in 4.11 release branch. May be a regression problem.
(In reply to shangjiaxuan from comment #3) > (In reply to Gabriele Cosmo from comment #1) > > As noted in GitHub PR#19, fixes will be be included in next patch release. > > Still current in 4.11 release branch. May be a regression problem. The G4GDMLParser::Write parameter is respected, but the '0x' prepending problem is still present.