massung / r-cade

Retro Game Engine for Racket
https://r-cade.io
Other
273 stars 13 forks source link

sfTexture error after pulling in latest version #12

Closed Fedreg closed 4 years ago

Fedreg commented 4 years ago

Howdy!

r-cade was working great a couple weeks ago and just pulled in the latest version today and am now getting this error when trying to initialize a game, i.e. (play)

; sfTexture*->C: argument is not non-null `sfTexture*' pointer
;   argument: #f
; Context:
;  /Users/ME/Library/Racket/7.5/pkgs/r-cade/game.rkt:114:0 run17
;  /Applications/Racket v7.5/collects/racket/repl.rkt:11:26

this happens on...

(run game-loop 128 128)


This happens both in emacs and in the terminal.

Sorry, I'm an absolute Racket beginner and unfamiliar with the C Libs so thought I'd post this first before digging in more.

My system:
- 2019 MacBook Pro running 10.14.6
- OpenGL 4.1
- csfml 2.5 
- openal-soft 1.20.1 
- libsndfile 1.0.28 

Let me know if I can provide any more info

Thanks again for r-cade!!!
massung commented 4 years ago

So, I've been trying and cannot reproduce this no matter what I do (admittedly I do not have a Mac to test on, though). But it's promising that everything was working before for you.

Line 114 in game.rkt is just the very beginning on the run function, so I wonder if you happened to update just the wrong time where maybe I was in the middle of a fix and uploaded 2 versions back-to-back? The particular error you're seeing would happen on this line:

https://github.com/massung/r-cade/blob/master/game.rkt#L129

And it would mean that it failed to create the texture and returned NULL instead of a valid sfTexture*.

One last thought: when you grabbed the latest R-cade, did you also grab the latest csfml package with it? I don't yet have them hooked up with proper version #'s (on my TODO list) and there was a fix to my CSFML bindings. Maybe something out of sync between them is causing an issue?

$ raco pkg update csfml
$ raco pkg update r-cade

If those don't work I'll have to ping a friend who has a Mac so I can try and debug on his machine. Thanks!

Fedreg commented 4 years ago

Thanks for the quick reply!

Don't go to any trouble trying to run this down on a mac. I did have the latest csfml but pulled it in through homebrew, not raco (not sure if that makes any difference...)

I'll try those and clear out a couple dependencies. I'm sure it's just some odd dependency issue on my end. I also have Linux box I can run this on as well.

Appreciate the help and will let you know if I can't get unstuck.

Cheers