salewski@nuc ~/hhh5 $ nim c --gc:arc -d:useMalloc -d:noSignalHandler -g
drawingarea.nim
Hint: used config file '/home/salewski/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/salewski/Nim/config/config.nims' [Conf]
............................................................................................
CC: stdlib_assertions.nim
CC: stdlib_digitsutils.nim
CC: stdlib_formatfloat.nim
CC: stdlib_io.nim
CC: stdlib_system.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/glib.nim
CC: stdlib_times.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/gobject.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/gio.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/cairo.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/gdk.nim
CC: ../.nimble/pkgs/gintro-#v0.9.2/gintro/gtk.nim
CC: drawingarea.nim
Hint: [Link]
Hint: gc: arc; opt: none (DEBUG BUILD, `-d:release` generates faster code)
200616 lines; 4.223s; 354.379MiB peakmem; proj:
/home/salewski/hhh5/drawingarea.nim; out: /home/salewski/hhh5/drawingarea
[SuccessX]
salewski@nuc ~/hhh5 $ ./drawingarea
appStartup
pattern =destroy
Context =destroy
Segmentation fault (core dumped)
salewski@nuc ~/hhh5 $ valgrind ./drawingarea
==3039== Memcheck, a memory error detector
==3039== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3039== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==3039== Command: ./drawingarea
==3039==
appStartup
==3039== Source and destination overlap in memcpy_chk(0x1ffeffd390,
0x1ffeffd390, 32)
==3039== at 0x4851C97: __memcpy_chk (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==3039== by 0x4FC31A8: g_get_language_names_with_category (in
/usr/lib64/libglib-2.0.so.0.6800.3)
==3039== by 0x4FEB31B: g_key_file_get_locale_string (in
/usr/lib64/libglib-2.0.so.0.6800.3)
==3039== by 0x640C344: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x640C5F0: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x640CF65: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x640D901: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x641027D: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x6410934: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x6410D7E: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x6429110: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x634E482: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039==
pattern =destroy
Context =destroy
==3039==
==3039== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==3039== Bad permissions for mapped region at address 0x56339C0
==3039== at 0x56339C0: ??? (in /usr/lib64/libcairo.so.2.11600.0)
==3039== by 0x10E31B: nimDestroyAndDispose (arc.nim:172)
==3039== by 0x1122DA:
eqdestroy__OOZOnimbleZpkgsZgintro4535v48O57O50ZgintroZgobject_167 (arc.nim:210)
==3039== by 0x11238D:
GC_unref_OOZOnimbleZpkgsZgintro4535v48O57O50ZgintroZgobject_160 (arc.nim:211)
==3039== by 0x11308F:
gcurefsurface_OOZOnimbleZpkgsZgintro4535v48O57O50ZgintroZcairo_723
(cairoimpl.nim:153)
==3039== by 0x54E64B6: ??? (in /usr/lib64/libcairo.so.2.11600.0)
==3039== by 0x113881:
eqdestroy__OOZOnimbleZpkgsZgintro4535v48O57O50ZgintroZcairo_26 (cairo.nim:30)
==3039== by 0x1148A6:
eqsink__OOZOnimbleZpkgsZgintro4535v48O57O50ZgintroZcairo_49 (cairo.nim:35)
==3039== by 0x1207B8: dareaConfigureCallback_drawingarea_161
(cairo.nim:35)
==3039== by 0x1209CA:
connect_for_signal_cdecl_configure_event2_drawingarea_561 (macros.nim:546)
==3039== by 0x6657AD6: ??? (in /usr/lib64/libgtk-3.so.0.2404.25)
==3039== by 0x5180C47: g_closure_invoke (in
/usr/lib64/libgobject-2.0.so.0.6800.3)
==3039==
==3039== HEAP SUMMARY:
==3039== in use at exit: 6,171,110 bytes in 27,209 blocks
==3039== total heap usage: 263,018 allocs, 235,809 frees, 21,695,073
bytes allocated
==3039==
==3039== LEAK SUMMARY:
==3039== definitely lost: 5,312 bytes in 11 blocks
==3039== indirectly lost: 26,165 bytes in 1,098 blocks
==3039== possibly lost: 5,988 bytes in 70 blocks
==3039== still reachable: 5,994,805 bytes in 24,833 blocks
==3039== of which reachable via heuristic:
==3039== newarray : 592 bytes in 12 blocks
==3039== suppressed: 0 bytes in 0 blocks
==3039== Rerun with --leak-check=full to see details of leaked memory
==3039==
==3039== For lists of detected and suppressed errors, rerun with: -s
==3039== ERROR SUMMARY: 78 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
salewski@nuc ~/hhh5 $
Run