Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac: Screen blank with gfx_sdl (hróðvitnir not compiled with gfx_sdl2) #1231

Closed
greay opened this issue Dec 29, 2021 · 9 comments
Closed
Labels
bug Yeah... that's broken build process To do with compiling the OHRRPGCE controls Keyboard, mouse and joystick/gamepad input/controls gfx_sdl Specific to the SDL 1.2 graphics/IO backend os: mac Specific to Macs packaging Packaging/installing the engine or games (Distribute Game) rel: hrodvitnir Present in hróðvitnir 2021-09-13 rel: New in ... Introduced in the tagged "rel:" release/nightlies resolved: obsolete Unfixed, but only affects obsolete systems or backends

Comments

@greay
Copy link

greay commented Dec 29, 2021

after authorizing OHRRPGCE-Custom to recieve keystrokes from any application, the application window is blank. Subsequent relaunches changes nothing.

The console is filled with this:

error 13:27:01.098484-0800 ohrrpgce-custom CGContextDrawImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
error 13:27:01.098510-0800 ohrrpgce-custom CGContextFlush: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

@rversteegen
Copy link
Contributor

Hi, which version are you using? (It will be printed in c_debug.txt). I know that older versions builds suffer this problem on recent Mac OS versions (I'm not sure whether it was because they were 32-bit, or gfx_sdl, or used old SDL versions; apparently I never filed that bug anywhere, not even in the Bughunters table), but this ought to be fixed in the latest stable release, hróðvitnir.

As for the authorization to receive keystrokes, I had never heard of it, but looking into it I found that it was a problem in SDL2 (not SDL 1.2) that was fixed in SDL 2.0.10. We upgraded to SDL 2.0.12 on Mac well over a year ago, so please upgrade to a the latest OHRRPGCE version.

@rversteegen rversteegen added bug Yeah... that's broken controls Keyboard, mouse and joystick/gamepad input/controls os: mac Specific to Macs gfx_sdl2 Specific to the SDL 2 graphics/IO backend labels Dec 30, 2021
@greay
Copy link
Author

greay commented Dec 30, 2021

I don't know where c_debug.txt gets put on mac, so I can't get it from there, but the About dialog shows "O.H.R.RPG.C.E version hróðvitnir 20210913"

I'm on macOS 11.6.1 (20G224)

@rversteegen
Copy link
Contributor

Oh dear, guess those are new Mac/SDL problems then; I'll search the SDL bug tracker.

But it still would be very useful to see c_debug.txt. It's normally created next to OHRRPGCE-Custom.app (or next to the .rpg once you load one), but is deleted when quitting if there are no errors. However Gatekeeper on Mac does "App Translocation" of downloaded apps, which causes the file to go to a temp directory instead. Last I checked, moving the .app out of your Downloads directory deactivates translocation. Also, you can try pressing Ctrl-F8 or Shift-F8 in Custom which normally opens c_debug.txt, and might still work.

@greay
Copy link
Author

greay commented Dec 30, 2021

shift-F8 did not work until after I manually removed the quarantine flag from the terminal. But after that, I was able to find c_debug.txt

setup_exception_handler

0.4 ----Starting OHRRPGCE Custom----
0.4 12-30-2021 12:07:06
0.4 OHRRPGCE hróðvitnir 20210913.12432 gfx_sdl/music_sdl FreeBASIC 1.06.0 (04-29-2016) LLVM 8.0.0 + gcc 4.7.4 x86_64 Built on loyalist.local -gen gcc Mac OS X/Darwin 64-bit
0.4 exepath: /Applications/OHR RPG/OHRRPGCE-Custom.app/Contents/MacOS, exe: /Applications/OHR RPG/OHRRPGCE-Custom.app/Contents/MacOS/ohrrpgce-custom
0.4 orig_dir: /
0.4 curdir: /Applications/OHR RPG
0.4 Runtime info: music_sdl, SDL 1.2.15, SDL_Mixer 1.2.12 Mac OS 10.16.0
0.4 documents_dir: /Users/greay/Documents
0.4 prefer_gfx_backend: gfx backend sdl2 isn't available
0.4 Initialising gfx_sdl...
0.4 recenter_window_hint()
0.5 SDL: screen size 25601440
0.5 setvideomode zoom=2 w
h = 640,400 resizable=0 windowed=-1
0.5 gfx_sdl: created screensurface size=640400 depth=32 flags=4 R=ff00 G=ff0000 B=ff000000 A=0 is_RGBcolor=0
0.5 gfx_sdl "SDL 1.2.15 (0 joysticks) Driver:Quartz"
0.5 disable_native_text_input=0
0.5 unlock_resolution(320,200)
0.5 setvideomode zoom=2 w
h = 640,400 resizable=-1 windowed=-1
0.6 gfx_sdl: created screensurface size=640*400 depth=32 flags=14 R=ff00 G=ff0000 B=ff000000 A=0 is_RGBcolor=0
0.6 music_sdl, SDL 1.2.15, SDL_Mixer 1.2.12
0.6 music_sdl, SDL_Mixer 1.2.12 (22050Hz, Music decoders:WAVE,MIKMOD,NATIVEMIDI,OGG,FLAC,MP3 Sample decoders:WAVE,AIFF,VOC,OGG,FLAC)
0.6 Working in /Users/greay/Library/Application Support/OHRRPGCE/working0.tmp
0.6 ps -p 38633 -o command= > "/Users/greay/Library/Application Support/OHRRPGCE/temp_stdout.816642.tmp" 2> "/Users/greay/Library/Application Support/OHRRPGCE/temp_stderr.479922.tmp"
4.6 open '/Applications/OHR RPG/c_debug.txt'

@rversteegen
Copy link
Contributor

Yikes! I see that the Mac 64-bit hróðvitnir stable release was miscompiled. It was compiled using the obsolete gfx_sdl instead of gfx_sdl2. Thanks for reporting this. This wasn't noticed earlier because a lot of people use nightly builds instead, which aren't affected. So as a workaround you can download a nightly build. See https://rpg.hamsterrepublic.com/ohrrpgce/Downloads#Latest_Nightly_Version for the download link and warning. Currently, nightly builds are quite stable; there are no known new bugs or any other concerns.

James, can you recompile and replace the build? I expect we'll have the Ichorescent release pretty soon anyway... nice to have a correct build in the release archive though.

@rversteegen
Copy link
Contributor

Semi-related, I haven't gotten any Mac nightly build logs since Nov 2, although it's still building successfully.

@rversteegen rversteegen added build process To do with compiling the OHRRPGCE packaging Packaging/installing the engine or games (Distribute Game) rel: hrodvitnir Present in hróðvitnir 2021-09-13 rel: New in ... Introduced in the tagged "rel:" release/nightlies gfx_sdl Specific to the SDL 1.2 graphics/IO backend and removed gfx_sdl2 Specific to the SDL 2 graphics/IO backend labels Jan 1, 2022
@bob-the-hamster
Copy link
Collaborator

I re-ran release-mac.sh and then fixed the symlinks on the website. Should be good now!

(I also fixed the e-mail sending problem on the Mac nightly build box, curl was failing to pick up the ssl cert updates to the smtp server that we send through, I just fixed it by adding -k to the curl command line)

@greay
Copy link
Author

greay commented Jan 1, 2022

it works! 🙌

@rversteegen rversteegen added the resolved: obsolete Unfixed, but only affects obsolete systems or backends label Jan 2, 2022
@rversteegen
Copy link
Contributor

Great, thanks for testing.

Closing this as "resolved: obsolete" because there are two separate bugs here: hróðvitnir was miscompiled, and gfx_sdl doesn't work on recent macOS, which will never be fixed.

@rversteegen rversteegen changed the title screen is blank on macOS Mac: Screen blank with gfx_sdl (hróðvitnir not compiled with gfx_sdl2) Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Yeah... that's broken build process To do with compiling the OHRRPGCE controls Keyboard, mouse and joystick/gamepad input/controls gfx_sdl Specific to the SDL 1.2 graphics/IO backend os: mac Specific to Macs packaging Packaging/installing the engine or games (Distribute Game) rel: hrodvitnir Present in hróðvitnir 2021-09-13 rel: New in ... Introduced in the tagged "rel:" release/nightlies resolved: obsolete Unfixed, but only affects obsolete systems or backends
Projects
None yet
Development

No branches or pull requests

3 participants