Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] "Windows has triggered a breakpoint" when I run surface reconstruction in a thread

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] "Windows has triggered a breakpoint" when I run surface reconstruction in a thread


Chronological Thread 
  • From: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] "Windows has triggered a breakpoint" when I run surface reconstruction in a thread
  • Date: Mon, 29 Aug 2011 15:51:12 +0200

Hi Yifei,

I guess that you have either 1)  a runtime mismatch or 2) a stack overflow or 3) a dangling pointer.

1) You should first check that your application and all libraries linked with it (including CGAL and Qt) have been compiled with the same Windows runtime. It should be /MD in Release mode and /MDd in Debug mode.
I recommend you to test first the Release version as CGAL installers >= 3.7 do not come with a /MDd version of TAUCS any more.

2) examples/Surface_reconstruction_point_3/CMakeLists.txt contains code to avoid stack overflows on Windows:

if (MSVC)
    # Use /EHa option to catch stack overflows.
    # Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
    string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
    ...
endif()

3) Dangling pointers are hard to track.
If you are lucky, you may use MSVC debugger, start from a simple code and a simple point set, and increase complexity until the bug occurs.
If the bug is more complex, you will need a memory debugger. There are various commercial memory debuggers on Windows. My favorite one is AQTime.

Best regards,
Laurent Saboret


Le 27/08/2011 23:22, Yifei Li a écrit :
Hi,

I tried to run examples/Surface_reconstruction_point_3\poisson_reconstruction_example.cpp in a QThread, and the following error occurred:

HEAP[Modeler.exe]: Invalid address specified to RtlValidateHeap( 00C40000, 0A69A9E0 )

Windows has triggered a breakpoint in Modeler.exe.


This may be due to a corruption of the heap, which indicates a bug in Modeler.exe or any of the DLLs it has loaded.


This may also be due to the user pressing F12 while Modeler.exe has focus.


I attached the trace of call stack in the following:


> msvcr90d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x0a69aa00)  Line 2103 C++

  msvcr90d.dll!_free_dbg_nolock(void * pUserData=0x0a69aa00, int nBlockUse=1)  Line 1317 + 0x9 bytes C++

  msvcr90d.dll!_free_dbg(void * pUserData=0x0a69aa00, int nBlockUse=1)  Line 1258 + 0xd bytes C++

  msvcr90d.dll!free(void * pUserData=0x0a69aa00)  Line 49 + 0xb bytes C++

  Modeler.exe!___GKfree()  + 0x16 bytes C

  Modeler.exe!___CompressGraph()  + 0x541 bytes C

  Modeler.exe!_METIS_NodeND()  + 0x18c bytes C

  Modeler.exe!_taucs_ccs_augment_nonpositive_offdiagonals()  + 0xcf9 bytes C

  Modeler.exe!_taucs_ccs_order()  + 0xed bytes C

  Modeler.exe!_taucs_linsolve()  + 0x480 bytes C

  Modeler.exe!CGAL::Taucs_symmetric_solver_traits<double>::linear_solver(const CGAL::Taucs_symmetric_matrix<double> & A={...}, const CGAL::Taucs_vector<double> & B={...}, CGAL::Taucs_vector<double> & X={...}, double & D=1.0000000000000000)  Line 156 + 0x31 bytes C++

  Modeler.exe!CGAL::Poisson_reconstruction_function<CGAL::Epick>::solve_poisson<CGAL::Taucs_symmetric_solver_traits<double> >(CGAL::Taucs_symmetric_solver_traits<double> solver={...}, double lambda=0.10000000000000001)  Line 366 + 0x1b bytes C++

  Modeler.exe!CGAL::Poisson_reconstruction_function<CGAL::Epick>::compute_implicit_function<CGAL::Taucs_symmetric_solver_traits<double> >(CGAL::Taucs_symmetric_solver_traits<double> solver={...})  Line 232 + 0x19 bytes C++

  Modeler.exe!CGAL::Poisson_reconstruction_function<CGAL::Epick>::compute_implicit_function()  Line 257 C++

  Modeler.exe!MeshReader::run()  Line 203 + 0xb bytes C++

  QtCored4.dll!QThreadPrivate::start(void * arg=0x00c4fa58)  Line 315 C++

  msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes C

  msvcr90d.dll!_threadstartex(void * ptd=0x038228f0)  Line 331 C



P.S. -- No such problem when I run the program on Mac.

Yifei



Archive powered by MHonArc 2.6.16.

Top of Page