<div dir="ltr"><div>Hello VTK developpers and users,</div><div><br></div>I am doing cross compilation with docker dockcross for a fortran program using VTK. Target is a static windows 64 bit program, which is about 43 MB.<div><br></div><div>- Without cross compilation, program works fine.</div><div>- With cross compilation, program works fine when launched with wine in a debian <br></div><div>- With cross compilation, program seems works fine on Windows, but throws error messages on error output: Â Program received signal SIGSEGV, Segmentation fault. This error is thrown even if the program just prints help and does nothing (no use of VTK code). </div><div><br></div><div>If I disable the VTK part of my program, error goes away. (VTK part = VTK library+ my wrapping Fortran code to call VTK with pointer storage to keep track of vtkSmartPointer). I use other libraries that work fine.</div><div><br></div><div><br></div><div>I don't know if it is related to VTK, but when I use gdb on Windows , I get some VTK stuff appearing (See below).</div><div><br></div><div>If anyone has a clue on how I can track this down? From the log, can we say it that error is mine or comes from cross compilation? Maybe I should use valgrind to see if everything really works fine with.</div><div><br></div><div>I have tried with the static VTK 6.3 version provided by mxe, and a personal static compilation of VTK 8.1.1.</div><div><br></div><div>Thanks for reading till this point and here comes the interesting thing:<br><div><br></div><div><div>  Â  build_windows>gdb testing.exe</div><div>  Â  GNU gdb (GDB) 7.8.1</div><div>  Â  Copyright (C) 2014 Free Software Foundation, Inc.</div><div>  Â  License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></div><div>  Â  This is free software: you are free to change and redistribute it.</div><div>  Â  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"</div><div>  Â  and "show warranty" for details.</div><div>  Â  This GDB was configured as "x86_64-w64-mingw32".</div><div>  Â  Type "show configuration" for configuration details.</div><div>  Â  For bug reporting instructions, please see:</div><div>  Â  <<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.</div><div>  Â  Find the GDB manual and other documentation resources online at:</div><div>  Â  <<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.</div><div>  Â  For help, type "help".</div><div>  Â  Type "apropos word" to search for commands related to "word"...</div><div>  Â  Reading symbols from testing.exe...done.</div><div>  Â  (gdb) r</div><div>  Â  Starting program: testing.exe</div><div>  Â  [New Thread 11212.0x362c]</div><div>  Â  warning: Could not load shared library symbols for C:\windows\system32\kernel64.dll.</div><div>  Â  Do you need "set solib-search-path" or "set sysroot"?</div><div><br></div><div>  Â  Test module initialized</div><div><br></div><div>  Â  Â  Â  . : successful assert, Â  F : failed assert</div><div><br></div><div>  Â  ..........................................</div><div>  Â  Program received signal SIGSEGV, Segmentation fault.</div><div>  Â  0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from C:\windows\SYSTEM32\ntdll.dll</div><div>  Â  (gdb) bt</div><div>  Â  #0 Â 0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from C:\windows\SYSTEM32\ntdll.dll</div><div>  Â  #1 Â 0x0000000000b95bb6 in detail::AtomicOps<8ull>::PreIncrement(detail::AtomicOps<8ull>::atomic_type*) ()</div><div>  Â  #2 Â 0x0000000000b81b0d in vtkTimeStamp::Modified() ()</div><div>  Â  #3 Â 0x0000000000b3a0b1 in vtkObject::Modified() ()</div><div>  Â  #4 Â 0x0000000000acdb18 in vtkCollection::~vtkCollection() ()</div><div>  Â  #5 Â 0x0000000001417817 in vtkObjectFactoryCollection::~vtkObjectFactoryCollection() ()</div><div>  Â  #6 Â 0x0000000000b3aa85 in vtkObjectFactory::UnRegisterAllFactories() ()</div><div>  Â  #7 Â 0x000007feff57908f in wcscspn () from C:\windows\system32\msvcrt.dll</div><div>  Â  #8 Â 0x00000000021f8348 in ?? ()</div><div>  Â  Backtrace stopped: previous frame inner to this frame (corrupt stack?)</div><div>  Â  (gdb) bt</div></div></div></div>