Hello. On Wed, Mar 23, 2016 at 12:50 PM, Goswin von Brederlow wrote: > I'm stuck with a bug in the Tetrix example for my QT5 bindings: > > https://github.com/mrvn/ocaml-qt5 > > The segfault happens when you click start and the first piece is moved > one tile down in caml_mrvn_QT5_OPainter_fillRect. The arguments to the > call all look ok but something must corrupt the painter. The segfault > goes away when I force a Gc.full_major before creating a new OPainter > in TetrixBoard:148. > Just a wild guess: there are a lot of raw c++ pointer casts to ocaml values in the code, and to quote http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html#sec424 "this can crash the garbage collector" in some non-obvious circumstances.