Recent crashes with OpenGL 1.4

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Recent crashes with OpenGL 1.4

#1 Post by strooka »

We should Display à MSG Box that says that the user has to update His drivers when using OpenGL Version 1.4. I encountered it myself and heared it From other Users that it definitely wont Run with OpenGL Version Not greater than 1.4
i could do that for the Next release.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#2 Post by Geoff the Medio »

I considered doing this myself, but didn't bother, though not for any particular reason.

There's already code that checks the OpenGL version during program startup and sets some default rendering options off if they wouldn't be supported. This prevents crashes with GL 1.5.

It should be fairly easy to add a check when starting up the splash screen or menu to show a popup message before the player has a chance to click "Quick Start" that it will almost certainly crash due to GL 1.4 or lower.

However some people might get GL related crashes just when trying to start the program, and don't even get to the main menu screen. Unless you're proposing to use OS-specific message box creating code to show this message, or if there's something in OGRE that can be used without requiring OGRE to run long enough to crash itself, then this won't be possible for very insufficient GL versions.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#3 Post by strooka »

i could maybe start a simple java program that shows the msg box. this would be sufficient for all systems, but i actually don't know how to create a subprocess.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#4 Post by strooka »

here is a small java app thaat just displays the message box it works with windows and linux with macos sould it work as well.

you can execute it with the command:

Code: Select all

java -jar FOJavaOpenGLMsgBox.jar
Attachments
ErrorBox.tar.gz
the java dialog box
(2.23 KiB) Downloaded 95 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#5 Post by Geoff the Medio »

Running a separate Java program is not an acceptable solution, most notably because it requires Java, which would become yet another dependency without sufficient reason for requiring it.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#6 Post by strooka »

i think almost everyone has java installed.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#7 Post by Geoff the Medio »

Regardless, using Java is more hassle and complexity than it's worth. Preferable would be OS specific code behind ifdef blocks. For Windows, it might be better to just print some text on the console window and wait for kepress to exit or continue (presumably to a crash), which would be done before the full screen could be taken up, so the user would still have a chance to see the text.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#8 Post by strooka »

That wont work for the ones who have Never Seen à console. The aim should Be to prevent the Users say "freeorion crashes on Start!"
which make the Game bad Look like .

What about writing à Simple .html page that Shows the Error Message and Start the Internet Explorer showing the page? On other platforms other Platform specific Browsers could Be started.
BTW: writing à .html doesn't look like As ugly As starting console and Echo it since you could make the Browser Look like à MSG box.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#9 Post by Geoff the Medio »

strooka wrote:That wont work for the ones who have Never Seen à console.
At least on Windows, starting FreeOrion always spawns a console window in which the relevant text could be shown, along with "Press any key to exit" or somesuch.
What about writing à Simple .html page that Shows the Error Message and Start the Internet Explorer showing the page? On other platforms other Platform specific Browsers could Be started.
I don't really like having starting FO end up lauching a browser window instead, or any potential issues that might cause. Basically, anything else we have to run is bad, and I'd like to find a solution that works from within the FreeOrion executable, and if not, then leave the situation as it is. The minor "ugly" of a user having to read console text is preferable to the extra dependencies and complication that an external program would require.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#10 Post by strooka »

Then spawn à console on Linux and macos, Too, pls.
The problem Happens normally when Running fo in Linux and Not installed the propper graphics Driver.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#11 Post by Geoff the Medio »

I have no idea how to do that. Adding OS-specific messagebox popup code (in the OS, not within FreeOrion as already exists, sort of), ideally all hidden behind a function or class interface that can be used OS-independenty, would seem like the best solution, as it avoids any extra dependencies. I know Windows has ways to create popups, so I would assume that Linux (within a window manager) or MacOSX should have something as well... This would need to be doable without lauching OGRE or something like SDL do create windows and such, though...

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#12 Post by strooka »

The Solution would Be Java on Linux, As it is being installed by Default.
On mac os i don't Know but the mac Hardware has no Driver problems.
So my opinion woul Be to Pop up à console on Windows As you already can, because Windows hasnt Java preinstalled, and on Linux that Java Dialog Box i uploaded.
Additionally make à Simple cout.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#13 Post by Geoff the Medio »

strooka wrote:The Solution would Be Java on Linux, As it is being installed by Default.
On all distributions?
On mac os i don't Know but the mac Hardware has no Driver problems.
OK, then we can ignore MacOS for the OpenGL version issue.

But, it would still be nice to have a way to pop up an OS-level notification window on any platform, using the built-in OS' means of doing so, though...

Windows has a built-in message box popup feature, though I'm not sure if running FreeOrion as a console application will complicate or prevent using it...

On Linux, if we can open a terminal window, the dialog command would seem sufficient to create the relevant notification. There is also apparently xmessage that pops up a graphical dialog even when run from a console window, and which might work if run from within FreeOrion...?

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Recent crashes with OpenGL 1.4

#14 Post by strooka »

As Long As you don't Call the GiGi wnd::Run() function implicitly or explicitly fo will Run on OpenGL 1.4 . PLZ Write some codelines and post them here what you mean and i'm able to Test it.
I think we Need only the execution of the xmessage Box.

I have ubuntu and Suse installed, ubuntu is à debian Derivate and Suse à Fedora.
I'll Look wether it is installed on ubuntu, Too.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Recent crashes with OpenGL 1.4

#15 Post by Geoff the Medio »

strooka wrote:PLZ Write some codelines and post them here what you mean and i'm able to Test it.
I've got a bunch of other things to work on, and don't have time to do this myself.

There should be ways to run a console command from within a C++ program on all 3 OSes, and the interface for xmessage in particular is outlined on the web, including the link I included earlier.

For getting the GL version, there's some code that does this in CheckGLVersion() which is defined in the anonymous namespace at the top of IntroScreen.cpp, which could be reworked and put into a function that's called from a high-level function in chmain.cpp.

Post Reply