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

Author Topic: Very odd rendering issue  (Read 7266 times)

0 Members and 1 Guest are viewing this topic.

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Very odd rendering issue
« on: February 24, 2015, 11:42:36 am »
One person just reported this bug for Pioneers. This is what their main menu looks like:


Full sized image


This is what it's supposed to look like:


Full sized image


At first they reported similar visual defects but the game crashed on launch. I then asked them to upgrade the video drivers and that solved the crash but the defects remained. I thought this might be a texture rendering issue (npot or what have you) but notice the white window with buttons in it? The white background is just a RectangleShape, so no textures involved.

Quote
AMD Radeon HD 7620G + HD 8600M Dual Graphics. Windows 8.1

I'm not able to reproduce it on my machine obviously but I had a fresh install of Win 8 on my other partition and the game also crashed on launch (no defects) until I installed the Nvidia video drivers (it had the default drivers previously, I presume) so why does SFML crash in that situtation?

I have no snippets of code to post because this is not caused by a snippet of code, I'm sure of that.

Does anyone have any idea what might cause such a thing? I can't even describe what's going on ... like all the rows of pixels are there but the columns are all messed up?

edit: This only seems to happen in window mode. In fullscreen everything is fine.
« Last Edit: February 24, 2015, 11:51:19 am by eigen »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Very odd rendering issue
« Reply #1 on: February 24, 2015, 12:26:52 pm »
Since he has a dual GPU which one is he running it on?
Do you redirect sf::err() somehow, i.e. can you get the error output of SFML (if there's any)?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Re: Very odd rendering issue
« Reply #2 on: February 24, 2015, 12:40:04 pm »
Oh, I didn't notice it was a dual card thing. I'll ask. And I'm not redirecting the output anywhere but I compiled a debug executable where the errors are written to a file. Let's see.

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Re: Very odd rendering issue
« Reply #3 on: February 24, 2015, 01:14:09 pm »
Okay, so there are no errors in the log file and they are not sure how to see or choose which of the cards is used.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Very odd rendering issue
« Reply #4 on: February 24, 2015, 03:52:34 pm »
Catalyst should tell them.



Often they are set to use the less demanding card in power saving mode, i.e. when they are running on batteries.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Re: Very odd rendering issue
« Reply #5 on: February 26, 2015, 03:57:51 pm »
Quote
In Catalyst I can only turn off/on Dual Graphics. It dont make any effect on a game.

So, I found out that if resolution of window is lower than 1366x768(my monitor resolution), the bug is disappearing.

Not really a solution but whatever ... why is AMD such a pain? Nvidia cards have caused me no trouble but AMD drivers keep messing SFML up. >:(

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Very odd rendering issue
« Reply #6 on: February 26, 2015, 04:23:42 pm »
Not really a solution but whatever ... why is AMD such a pain? Nvidia cards have caused me no trouble but AMD drivers keep messing SFML up. >:(
It's not really AMD's fault. I have a desktop and laptop both running with AMD (Linux and Windows) and SFML runs fine in every scenario. The laptop doesn't contain a dual graphics solution. What lies outside of AMD's control is how laptop vendors choose to implement their dual graphics solutions. This depends on the vendor, and is (to my knowledge) never exactly the same between 2 vendors. If you read more about how this is implemented in general, you will notice a lot of hacks that are thrown in. This works if you are an API/developer that gets a lot of support (*cough* DirectX *cough*) but is hell if you are an indie developer or an API that barely anyone uses (nobody uses OpenGL, am I right? Right??).

The real problem is that dual graphics solutions haven't been standardized yet since it is still (relatively) new. There isn't even a way for applications to select which adapter they want to run on. The driver is supposed to "intelligently select the right one automatically", which can often be translated to "does the application load d3d11.dll?". It will hopefully get better in the future, but for now we just have to live with it.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Re: Very odd rendering issue
« Reply #7 on: February 26, 2015, 05:25:55 pm »
Since my player-base is relatively large (> 1000) then these situations come up time to time and I have asked people to install latest drivers more than once. And it's nearly always involves AMD cards. Not SFML's fault, of course.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Very odd rendering issue
« Reply #8 on: February 26, 2015, 05:42:22 pm »
While it might not directly be SFML's fault, if enough people experience this exact problem then there will be a big enough sample size to try to spot the commonalities between them and think of a feasible workaround. The hard part is thinking of a reliable and efficient way of collecting data from all those users. I could already think of a lot of hardware/OpenGL information that would help with this, but to get it you would have to write low level platform-specific context code and after that convince your users to run it and provide you with the data.

How often has this occurred out of your > 1000 player-base? Are the users (still) willing to help you debug this issue?
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

eigen

  • Jr. Member
  • **
  • Posts: 64
  • Brobdingnagian ding dong
    • View Profile
    • Pioneersgame.com
Re: Very odd rendering issue
« Reply #9 on: February 26, 2015, 07:03:00 pm »
It's never the exact same problem. It manifests in different ways. This last glitch is a new one. But I've seen where my font renderer only drew red rectangles (it's basically just drawing subrects of a texture) or it just BSOD'd on launch. Sadly the bugs have come and gone as have the people over the years so debbuging is not really an option.

The % of people having problem is miniscule (or at least the number of people reporting these things is) but for an indie developer every player is valuable. So I'm just hoping as the time goes on these things get standardized and drivers get more stable. I can only imagine the legacy hacks in the driver's codebases...

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Very odd rendering issue
« Reply #10 on: February 26, 2015, 07:13:55 pm »
This is the reason why many modern games have some form of telemetry already built into them. If/When something goes wrong, the user would only have to click on a button to automatically send useful information back to the developers. The only problem is that SFML doesn't provide a standardized way of collecting platform-independent information (yet?), so this would have to be coded in by hand.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Very odd rendering issue
« Reply #11 on: February 26, 2015, 07:26:07 pm »
@binary1248 I have some experience gathering info(*) like stacktraces, opengl details, hardware details, OS details etc on Windows, Linux, OS X and a few other *NIX platforms.
If there's interrest I could probably do a "collect bug-report details" function fairly quickly that would gather a bunch of relevant info across platforms in a semi-structured form.
If that data should then be written to a file, emailed, uploaded somewhere or whatever would then of course be up to the user of the function(s), but it could be a nice starting point.
Should I spend a bit of time on this or would it be hopeless to ever get merged?

* I spent a few years, a while back, working on a system monitoring tool (SysOrb).
« Last Edit: February 26, 2015, 07:31:38 pm by Jesper Juhl »

MrMuffins

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Very odd rendering issue
« Reply #12 on: February 26, 2015, 07:58:37 pm »
Huh. Interesting this is here, I had this same thing happen on one of my test builds. Out of the blue everything looked like that first picture. Like really 2 days ago. I just considered it a random screw-up non-related to my code or sfml since its been tested and re-ran like a thousands times. I could be wrong or a bad coder...

I still have this http://i.imgur.com/agsJfgnh.jpg bf3 picture from when drivers go bad. Although you said they did update their drivers however. It happened on me intel gpu though so maybe not exclusive to amd cards. Just stating what I know.

Quote
why is AMD such a pain? Nvidia cards have caused me no trouble
Bit off-topic not related to sfml but I find it funny I had trouble with nvidia where a few programs will actually crash no matter what you do (also evidence by alot of people with nvidia) meanwhile amd gpu installed and working perfectly. And anyone else running amd can run the programs.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Very odd rendering issue
« Reply #13 on: February 26, 2015, 08:23:41 pm »
Should I spend a bit of time on this or would it be hopeless to ever get merged?
If you want, you can create a new thread on the feature request forum and discuss there.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Very odd rendering issue
« Reply #14 on: February 26, 2015, 08:26:34 pm »
@binary1248 OK. I'll do that - probably tomorrow since I'm out having a few beers with friends tonight ;-)  We can discuss details in that new thread then.