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

Screen remains blank after update #734

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Screen remains blank after update #734

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
endoflife Bug might be valid, but SDL-1.2 is EOL.

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 1.2.15
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2013-07-09 14:12:01 +0000, Nicolae Berendea wrote:

The screen doesn't update after I call SDL_Flip or SDL_UpdateRect. I checked for errors reported by SDL_GetError and the values all the functions returned but all seems normal. If I run the program with valgrind, the screen gets updated. Also, if I call the function multiple times +4, the screen gets updated.

On 2013-07-09 16:50:23 +0000, Ryan C. Gordon wrote:

Is there source code for your app we can see? I'd like to try to reproduce this problem here.

--ryan.

On 2013-07-10 02:39:34 +0000, Nicolae Berendea wrote:

I have this problem at all the sources I tested (I have to update multiple times to have the screen updated). I've checked again and it seems to work fine the very first time I run the executable, so I am not sure if SDL is the problem.

Here is the source code:

#include <SDL/SDL.h>
#include

int main()
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Surface *screen;

if ((screen=SDL_SetVideoMode(800,600,24,0))==NULL)
printf("Error!\n");
if (SDL_FillRect(screen,NULL,0xffffff)<0)
printf("Error!\n");
SDL_UpdateRect(screen,0,0,0,0);
//printf("%d\n",SDL_Flip(screen));
SDL_Flip(screen);
puts(SDL_GetError());
SDL_Delay(3000);

SDL_Quit();
return 0;
}

On 2013-07-10 03:59:06 +0000, Nicolae Berendea wrote:

I tried another window manager (lxde) and I observed that the screen updates right (currently I am using awesome wm). So I returned (to awesome), modified the code and I concluded that awesome wm is the problem because if I add a delay before I update the screen first time, it works well after that.

I am sorry for reporting the problem in the wrong place.
Anyway, If you need any additional information, ask and I will do my best to respond.

On 2013-07-10 05:48:28 +0000, Sam Lantinga wrote:

I've seen this on Ubuntu under Unity running on VMware as well with SDL 2.0. It's just the first update that doesn't show anything. Subsequent updates work correctly.

I'm going to close this for now. Feel free to reopen it if someone has an idea of what's going on.

On 2013-07-10 11:43:01 +0000, Ryan C. Gordon wrote:

If it's just the first frame, I'm not too concerned, but maybe it's a race with the X server to draw before the window is realized, or something?

--ryan.

On 2013-07-12 02:23:10 +0000, Nicolae Berendea wrote:

It's not the first frame. It works only after a certain amount of time. That means I have to add a delay or to update 3-4 times (until that time passed). I think that's why it was working when I run the program with valgrind (it runs much slower).

So, shortly, you may be right that it's the race thing (I have no idea how it works).

Sorry I responded so late. I will respond faster next time.

On 2013-07-13 03:17:11 +0000, Nicolae Berendea wrote:

Is there something I can do to avoid using that delay at the begining. Or what do you think is the best way to have a functional program?

On 2013-07-13 21:21:03 +0000, Ryan C. Gordon wrote:

Just realized this is for SDL 1.2...Sam, did you see this in the 2.0 branch, too?

--ryan.

On 2013-07-14 03:40:07 +0000, Nicolae Berendea wrote:

I've just tried the sdl2 version. The screen remains black.

#include <SDL2/SDL.h>
int main()
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Rect rect={0,0,100,100};

SDL_CreateWindowAndRenderer(480,360,0,&window,&renderer);
//SDL_Delay(100);
SDL_SetRenderDrawColor(renderer,255,255,255,255);
SDL_RenderFillRect(renderer,&rect);
SDL_RenderPresent(renderer);
SDL_UpdateWindowSurface(window);
SDL_Delay(1000);
SDL_Quit();
return 0;
}

On 2013-07-14 17:08:58 +0000, Sam Lantinga wrote:

Yes, I saw this with SDL 2.0. I think it's an X11 regression.

On 2015-08-25 09:38:22 +0000, Ryan C. Gordon wrote:

Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we will accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.

@SDLBugzilla SDLBugzilla added bug endoflife Bug might be valid, but SDL-1.2 is EOL. labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endoflife Bug might be valid, but SDL-1.2 is EOL.
Projects
None yet
Development

No branches or pull requests

1 participant