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

Author Topic: Random graphics glitch  (Read 4985 times)

0 Members and 1 Guest are viewing this topic.

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Random graphics glitch
« on: April 07, 2015, 12:44:21 pm »
Hi, I'm facing a random graphics glitch. The glitch is shown in the following video:


It occures at some random position... sometimes while drawing render textures to the screen, sometimes without doing so. Toggling between drawing those or not always fixes the glitch (temporarily).
Unfortunately I cannot reproduce this behavior, because the positions seem to be "random". Sometimes the behavior does not occur. Sorry, but I cannot test the entire problem on a different machine. I also cannot reduce the problem to a minimal code example - the problem occures too randomly :(

I'm using SFML 2.2 (Release source + small joystick fix). But I was facing this problem also with a prior version (maybe 2.1) some months ago (within another project using SFML)
The machine is a netbook (running Ubuntu) with an Intel GPU. I know that those GPUs (especially with linux graphics drivers) often cause problems. I also upgraded my graphics card driver to the latest version using a tool by Intel.

I'd like to know whether other people also faced similar behaviors at their projects.

Kind regards
« Last Edit: April 07, 2015, 01:29:23 pm by Glocke »
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Random graphics glitch
« Reply #1 on: April 07, 2015, 01:25:18 pm »
You know if you used the actual YouTube link without HTTPS it would automatically get embedded. ;)

For me it seems like some vertices get wrongly positioned.



Are you should it's not a mistake in your code?
Otherwise I haven't heard of such an issue...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: Random graphics glitch
« Reply #2 on: April 07, 2015, 01:30:17 pm »
You know if you used the actual YouTube link without HTTPS it would automatically get embedded. ;)
Ahh thanks :)

For me it seems like some vertices get wrongly positioned.
Are you should it's not a mistake in your code?
Otherwise I haven't heard of such an issue...
Well, I'll check for wrongly positioned vertices! I guess that might be the reason ;D
« Last Edit: April 07, 2015, 01:55:35 pm by Glocke »
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: Random graphics glitch
« Reply #3 on: April 07, 2015, 01:56:40 pm »
I realized, that the behavior has something to do with rendering the hud (life/mana/stamina bars and the green line, which represents a calculated path - debugging purpose).
I just faced a situation where the entire screen is blackened and those yellow/green stuff is drawn. The entire scene and the entire hud are deleted (the other onscreen logging such as the "SYSTEM RUNTIME" etc. aren't part of the hud).
When toggling those draw-the-path-for-debugging-purpose (I implemented this via shortcut), the entire glitch disappears. Also, when drawing another "debugging thing" (e.g. showing the grid or the collision map), the glitch also disappears. When toggling the system monitor, the entire yellow-red-stuff and the system monitor are flickering.
Well, to be honest, I think thats my graphics driver's fault. When turning parts on/off (e.g. to show grid borders, collision information or lighting) the glitch is shown/hidden :-\

I also had these three parts (grid borders, collision info, path-"lines") in my old project but rewrote them competly. Any suggestions how I can debug this situation? I'm familar with debugging in general (using gdb) but I don't know where to start here :S

/EDIT: After toggling those settings on and on, the game crashed (Segmentation Fault). So I ran it inside the debugger, seeked another glitch-spot (hard to find but I found one) and repeated it. Then, some reeeally weird stuff happened: not just flickering glitches but also "rolling" horizontal lines (moving randomly up and down). After randomly toggling the settings, it crashed again and the debugger said:
intel_do_flush_locked failed: Invalid argument
[Inferior 1 (process 14407) exited with code 01]
(gdb) bt
No stack.
 
XD

/EDIT: Now, this message occures also for other programs. E.g. when running totem (video player) it crashes with intel_do_flush_locked failed: Das Argument ist ungültig (which is the equivalent message in German). I'm gonna restart :o
« Last Edit: April 07, 2015, 02:05:06 pm by Glocke »
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

Dejan Geci

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Random graphics glitch
« Reply #4 on: April 07, 2015, 05:18:43 pm »
If it happens in other software, it just might be a hardware/driver issue. Try to update the driver, and also try your application on another computer to verify it's working correctly.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Random graphics glitch
« Reply #5 on: April 07, 2015, 05:32:10 pm »
Are you using raw OpenGL or another library that has its own rendering (e.g. GUI)? Or only SFML?

You could also try to use another driver if there's one available. Not a different version, but a different developer. For example, proprietary drivers from the vendor (Intel) or Mesa ones.
« Last Edit: April 07, 2015, 05:35:40 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: Random graphics glitch
« Reply #6 on: April 07, 2015, 05:46:40 pm »
Are you using raw OpenGL or another library that has its own rendering (e.g. GUI)? Or only SFML?
I'm using pure SFML. Also my GUI rendering is based on SFML (Drawables etc.)

You could also try to use another driver if there's one available. Not a different version, but a different developer. For example, proprietary drivers from the vendor (Intel) or Mesa ones.
Ok I'll check this if I'm in the mood for driver adventures ;D
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Random graphics glitch
« Reply #7 on: April 07, 2015, 05:51:21 pm »
Be careful on Linux. By installing the wrong driver, I already managed to mess up literally everything ;D

Maybe you should first try to isolate the problem... That would also be helpful to workaround the issue, or even more if it's not actually a driver problem.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: Random graphics glitch
« Reply #8 on: April 07, 2015, 06:21:12 pm »
Be careful on Linux. By installing the wrong driver, I already managed to mess up literally everything ;D
Me too. That's why I wrote "driver adventures" :D

Maybe you should first try to isolate the problem... That would also be helpful to workaround the issue, or even more if it's not actually a driver problem.
Unfortunatley I have no idea where to start. Traditional debugging approaches don't seem to help me here :-\
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Random graphics glitch
« Reply #9 on: April 07, 2015, 08:23:20 pm »
There are no proprietary Intel graphics drivers for Linux, just fyi. Intel published their graphics driver code as open source.

Mesa IS the Intel 3D graphics driver on Linux.

What is your kernel version (run: "uname -v")? Some googling for "intel_do_flush_locked failed: Invalid argument" found this kernel bug report. Looks like a patch made it into kernel 3.18.4 from here.
« Last Edit: April 07, 2015, 08:32:42 pm by dabbertorres »

 

anything