Giter Club home page Giter Club logo

Comments (7)

HeinrichApfelmus avatar HeinrichApfelmus commented on June 3, 2024

That's a tough one. I don't have access to a Windows machine and can't test it.

Chances are that event0 calls the underlying wxWindows library in ways that it can't handle. However, it may also be that I messed up something with observable sharing, which would explain the non-deterministic nature of the crash. Then, the fault would be with reactive-banana.

Does the problem appear on other machines as well? Does a similar example for wxHaskell exhibit the same problem?

from reactive-banana.

sukhmel avatar sukhmel commented on June 3, 2024

Sorry for long reply.
I had no other Win machine, but will try to reproduce the bug on other computers. Some time later I will also test similar scenario with pure wxHaskell. I can provide some more debug output, if I kno, what and how to collect.

from reactive-banana.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 3, 2024

I can't reproduce the crash on OS X 10.6. That said, only a single button is shown on my screen. No idea why, but since no layout has been specified, this behavior is not forbidden, at least.

from reactive-banana.

sukhmel avatar sukhmel commented on June 3, 2024

I tested compiled code on another Win-machine, behaviour is the same. Although I am not able to compile from source there.

Speaking of only one button -- that's how it's supposed to be, layout does not affect the issue.
I still haven't tried pure wxHaskell example, as I'm not sure it will be very informative if that code is supposed to create responses on command for all buttons and do nothing more.

from reactive-banana.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 3, 2024

The pure wxHaskell version allows us to distinguish between problems in reactive-banana (which I could fix) and wxHaskell (which I can't fix). If the issue persists in a version that only uses wx and not reactive-banana, then we have the latter situation.

from reactive-banana.

sukhmel avatar sukhmel commented on June 3, 2024

I have compiled under windows without reactive-banana completely.

When line with (:=), marked as (*) is used, everything is perfectly fine,
but when I use (:~) as in reactive-banana-wx event1ToAddHandler,
random crashes occur frequently.

I guess, that it might be an issue with incorrect version of wx on my machine,
nevertheless, I believe this is better be reported to maintainers of wxHaskell.
I'll post an issue to wxHaskell.

> 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 -- (*) fine
>        mapM_ (flip set [on command :~ const (return ())]) buttons

from reactive-banana.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 3, 2024

Looks like it's an issue with wxHaskell, then, so I can't do much about it. I'll close the issue here, but feel free to to reopen!

If wxHaskell is giving you too much trouble, you may want to have a look at my other project threepenny-gui. It's a small GUI framework that uses the web browser and has FRP built in.

from reactive-banana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.