Mac OS run problem

The worst monsters in the Hearthlands warp the fabric of space and time...

Re: Mac OS run problem

Postby loftar » Sat Mar 27, 2021 2:04 am

stya wrote:Edit: I can try to do some stuff to debug, I got the setup to build the client.

Nice! If you can get it, I'd like to check if the reported size of the window (MainFrame.getSize()), panel (JOGLPanel.getSize()) and the size of the OpenGL viewport (the x, y, w, and h parameters in JOGLPanel's GLEventListener's reshape callback) match the actual size of the window (whatever you can measure in pixels). If they do match the actual size, I'd also be interested to know if it makes any difference whatsoever if you just add random offsets to the parameters to the glViewport and/or glScissor calls (most easily accomplished by just adding arbitrary offsets in src/haven/render/gl/BGL.java, preferably the w and h parameters).
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: MAc OS run problem

Postby ubersheva » Sat Mar 27, 2021 9:46 am

loftar wrote:Looks like the same problem as in the OP, indeed. Haven used to work on OSX for you, right? Did something happen to make it stop work? As I mentioned above, I can't really imagine that I've changed anything in the client that would affect the interaction with the native windowing system, so I can't help but wonder if it isn't something that has changed in OSX since then.


Yes, haven used to worked for me on OsX when we were debugging the gl core profiles issue on osx. I don't remember if I ran the client on osx after render rewrite was released.
So the hanging issue I resolved by updating jogl to latest build. While looking at jogl source near the place where it locked, I found reference to this bug, maybe it's of use: https://jogamp.org/bugzilla//show_bug.cgi?id=1398 .

After update of jogl libraries, I saw same scaling problem as reported in this thread.
When the window is maximized, JOGLPanel reports this size: width=1440,height=878 (screen resolution minus window header I guess). GL callback gets following dimensions in reshape when maximizing: 2880x1756.
If I add following line to init() of the GL callback, the scaling problem goes away.
Code: Select all
setSurfaceScale(new float[] {1.0f, 1.0f});

Although, after logging in I get a resource-related exception (while the portrait is being drawed, I assume), but I think this may be due to some old resources are still somewhere in my local build.
Code: Select all
Exception in thread "Haven UI thread" java.lang.NoSuchMethodError: haven.TexR.tex()Lhaven/TexGL;
ubersheva
 
Posts: 68
Joined: Thu Apr 15, 2010 8:13 am

Re: MAc OS run problem

Postby loftar » Sat Mar 27, 2021 11:06 am

ubersheva wrote:Yes, haven used to worked for me on OsX when we were debugging the gl core profiles issue on osx. I don't remember if I ran the client on osx after render rewrite was released.

That was the rendering rewrite that we were testing then, so yes. :)

ubersheva wrote:So the hanging issue I resolved by updating jogl to latest build. While looking at jogl source near the place where it locked, I found reference to this bug, maybe it's of use:

Yes, I'm already aware of that bug. If that worked for you locally, does it also mean that the newer-JOGL launcher linked earlier in the thread resolves that specific problem for you?

ubersheva wrote:If I add following line to init() of the GL callback, the scaling problem goes away.

So you mean that, apart from the resource problem, that actually makes the client work for you exactly like it should? That sounds great. I'll have to look into what that call is actually supposed to be doing (it doesn't sound like something that should be necessary to call), and if it causes problems on other platforms, but that's great progress. Thanks for finding that!

Does it make any difference whether the sun.java2d.uiScale.enabled system property is set to false or not? The launcher sets that by default in order to work properly on Windows, so I'm wondering if that makes a difference here.

ubersheva wrote:When the window is maximized, JOGLPanel reports this size: width=1440,height=878 (screen resolution minus window header I guess). GL callback gets following dimensions in reshape when maximizing: 2880x1756.

The actual size in 2880x1756 rather than 1440x878 though, right? It is my impression that 2880x1800 is the monitor resolution of large classes of Macs.

ubersheva wrote:java.lang.NoSuchMethodError: haven.TexR.tex()Lhaven/TexGL;

Indeed that is indicative of an old resource. Are you using the correct resource URL? If you are, my assumption would be that you've polluted your cache with old resources somehow, and might need to clear it.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Mac OS run problem

Postby ubersheva » Sat Mar 27, 2021 12:24 pm

loftar wrote:Yes, I'm already aware of that bug. If that worked for you locally, does it also mean that the newer-JOGL launcher linked earlier in the thread resolves that specific problem for you?

Yes, it did.

loftar wrote:So you mean that, apart from the resource problem, that actually makes the client work for you exactly like it should?

Yes, looks perfect. I even tried setting ui scale to 150% in game option on the login screen and restarting (with that line still added). That worked also as expected - the login screen became bigger, but still properly placed and all visible.

loftar wrote:Does it make any difference whether the sun.java2d.uiScale.enabled system property is set to false or not? The launcher sets that by default in order to work properly on Windows, so I'm wondering if that makes a difference here.

No, adding -Dsun.java2d.uiScale.enabled=false didn't change sympthoms.

loftar wrote:The actual size in 2880x1756 rather than 1440x878 though, right? It is my impression that 2880x1800 is the monitor resolution of large classes of Macs.

Well, system's display properties window reports this resolution: 15,4-inch (2880 x 1800).
I tried changing resolution from Default to Scaled, per screenshot. That didnt change how client looks, and reported dimensions increased: width=1920,height=1178 for JOGLPanel and 3840x2356 for reshape callback.
Screenshot 2021-03-27 at 14.09.17.png
Screenshot 2021-03-27 at 14.09.17.png (253.44 KiB) Viewed 511 times


EDIT: Yep, after clearing resources dir the client works perfectly with addition of the above line.
ubersheva
 
Posts: 68
Joined: Thu Apr 15, 2010 8:13 am

Re: Mac OS run problem

Postby loftar » Sat Mar 27, 2021 1:23 pm

ubersheva wrote:
loftar wrote:Yes, I'm already aware of that bug. If that worked for you locally, does it also mean that the newer-JOGL launcher linked earlier in the thread resolves that specific problem for you?

Yes, it did.

Good to know. That probably means I should switch to that JOGL version by default, then. I'm just a bit worried that it might break something else instead. Different JOGL versions really seem to display different problems. I wonder of LWJGL works better. I've long avoided LWJGL simply because it has no AWT support, but I recently found lwjgl3-awt, which at least claims to fix that. I wonder if it would be worth porting to see if it's more stable in general.

ubersheva wrote:
loftar wrote:So you mean that, apart from the resource problem, that actually makes the client work for you exactly like it should?

Yes, looks perfect. I even tried setting ui scale to 150% in game option on the login screen and restarting (with that line still added). That worked also as expected - the login screen became bigger, but still properly placed and all visible.

That's great. As I said, I'll have to try and examine whether it causes problems on other platforms, but that seems like the solution, then. Thanks again for finding it!
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Mac OS run problem

Postby wafflecat » Sat Mar 27, 2021 4:00 pm

Hey, never thought I'd care about Mac support but I'm traveling for work right after the wipe amd will have a Mac with me. Any chance these fixes will be implemented by wipe?
And if not, how easy is it to fix it locally? Just a matter of installing some specific version of jogl?
User avatar
wafflecat
 
Posts: 260
Joined: Thu Dec 15, 2011 7:46 pm

Re: Mac OS run problem

Postby loftar » Sat Mar 27, 2021 5:51 pm

I've made the changes to the default client that should make this work. That also included upgrading to the latest JOGL version, so both Mac users and everyone else can please test the default client and see if that either makes it work for you, or breaks it for you. Thank you!
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: MAc OS run problem

Postby Elizaberry » Sat Mar 27, 2021 10:07 pm

loftar wrote:I did find that the JOGL project has released a new (pre-release) version. It would be interesting to know if that makes any difference for you. There's a variant client that uses the new JOGL version here:

http://game.havenandhearth.com/java/haf ... uncher.jar

messkaline wrote:well, I see the same issue on OS X 10.15.2 and OS X 10.14.6. So it is not related to OS update and it seems this bug came with one of latest game updates.... :roll:

If that is so, then I have to admit I have no idea what would have caused it. I haven't changed anything at all that would affect the interaction with the underlying windowing system lately. Are you sure you didn't receive some system updates in the same time period?



Hello, I am a mac user and could not use this after playing like a madwoman a few months ago. Big sur changed something but I tried this link and it works now. You fixed it so fast.

Loftar you are outstanding thank you for supporting Mac's.
Elizaberry
 
Posts: 25
Joined: Sun Feb 11, 2018 11:16 pm

Re: Mac OS run problem

Postby Kamekono » Sun Mar 28, 2021 1:55 am

loftar wrote:I've made the changes to the default client that should make this work. That also included upgrading to the latest JOGL version, so both Mac users and everyone else can please test the default client and see if that either makes it work for you, or breaks it for you. Thank you!


IT WOOOOOOOOORKSSSSSSSSSSSSSS :lol: :lol: :lol: :lol: :lol: 8-)

Thank you for getting it fixed before wipe :)
Kamekono
 
Posts: 170
Joined: Sat Jan 07, 2012 5:36 pm

Re: Mac OS run problem

Postby loftar » Sun Mar 28, 2021 2:01 am

Great to see that it works!

This is now the second time that ubersheva saves Mac users. I'm worried what might happen if Apple finally follows through on their warnings and actually removes OpenGL support.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

PreviousNext

Return to Bugs

Who is online

Users browsing this forum: No registered users and 70 guests