Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ashley

Pages: [1]
1
Aha, this is interesting. I kept searching and came across a totally irrelevant question where someone was having trouble setting the mouse cursor position and had to enable their game access to accessibility.

I thought, screw it, and had a look. It turns out my IDE (Rider) had asked for "Input Monitoring" permissions. I think this is new in Catalina, although apps should be able to monitor keyboard input while you are already within them...

In any case, enabling this (i.e. allowing reading keyboard input while another application is focused) setting on my IDE (not the game! perhaps it inherits it, since it's a sub-process, but I had also tried launching it from the terminal with dotnet to the same effect...) fixed it! I am totally perplexed why, but it works, so I'm happy.

I feel a bit embarrassed having solved this immediately after posting -- I've been struggling with this issue for a few days and was just about to start drafting up a minimal reproducible Objective-C example of this failing to report to an Apple help forum, but I'll leave this up incase anyone else in a similar position comes across this. I imagine there is probably very few people with a similar configuration (macOS, Rider, SFML.NET Core), but hopefully it helps someone :)

2
This is _kinda_ bridging into help request territory, but I'm not expecting any help since it's very specific and I imagine this is a weird issue on my system, so just asking the question to see if anyone's already ran into this. Hope that's cool!

I'd also appreciate anyone who has successfully been using SFML on Catalina without running into this issue letting me know so that I know if it's just me!

I'm running macOS Catalina, and SFML is failing to identify any keys on my keyboards. Specifically, I get an error from line 188 of https://github.com/SFML/SFML/blob/master/src/SFML/Window/OSX/HIDInputManager.mm: "We got a keyboard without any keys (1)".

This happens for any keyboard I plug into my system, and it definitely is searching on my keyboard devices since if I plug in two it prints it twice, one it prints it once, and zero it prints it zero times.

I am running a Hackintosh, which always may be the source of the problem, however I've never once experienced a keyboard problem with anything else, so I wonder if somehow there's an issue with SFML? Although it seems to be using a fairly standard AppKit library...

FWIW, I'm using SFML.NET Core 1.0, which in turn, I believe, uses SFML 2.5. I'm not doing anything crazy (just doing normal Keyboard.IsKeyDown calls) & this same code works flawlessly on Windows, Ubuntu and Mojave installs. In addition, my mouse works correctly, and the rest of my game logic works perfectly - just it doesn't observe any keyboard input.

3
DotNet / Re: System.DllNotFoundException on Mac OS
« on: September 16, 2019, 01:04:57 am »
Hey - I'm one of the other posters you linked to. Not sure if you've already fixed your issue, but I've followed up on my thread with how I fixed it. Happy to give further info it doesn't help :)

Edit: it looks like we're already using the same packages - huh.

I have ran `brew install csfml sfml` on my system; perhaps that is sufficient? Although not the best fix.

4
Necro, but it seems in retrospect I was just using the wrong Nuget packages.

The correct ones are currently SFML.{Net/System/...}/2.5.0.

For others in the same situation later, check the date of release of the Nuget packages and make sure you're not using years old ones!

5
Thanks for the reply!

Setting these environment variables just gets me a more verbose version of the same error, terminating in:

dyld: loaded: /Users/ashley/RiderProjects/SFML.NET Test/SFML.NET Test/bin/Debug/netcoreapp2.2/libcsfml-window.dylib
dyld: unloaded: /Users/ashley/RiderProjects/SFML.NET Test/SFML.NET Test/bin/Debug/netcoreapp2.2/libcsfml-window.dylib
dyld: loaded: libcsfml-window.dylib
dyld: unloaded: libcsfml-window.dylib

Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'libcsfml-window.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibcsfml-window.dylib.dylib, 1): image not found
   at SFML.Window.VideoMode.sfVideoMode_getDesktopMode()
   at SFML.Window.VideoMode.get_DesktopMode() in /Users/ashley/SFML.Net/src/Window/VideoMode.cs:line 86
   at SFML.NET_Test.Program.Main(String[] args) in /Users/ashley/RiderProjects/SFML.NET Test/SFML.NET Test/Program.cs:line 12


I wonder if one of my libraries is at the wrong version -- are you using builds of CSFML 2.5? I've tried 2.1, 2.2 and 2.5 and all of them seem to result in this issue for me.

Additionally, I don't have any other libraries in that folder outside of the SFML ones; are you including any openal dylibs or anything?

6
I was pretty excited about the migration to .NET Core (/standard?), and now I can build on any OS perfectly, which is fantastic as I can run CI on Linux now, but as soon as I try to actually run anything linking to SFML, the runtime linking fails on MacOS and Linux. This is true of examples, my own project, and a test project I set up to try to diagnose with a minimal example.

Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'libcsfml-graphics.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibcsfml-graphics.dylib.dylib, 1): image not found

One thing I found curious is that "dlopen(liblibcsfml-graphics.dylib.dylib)" call. It seems to me that the DllImport is prepending lib and appending .dylib of its own accord, so I tried removing the "lib" and ".dylib" from the const string in SFML.NET and rebuilding. This results in "dlopen(csfml-graphics)" which I find strange -- the appending seems to be conditional on it already being of the correct form.

I'm not sure if this is normal, but it seems very strange to me. In any case, I tried putting copies of the dylib file with all sorts of names - "csfml-graphics", "libcsfml-graphics.dylib" and "liblibcsfml-graphics.dylib.dylib" for good measure. It doesn't seem to find any of these, even though it correctly finds the corresponding DLLs on Windows in the same directory (I have these libraries in the execution directory in project-path/bin/.../).

I've spent quite a lot of time digging and playing around, but I'm not really getting anywhere, so I was wondering if anyone else has invested some time into running new builds on SFML.NET on MacOS without Mono? If so, I'd appreciate some pointers on how to get it working at runtime!

If no-one has gotten it working, but someone has some time and fancies helping, I'm happy to provide more information and a sample project.

Thanks in advance for any help and pointers!

Pages: [1]