[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SDL] SDL hangs on SDL_Init() when $DISPLAY is remote



On Sun, Aug 17, 2003 at 08:33:33PM -0700, Michael Rickert wrote:
> > When $DISPLAY points to some display over the
> > network, and you run app using
> > SDL, the app just hangs (forever) without doing
> > anything.
> > 
> > I started to debug this, and I found that the
> > hanging function is in SDL_Init().
> > 
> > When you call SDL_Init(SDL_INIT_VIDEO), SDL's
> > X11_VideoInit() is called, which
> > then calls X11_GetVideoModes()
> > (src/video/x11/SDL_x11modes.c).
> > 
> > X11_GetVideoModes() calls
> > XF86VidModeGetAllModeLines() which is the one
> > which hangs (forever).
> 
> I'm fairly new to linux and everything, but my two
> cents:
> 
> Unless this function (XF86...) is supposed to freeze
> (which I doubt) then this would be a bug in XFree86
> (unless this function is part of the SDL code, which
> I'm doubting as well...due to the different naming
> format). I'd suggest upgrading: www.xfree86.org (4.3.0
> is out).
> 

Yes, that function is a part of XFree86.
I just wanted to let you SDL guys know about this problem (if somebody else
asks the same - or searches mailinglist archives).

I sent that mail to Debian SDL maintainers, and to Debian X development
list.. so hopefully somebody from there will take a look at it.

> If the problem continues... a bug report for xfree
> would probably be in order.
>

Yep.
 
> Possibly related: if two SDL applications attempt to
> gain fullscreen, the second one freezes. IMHO, I think
> it should return with an error of some sort (being a
> C++ fan, I'd say throw an exception... but I
> understand some people still like C :) ). This may
> also be related to the XFree code (I'm using 4.3.0)
> rather than SDL itself.
> 
> Simplest way to reproduce: create two SDL apps, and
> have the first go into fullscreen, spawn the second
> one, and wait awhile (couting/printfing each step).
> 
> There may be reason to have the system freeze for a
> few seconds: for example, allowing one SDL fullscreen
> app to start another then shut down allowing the new
> app to continue. However, an indefinte freeze makes no sense.
> 

I was running just one SDL app, so it's not about trying to run a couple of
fullscreen SDL apps at the same time.. and the app I was running is windowed.

And the hang happens before any SDL window is even created! (when SDL is
querying for available modelines).

Thanks.

-- Pasi Kärkkäinen
       
                                   ^
                                .     .
                                 Linux
                              /    -    \
                             Choice.of.the
                           .Next.Generation.



Reply to: