Opened 8 years ago

Closed 2 years ago

#3266 closed bug (wontfix)

Segment fault with WxHaskell and GHC 6.10.2

Reported by: mcastellazzi Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.2
Keywords: wxhaskell Cc:
Operating System: Windows Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

When i compile this very simple program :

module Main where

 import Graphics.UI.WX

 main :: IO ()
 main = start gui

 gui :: IO ()
 gui = do
  frame [text := "Hello World!"]
  return ()

and that I run it with DOS, I get the error : "Segment fault/access violation in generated code" as soon as the mouse passes over the displayed window.

When I compile it and run it with GHCI, under Windows, I get the extra informations :

Signature du problème :
  Nom d’événement de problème:	APPCRASH
  Nom de l’application:	ghc.exe
  Version de l’application:	0.0.0.0
  Horodatage de l'application:	49d14878
  Nom du module par défaut:	comctl32.dll_unloaded
  Version du module par défaut:	0.0.0.0
  Horodateur du module par défaut:	4549bcb0
  Code de l’exception:	c0000005
  Décalage de l’exception:	73828219
  Version du système:	6.0.6000.2.0.0.768.3
  Identificateur de paramètres régionaux:	1036
  Information supplémentaire n° 1:	916f
  Information supplémentaire n° 2:	5a80fd0e43273a8de02792153de3009a
  Information supplémentaire n° 3:	3cbc
  Information supplémentaire n° 4:	a7ba763d72dae8d739732c4202cd60ca

I get the same error with almost all the demo programs delivered with WxHaskell.

I have Windows Vista, GHC 6.10.2, wxHaskell 0.11.1.2 et WxWidgets 2.8.9.

Change History (4)

comment:1 Changed 8 years ago by EricKow

Perhaps you meant to submit this to the wxHaskell bugtracker?

comment:2 Changed 8 years ago by igloo

Description: modified (diff)
difficulty: Unknown

comment:3 Changed 8 years ago by igloo

Milestone: _|_

My hunch is that, as Eric suggests, it is a wxHaskell bug, probably due to different threads calling wxHaskell functions. GHCi is compiled with -threaded, which might explain why you see the problem in ghci but not when running compiled code.

If you think that it is a GHC bug then it would be very helpful if you could make this example self-contained, just inlining the few wxHaskell functions and FFI imports that are used.

I'll leave the ticket open while its cause is unconfirmed.

comment:4 Changed 2 years ago by thomie

Resolution: wontfix
Status: newclosed
Type of failure: None/Unknown

We no longer support GHC 6.10.

Note: See TracTickets for help on using tickets.