From: "François Bobot" <francois.bobot@cea.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] RFH: can't figure out why my QT5 widget bindings segfault
Date: Wed, 23 Mar 2016 18:18:12 +0100 [thread overview]
Message-ID: <56F2CFD4.4000401@cea.fr> (raw)
In-Reply-To: <CALbq6kmshp_602-48KFXpkSP_4e3QCC0O2hedw0XvPhBejXnUg@mail.gmail.com>
On 23/03/2016 16:18, Anatoly Zaretsky wrote:
> On Wed, Mar 23, 2016 at 12:50 PM, Goswin von Brederlow <goswin-v-b@web.de
> <mailto:goswin-v-b@web.de>> 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.
And in the future of no-naked pointer it will be forbidden. Perhaps it should be added to the ocaml
documentation with the precise future rules [1].
The segfault is in C++ code, so I think it is not this problem. Moreover no asserts of the debug
runtime are broken. On debian I don't know how to install qt5 in debug mode, so I'm not able to see
in gdb which pointer is at fault.
NB: the INSTALL file forget to ask to install qt5 development file, even if it is obviously needed ;).
[1]: https://github.com/ocaml/ocaml/pull/297#issuecomment-159233967
--
François
next prev parent reply other threads:[~2016-03-23 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 10:50 Goswin von Brederlow
2016-03-23 15:18 ` Anatoly Zaretsky
2016-03-23 17:18 ` François Bobot [this message]
2016-03-24 10:25 ` Goswin von Brederlow
2016-03-25 11:28 ` Goswin von Brederlow
2016-03-29 22:29 ` SP
2016-03-31 10:21 ` Goswin von Brederlow
2016-03-31 11:00 ` Jonas Jensen
2016-04-02 11:38 ` Goswin von Brederlow
2016-04-06 22:56 ` SP
2016-04-07 7:43 ` Goswin von Brederlow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56F2CFD4.4000401@cea.fr \
--to=francois.bobot@cea.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox