wxHaskell
wxHaskell copied to clipboard
Random crashes in Windows upon use of (:~) with Event
- When
(:~)is used withset ... [on command ...], program crashes, and printsSegmentation fault/access violation in generated codemessage; - Crashes occur frequently, but not always;
- In case when tested with only one object, crash never happens immediately after start;
- Upon use of
(:=), everything works fine; - Sample code is provided.
This issue was fully decribed in HeinrichApfelmus/reactive-banana#62.
- when line with
(:=), marked with a comment, is used, everything is perfectly fine - when
(:~)is used, random crashes occur frequently.
> import Control.Monad (replicateM, mapM_)
> import Graphics.UI.WX
> main = start $ do
> pad <- frame [ ]
> buttons <- replicateM 2
> $ button pad []
> mapM_ (flip set [on command := return ()]) buttons -- OK
> mapM_ (flip set [on command :~ const (return ())]) buttons
Cannot reproduce bug with this environment:
- wxWidgets: 2.9.5
- ghc: 7.6.3
- MinGW (for wxWidgets build): 5.1.16
- MinGW (for wx build) - default for Haskell Platform.
- MSYS: 1.0
- wx: 0.90.1.1