Skip to content

init_window/3 hangs and doesn't open a window on MacOS #7

Description

@japhib

Hi,

Awesome project! Would love to make some games using Elixir.

However, when I try to run the example (or even just run Rayex.Core.init_window/3 in iex) it hangs indefinitely and doesn't open a window or do anything else as far as I can tell. By using a local version of raylib and adding a bunch of log statements, I'm able to pin down the problem to this line in GLFW:

    if (![[NSRunningApplication currentApplication] isFinishedLaunching])
        [NSApp run];

https://github.com/raysan5/raylib/blob/master/src/external/glfw/src/cocoa_init.m#L555

(Note this is on MacOS, hence the objective-C.) It's the [NSApp run] call that seems to just hang forever. I tried removing that line but I get a completely different error that makes it seem like that line probably shouldn't be removed. And I'm guessing that there's a better solution than fiddling around with the GLFW sources, since it wouldn't be ideal to have to use a fork of GLFW just for this one project.

Any ideas what could be going wrong here? Has anyone else been able to get this running on mac?

System details:

macOS Big Sur 11.6.1
elixir 1.12
erlang 24.1.7

Note -- the problem isn't Raylib or GLFW, since I'm able to compile and run the basic Raylib example with C.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions