From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p9HGXA7v001938 for ; Mon, 17 Oct 2011 18:33:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQBAARYnE7UGyoBkWdsb2JhbABDp3Z1IgEBAQEJCwsHFAMigW4BAQV4ARALBB0WDwkDAgECAUUGDQEFAgEBh322boMrhF0Ek3qRWA X-IronPort-AV: E=Sophos;i="4.69,360,1315173600"; d="scan'208,217";a="124469310" Received: from smtp1-g21.free.fr ([212.27.42.1]) by mail1-smtp-roc.national.inria.fr with ESMTP; 17 Oct 2011 18:33:04 +0200 Received: from [IPv6:2a01:e35:1393:daa0:c9f0:81a6:60f:1a4e] (unknown [IPv6:2a01:e35:1393:daa0:c9f0:81a6:60f:1a4e]) by smtp1-g21.free.fr (Postfix) with ESMTP id 939999405AA; Mon, 17 Oct 2011 18:32:57 +0200 (CEST) Message-ID: <4E9C58B5.5010808@free.fr> Date: Mon, 17 Oct 2011 18:32:53 +0200 From: Emmanuel Dieul User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Adrien CC: Caml List References: <4E99EA23.6060406@free.fr> In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] ocamlrun: Segmentation fault (core dumped) Le 17/10/2011 14:17, Adrien a écrit :
On 15/10/2011, Emmanuel Dieul <emmanuel.dieul@free.fr> wrote:
Hi all,

I'm developing a little game using ocaml and lablgtk2. During the game
(under cygwin), I've got a segmentation fault for ocamlrun :

[emmanuel@localhost ~/]$ cat ocamlrun.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=610E73DA
eax=1BDCCE64 ebx=01E1C530 ecx=75A50C48 edx=00000000 esi=01E1C588
edi=1BB8CE64
ebp=1BB8CD98 esp=1BB8CD60
program=L:\programmation\cygwin\bin\ocamlrun.exe, pid 6260, thread unknown
(0x1CBC)
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
1BB8CD98  610E73DA  (01E1C530, 1BB8CDD4, 610E73A0, 01E1C530)
End of stack trace
[emmanuel@localhost ~/]$ ocaml -version
The Objective Caml toplevel, version 3.12.0

Is there a way to know if the problem comes from ocamlrun or if it comes
from the (labl)gtk libraries for windows?
Hi,

Do you have a backtrace?
You could run your application under gdb and use its "backtrace"
function to get one. It should show quite quickly whether the issue is
from lablgtk, gtk or something else.

Regards,
Adrien Nader

Although the message told me I've a core dumped, I have no core: I only have a stack trace.
It's the first time I use gdb. However, I found how to run my program into gdb. It produced the
same kind of error. Here, I could have more information :
(gdb) r
...
[New Thread 6724.0x1590]
[New Thread 6724.0x131c]
[New Thread 6724.0x1ad8]
[New Thread 6724.0xf6c]
[New Thread 6724.0x1920]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6724.0x14ac]
0x610e73da in pthread::thread_init_wrapper(void*) () from /cygdrive/l/programmation/cygwin/bin/cygwin1.dll
(gdb) backtrace
#0  0x610e73da in pthread::thread_init_wrapper(void*) () from /cygdrive/l/programmation/cygwin/bin/cygwin1.dll
#1  0x762b2ad6 in OutputDebugStringA () from /cygdrive/c/Windows/syswow64/KERNELBASE.dll
#2  0x40010006 in ?? ()
#3  0x00000000 in ?? ()
(gdb)
So, it seems cygwin is in trouble with my program... Damn !