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 p9FKGin6020983 for ; Sat, 15 Oct 2011 22:16:47 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMCALvpmU7UGyoBlGdsb2JhbABDp215IgEBAQEJCwkJFAMigm0gARwWGAMCAQIBSw0IAQGHfZcunmKDK4RdBJN6kVg X-IronPort-AV: E=Sophos;i="4.69,351,1315173600"; d="scan'208,217";a="124277135" Received: from smtp1-g21.free.fr ([212.27.42.1]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Oct 2011 22:16:46 +0200 Received: from [IPv6:2a01:e35:1393:daa0:fdc6:b91b:ccda:ae51] (unknown [IPv6:2a01:e35:1393:daa0:fdc6:b91b:ccda:ae51]) by smtp1-g21.free.fr (Postfix) with ESMTP id 862E694045A for ; Sat, 15 Oct 2011 22:16:40 +0200 (CEST) Message-ID: <4E99EA23.6060406@free.fr> Date: Sat, 15 Oct 2011 22:16:35 +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: Caml List Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Caml-list] ocamlrun: Segmentation fault (core dumped) 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?

Manu
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 p9HCHjLo023799 for ; Mon, 17 Oct 2011 14:17:45 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8BADIcnE7RVde2kGdsb2JhbABDqF4IIgEBAQEJCQ0HFAQhgW4BAQEEEgIsARsdAQMMBgULDS4iAREBBQEcBhMIGp1PCotRgmCFBT2IbgIFCoMhhF0EjGyHDo0qPYNx X-IronPort-AV: E=Sophos;i="4.69,359,1315173600"; d="scan'208";a="124424605" Received: from mail-ey0-f182.google.com ([209.85.215.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Oct 2011 14:17:42 +0200 Received: by eyd10 with SMTP id 10so4632110eyd.27 for ; Mon, 17 Oct 2011 05:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OGKLXbvYlc8bmgHNR+pj6ZrpYSvuismC3PULr7Splus=; b=vqOC+S/V1tRqf0pZi60U7NHFoiL7Gw6qc8NYxpCYgMcLl6y7w3VN4llqjiwUv06XSh Kg0IBHmuqwJ+gubSf3nguqw/B9vJKzBN8ltKeFOsXGdhb7nZ6OaQ3WMXDFVTK/zNTSMg 1WUFWmOh0gd+NOd85P/tNNydAoLEwAtbUjavM= MIME-Version: 1.0 Received: by 10.213.3.209 with SMTP id 17mr988409ebo.120.1318853862395; Mon, 17 Oct 2011 05:17:42 -0700 (PDT) Received: by 10.213.27.77 with HTTP; Mon, 17 Oct 2011 05:17:42 -0700 (PDT) In-Reply-To: <4E99EA23.6060406@free.fr> References: <4E99EA23.6060406@free.fr> Date: Mon, 17 Oct 2011 14:17:42 +0200 Message-ID: From: Adrien To: Emmanuel Dieul Cc: Caml List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] ocamlrun: Segmentation fault (core dumped) On 15/10/2011, Emmanuel Dieul 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 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 !

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 p9HKfADa009112 for ; Mon, 17 Oct 2011 22:41:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBAIOSnE5KfVK2kGdsb2JhbABDmXKOWggiAQEBAQkJDQcUBCGBbgEBAQMBEgImBgEbHgMBCwYFCykSIxEBBQEcGSKHXQKZfwqLUYJghUk9iG4CBQqDIYRdBId8hHCHDoZThlU9g3I X-IronPort-AV: E=Sophos;i="4.69,361,1315173600"; d="scan'208";a="124493205" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Oct 2011 22:41:02 +0200 Received: by wyi40 with SMTP id 40so3806969wyi.27 for ; Mon, 17 Oct 2011 13:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=NnOmVMKqk+7yMtBU310XBMdZ8mO61Q1gD7k/7Iy+dss=; b=XQ8BLlQ7an+y2/zAc8k2dnfv4YzWpHL2vAspMZdd9enoytxI68Se8To3EY3Ss09ACt QhIeLHXlrInMZDU3WSAUmL+WJrWB9mbhalT7p9W+zIMInNUBuE3GLfJN75Nb2ekE6pXY QF5OPd6W6sIJWdQPNg/j8SIGFcHSM3+ax5RQo= Received: by 10.227.143.74 with SMTP id t10mr6347466wbu.68.1318884061766; Mon, 17 Oct 2011 13:41:01 -0700 (PDT) Received: from lemon.local.tld (58-231-133-95.pool.ukrtel.net. [95.133.231.58]) by mx.google.com with ESMTPS id a21sm5811837wbo.10.2011.10.17.13.40.54 (version=SSLv3 cipher=OTHER); Mon, 17 Oct 2011 13:41:00 -0700 (PDT) Date: Mon, 17 Oct 2011 23:40:39 +0300 From: ygrek To: caml-list@inria.fr Message-Id: <20111017234039.271bb7da6d4448b538fee050@gmail.com> In-Reply-To: <4E9C58B5.5010808@free.fr> References: <4E99EA23.6060406@free.fr> <4E9C58B5.5010808@free.fr> X-Mailer: Sylpheed 3.2.0beta1 (GTK+ 2.24.4; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] ocamlrun: Segmentation fault (core dumped) On Mon, 17 Oct 2011 18:32:53 +0200 Emmanuel Dieul wrote: > 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 ! OutputDebugStringA means there should be some useful info. Run it under windbg to see the message. Also look into system event logs. -- ygrek http://ygrek.org.ua 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 p9JKg85I024349 for ; Wed, 19 Oct 2011 22:42:08 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsABAMk1n07UGyoBkWdsb2JhbABEmhaNeHYiAQEBAQkLCwcUAyKBbgEBBR5aEQsEHRYPCQMCAQIBRRMGAgEBh362BIMwhGsEk36RWQ X-IronPort-AV: E=Sophos;i="4.69,374,1315173600"; d="scan'208,217";a="124809365" Received: from smtp1-g21.free.fr ([212.27.42.1]) by mail1-smtp-roc.national.inria.fr with ESMTP; 19 Oct 2011 22:42:02 +0200 Received: from [IPv6:2a01:e35:1393:daa0:8580:fe59:10d8:e396] (unknown [IPv6:2a01:e35:1393:daa0:8580:fe59:10d8:e396]) by smtp1-g21.free.fr (Postfix) with ESMTP id 53A83940191 for ; Wed, 19 Oct 2011 22:41:56 +0200 (CEST) Message-ID: <4E9F3613.7050105@free.fr> Date: Wed, 19 Oct 2011 22:41:55 +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: caml-list@inria.fr References: <4E99EA23.6060406@free.fr> <4E9C58B5.5010808@free.fr> <20111017234039.271bb7da6d4448b538fee050@gmail.com> In-Reply-To: <20111017234039.271bb7da6d4448b538fee050@gmail.com> 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 22:40, ygrek a écrit :
On Mon, 17 Oct 2011 18:32:53 +0200
Emmanuel Dieul <emmanuel.dieul@free.fr> wrote:

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 !
OutputDebugStringA means there should be some useful info.
Run it under windbg to see the message.
Also look into system event logs.
I tried to look after system logs, but I found nothing about this event.
I looked into Application and System logs of Windows, but I found nothing.

I also tried to run my program under windbg. With my first run (command GN
twice), I could see my program running and then stop with the same kind of error
(STATUS_ACCESS_VIOLATION).
However, I don't understand anything of what windbg told me :
0:000> KP 20
Child-SP          RetAddr           Call Site
00000000`0008e318 00000000`74b8601a ntdll!NtTerminateProcess+0xa
00000000`0008e320 00000000`74b7cf87 wow64!Wow64EmulateAtlThunk+0x86ba
00000000`0008e350 00000000`74b02776 wow64!Wow64SystemServiceEx+0xd7
00000000`0008ec10 00000000`74b7d07e wow64cpu!TurboDispatchJumpAddressEnd+0x2d
00000000`0008ecd0 00000000`74b7c549 wow64!Wow64SystemServiceEx+0x1ce
00000000`0008ed20 00000000`77384956 wow64!Wow64LdrpInitialize+0x429
00000000`0008f270 00000000`77381a17 ntdll!RtlUniform+0x6e6
00000000`0008f760 00000000`7736c32e ntdll!RtlCreateTagHeap+0xa7
00000000`0008f7d0 00000000`00000000 ntdll!LdrInitializeThunk+0xe
0:000>
As I'm clearly not even a usual user, this is completely unknown for me.