[Dune] Two GridPtr and entitykey.cc
Yufei Cao
iwsycao at iws.uni-stuttgart.de
Wed Oct 1 14:02:56 CEST 2008
Dear DUNE developers and users,
I still have the problem with two GridPtr defined in the
same main() function on all the computers as shown in the
attached file 'test_grid.cc'.
After debugging, I got the following error message:
Program received signal SIGSEGV, Segmentation fault.
0x0810ec40 in Dune::ElementFaceUtil::generateCubeFace<2>
(element=@0x863ab98, f=0) at entitykey.cc:143
At the same time, when I run another executable file using
UGGrid and just one GridPtr with dgf grid format, I got
the following error message:
Dune reported error: GridError
[outside:/DUNE/dune-grid/dune/grid/uggrid/ugintersectionit.hh:82]:
no neighbor found in outside()
After using valgrind, I got the following backtrace
(classic.cc:64 is mentioned in the backtrace, but in fact
this is just an empty line).
Can anybody help me to figure out the problem or solve the
problem? Thank you so much in advance!!!
Best regards,
Yufei
-------------------------------------------------
Backtrace:
==8383== Use of uninitialised value of size 4
==8383== at 0x810D984: Dune::DGFEntityKey<unsigned>
Dune::ElementFaceUtil::generateCubeFace<2>(std::vector<unsigned,
std::allocator<unsigned> > const&, int) (entitykey.cc:143)
==8383== by 0x810B186:
Dune::ElementFaceUtil::generateFace(int,
std::vector<unsigned, std::allocator<unsigned> > const&,
int) (entitykey.cc:179)
==8383== by 0x80BEF99:
Dune::DuneGridFormatParser::generateBoundaries(std::istream&,
bool) (dgfparser.cc:620)
==8383== by 0x80C05DF:
Dune::DuneGridFormatParser::readDuneGrid(std::istream&,
int, int) (dgfparser.cc:539)
==8383== by 0x805C0A3:
Dune::MacroGrid::Impl<Dune::UGGrid<2>
>::generate(Dune::MacroGrid&, char const*, int)
(dgfug.cc:13)
==8383== by 0x805CA6E: Dune::UGGrid<2>*
Dune::MacroGrid::createGrid<Dune::UGGrid<2> >()
(dgfparser.hh:124)
==8383== by 0x805FFA9: Dune::GridPtr<Dune::UGGrid<2>
>::GridPtr(std::string, int) (dgfparser.hh:170)
==8383== by 0x804BE3A: main (classic.cc:64)
==8383== Warning: set address range perms: large range
524288000 (undefined)
==8383== Warning: set address range perms: large range
524288032 (noaccess)
Dune reported error: GridError
[outside:/DUNE/dune-grid/dune/grid/uggrid/ugintersectionit.hh:82]:
no neighbor found in outside()
==8383==
==8383== ERROR SUMMARY: 30 errors from 1 contexts
(suppressed: 36 from 1)
==8383== malloc/free: in use at exit: 259 bytes in 9
blocks.
==8383== malloc/free: 4,455 allocs, 4,446 frees,
524,713,710 bytes allocated.
==8383== For counts of detected errors, rerun with: -v
==8383== searching for pointers to 9 not-freed blocks.
==8383== checked 2,566,812 bytes.
==8383==
==8383== LEAK SUMMARY:
==8383== definitely lost: 161 bytes in 7 blocks.
==8383== possibly lost: 0 bytes in 0 blocks.
==8383== still reachable: 98 bytes in 2 blocks.
==8383== suppressed: 0 bytes in 0 blocks.
==8383== Rerun with --leak-check=full to see details of
leaked memory.
More information about the Dune
mailing list