<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Speaking generally, stack frames 7 + 6 are nonsense indicating that
there is a link issue or a memory trasher involved (my guess).<br>
<br>
<div class="moz-cite-prefix">On 06/02/2018 02:52 AM, Guillaume
Jacquenot wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAB8-E4DBCkFQfiwpPs6kDjfSx9OqKL-gJUrKwk9UsJd4+swKTA@mail.gmail.com">
<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"
moz-do-not-send="true">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/"
moz-do-not-send="true">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/"
moz-do-not-send="true">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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="https://public.kitware.com/mailman/listinfo/vtkusers">https://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Paul D. Hahn
CompIntense HPC, LLC
</pre>
</body>
</html>