openGL screensaver causes problems - opengl

I have an application written in QT4, that uses an openGL window. It has been running happily for months. Windows XP, service Pack 3,
Recently I was diddling with my screensaver, and happened to select the 3D text choice. When I previewed it, the QT4 application seg-faulted immediately. When I ran in the debugger,it is crashing in ig4dev32.dll, which is an intel graphics accelerator driver for Open GL.
When I do a similar test on a machine with an NVIDIA card, I (not surprisingly) get no problems.
I'm not really sure whether I'm asking for help, or insight, or whatever--has anybody ever seen it? Google tells me others have seen it happen in gaming applications, but I see no references to developers having it happen to them. Obviously, I can not use that screensaver, but I suspect the problem is "bigger" than that. Ideas?

I would start by reporting this to Intel. No doubt, they will not resolve it by the end of the week, but eventually. In the mean time, I'd also report it to Qt software, so see if they can trouble shoot it as well.
In the mean time, you know the issue and how to resolve it (no OpenGL screensavers). So all you have to do is to inform your customers. The best would be if the application itself could inform the customers, but detecting if a screensaver uses OpenGL or not does not seem feasable.
Perhaps you could do some additional tests. For instance, what happens if your application is run in paralell with, say, Google Earth in OpenGL mode?

Related

All of a sudden, my Qt application displays at 100% instead of the normal 200%, what did I changed that made it lose that feature?

In my settings, I clearly have my screen setup to 200% like so:
When I worked on my Qt application earlier, it would properly follow that setup.
Somehow, I changed a something and now it always appears at 100%. That makes it difficult to read the text.
What option(s) would Qt have that would turn that feature off?
I have other Qt applications that still work as expected, so I'm really thinking that's something I did. Maybe a widget I added? Or a call I make? I just have no idea what it could be so looking at my changes doesn't help at the moment.
One thing I added recently is a QSvgWidget, but even if I remove it, it still doesn't work. Another thing I've notice is that the OS (Ubuntu 18.04) updated the desktop themes. But I don't think that happened at that time.
UPDATE:
This seems to be generalized. I just upgraded my OS. The VirtualBox snap was updated and now the window also appears small (i.e. ignores the High DPI setup). So it must be an OS thing (i.e. a library that was updated and it breaks the Qt High DPI feature).
Okay! I got the answer to that one in my situation.
Whenever nvidia sends a new version of their driver, my X11 session continues to work, but OpenGL is not accessible anymore. There must be something in Qt that decides to use OpenGL and since it (silently) fails opening a connection, it falls back to "no DPI scaling capability".
After a reboot, everything is back to normal and zooms in and out as expected in my app and also the VirtualBox window.

cocos2d-x crashes during visit() calls

I have cocos2d-x app crashing time after time. Crash happens in random cases, even in idle state — I can leave app in simulator and after 2-5 minutes it may crash with no user interaction.
The sad thing — it crashed in production, too. I use Crittercism crash reporting SDK and it shows the same stack.
More, I tried cocos2d-x samples bundled with cocos SDK, they crash the same way.
Here I included some screenshots to show up the stacks:
https://dl.dropbox.com/u/5480488/cocos2dxcrash1.png
https://dl.dropbox.com/u/5480488/cocos2dxcrash2.png
+cocos2dxcrash3.png
And yes, it affects (almost?) all available versions of Cocos and iOS. Currently it crashes in latest cocos2d-x and iOS 6.1.3.
SOS, please!
I bet you are running your app on a simulator.
Running on a device will solve it. :P
Thought I don't know the exact reason. I have met the same problem before.

OpenGL game runs fine in Win7, drops to 5fps in Windows 8?

I have just recently installed Windows 8, and I tried to compile and build a simple c++ game project in VS 2010, but when I did, it was running at 5 fps. On windows 7, it runs at a solid 60 fps. Nothing has been changed in the code, but there is just horrible slow down.
I have updated my video drivers, but there is still horrible lag. I thought the problem was to do with compatibility issues with windows 8 and OpenGL, but I can't find anything to confirm this. I was wondering if anyone else has had this problem, and if you have solved it.
I would recommend you test your graphics card / drivers first. All sorts of driver issues could arise when you upgrade operating systems. One of the best tests would be to download Cinebench and see how it performs. Cinebench will evaluate your OpenGL performance. If you get poor results, then you know it's a hardware / driver issue and not an issue with your application.
If the Cinebench results are good, then you can move on to the recommendations made by #Robert Rouhani (comments).
http://www.maxon.net/products/cinebench/overview.html
What sort of video card do you have in the Win8 machine?
If it's a laptop you might be battling against nVidia Optimus (or an equivalent technology?). Basically programs have to tell the OS in advance that they want to use the video card or they get defaulted to using the low power GPU embedded in the CPU (note: over-simplification).
If this is the case, there's some options in the nVidia control panel to let you create a profile telling the OS to run your app with the discrete GPU, rather than the embedded one.

Dim screen on Windows with C++

I've been looking into dimming a screen on a Windows platform from my program. I know that there's a SetMonitorBrightness API that allows this, but the issue for me is that it would be nice to be able to dim the screen on Windows XP as well (which that API does not support) and also dim screens on desktop computers.
So I did some research and found this utility that seems to dim my screen on a Windows XP desktop without a problem. I tried to contact the author to find out how they implemented the dimmer but I did not hear back from them.
So I was curious to hear from developers on this site, how do you think they managed to dim the screen when the SetMonitorBrightness API is not supported?
PS. I am a newbie developer myself trying to write an energy saving program for our small business. It is a nonprofit organization and we don't have funds to hire a Windows developer to do this for us. Most of our computers are Windows XP desktops, so as you can see I can't use SetMonitorBrightness API as it is widely documented on the web.
Thanks in advance.
In the case that you cite, have a look at the screensaver with Dependancy Walker. My guess is that they create a full screen window and use SetLayeredWindowAttributes() to set a semi-opaque setting for the window, thus making the screen appear dimmed. I doubt it would save you much money.
You might want to look into the DDC protocol which allows you to control aspects of some monitors. The MS API that allows you to do this can be found roundabout here: http://msdn.microsoft.com/en-us/library/windows/hardware/ff570290%28v=vs.85%29.aspx and you should look at the I2C functions too.
Alternatively you could look for a ready made library to do the DDC stuff for you, such as http://www.nicomsoft.com/products/i2c/. They too have a dimmer application that is free for personal use and non-free for commercial use. They may even allow you to use it for free if you contact them and explain it's for a non-profit organisation.
If you are trying to do this as an energy saving program why not use a screensaver setting that turns the monitor off after a certain period of idleness? In any case
Forgive me if this information is outdated, but I have done this in the past using SetDeviceGammaRamp. The 'Get' version is available too for state saving and restore. I have seen it used in C# programs through, so it might still be relevant albeit not too common anymore.

Forced logout crash with Qt & Opengl

I can't find any documentation on this issue so I figured it was time for a question:
We are writing an application that uses Qt and Opengl with some help from a homebrew singleton class. We have had good luck with it so far but I've just recently run into an amusing situation where if I run the program on my Ubuntu machine it will force a logout.
We do nothing to the machine in terms of user modification. I have a feeling it has something to do with the way we are initializing things, possibly with our timer.
I was curious if anyone had any small insight they might be able to give. Is this a known issue within Qt or Ubuntu?
Note: I would give more information on the program but its very large and I only have a hint as to where to start.
Sounds like a driver or X11 bug that causes a server crash. By definition a client must not be able to crash the X server. However it seems you're experiencing exactly that. There's probably nothing wrong on your side.
What to do: Report the problem to the developers of Xorg and Mesa. Provide a test case, ideally in source code form (try to reduce your programm to the most minimal version that still causes the crash).