QtCreator causing BSOD when building after including new Qt library
-
I have a Qt Widget Application, built using Qt 5.
In my MainWindow.h file, I have several #includes for Qt libraries (QAction, QLabel, etc.). I recently attempted to add some additional libraries to the list. After doing so, I tried to build my program, which caused a BSOD, crashing my computer.
After doing some trials, I've determined that if the list of #includes in the .h is different than when QtCreator was launched, then a Blue Screen Error occurs when attempting to build. If I manually save the .h file, attempt to rebuild, recieve a BSOD, reboot my computer and re-attempt to build, everything is OK. If I don't manually save and let it attempt to autosave when starting the build, the then .h file is reverted (or has an auto-save copy) when I re-launch QtCreator, and recieve a BSOD upon building.
I have no custom build steps which could be causing this. Only Qt libraries appear to cause this (linking to my own headers does not!).
I'm running Windows 7 Home, on an Asus Laptop (Core i7). I'm using Qt 5.1.1 and QtCreator 3.1.2. I'm building using MSVC 2012.
Here's my (current) list of #includes in MainWindow.h. QFontMetrics is a recent addition, which caused the bug to resurface - I originally saw it adding QString. I had no issues with building before then
@#include <QMainWindow>
#include <QDebug>
#include <QGraphicsView>
#include <QLabel>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <QAction>
#include <QInputDialog>
#include <QMouseEvent>
#include <QString>
#include <QFontMetrics>@Is this a problem with my include list? Do I have a corrupted copy of Qt?
I can provide attitional info (system specs, stackdumps, additional code, etc.) as requested.
Thanks for any assistance with this.
-
Alternatively, adding a new library (say <QFontMetricsF>), saving the .h, exiting QtCreator, and then relaunching QtCreator will also cause a BSOD.
After the BSOD, QtCreator works fine (until another library is added).
-
Hi, and welcome to the Qt Dev Net!
It sounds like your hardware or device drivers are broken.
Can you try building your project on a different computer?
-
I'll give it a try.
Is there any way to get some info on what QtCreator is doing when it goes down (a debugging build, for example)? Windows stackdumps aren't the most helpful, so a hint as to what device/operation/system call/driver is the cause would be of use.
I understand that it could be an issue with my machine, but since it's my primary development computer, I'd rather get it fixed than try and switch computers.
-
If the problem is in hardware or low-level system drivers, software debugging info can be inaccurate, unfortunately.
For example, if your RAM chip is damaged, your stack trace might reveal invalid pointer access in a particular object, even though all the code around that object is correct. Your stack trace will not show any hints of RAM damage -- only a dedicated memory checker tool can detect that.
Anyway, see "here":http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/how-to-read-dumpfiles-after-a-blue-screen-of-death/0d7522e3-4ed1-448e-bda6-66441f042c0c for BSOD logs.
-
Hi again.
So, I've managed to secure another machine (also Win7, but different make/model), and it doesn't appear to crash on build. I can still produce the bug on my machine, however. I'm now certain that adding a new Qt Library to my .h file will crash the computer, sometimes even before I try to build.
With respect to RAM damage or HDD damage, I don't believe it to be the cause. Firstly, I've run both memcheck and diskcheck the ones included with windows) twice, and they've reported no errors (That was my first worry upon seeing the bluescreens!). Secondly, in my experience, RAM-errors don't tend to be reproducable in the same way as this is - I can get this to error out every time.
I use other SW development tools on this machine (VS2012, Eclipse, Altera's Quartus II, Xilinx's ISE, to name a few) and none of them have ever crashed in this way. Additionally, QtCreator has been responsible for nearly-every BSOD in the computer's history - the only one prior was caused by me messing around with my Bluetooth driver in a bad way.
So, while I respect that this could very well be a driver-caused, QtCreator is doing something drastically different then other software out there, or I'd likely be seeing signs elsewhere.
I really would like to get this sorted out, since (other than the BSODs) Qt is doing exactly what I want :)
-
Re. those BSODs, can you see what the STOP code is, for example, is it STOP 0x00000050?
(If your computer reboots too fast to be able to see the number, when you restart, hit F8 for the safe mode menu, then select "Disable automatic restart on system failure")
-
Hi,
[quote]So, I’ve managed to secure another machine (also Win7, but different make/model), and it doesn’t appear to crash on build. I can still produce the bug on my machine, however. I’m now certain that adding a new Qt Library to my .h file will crash the computer, sometimes even before I try to build.[/quote]Just to clarify: Do you mean you still encounter crashes on your second PC, when you add a new #include?
That's very odd indeed.
Like hskoglund suggested, could you please post your STOP code? Also, where did you download Qt Creator from and how did you install it?
Do your 2 machines use the same graphics card?
The only thing I can think of in Qt Creator that could trigger a BSOD are components related to Qt Quick, which use hardware acceleration for graphics.
Go to "Help" -> "About Plugins..." and uncheck "Qt Creator" -> "Welcome", and restart. This disables the Welcome screen which is a Qt Quick UI. Do you still encounter crashes?
If so, take a screenshot of your plugins list to record which ones are enabled. Then, try disabling other plugins (starting with the "Qt Quick" category) and see if this helps at all.
-
[quote author="hskoglund" date="1407295703"]Re. those BSODs, can you see what the STOP code is, for example, is it STOP 0x00000050?
(If your computer reboots too fast to be able to see the number, when you restart, hit F8 for the safe mode menu, then select "Disable automatic restart on system failure")
[/quote]Hi! Looking back through the stackdumps, it varies - so far I've seen 0x019, 0x0C2, 0x0C5, 0x024 and 0x032. The most common ones appear to be 0x19, 0x24 and 0xC2.[quote author="JKSH" date="1407297421"]Hi,
[quote]So, I’ve managed to secure another machine (also Win7, but different make/model), and it doesn’t appear to crash on build. I can still produce the bug on my machine, however. I’m now certain that adding a new Qt Library to my .h file will crash the computer, sometimes even before I try to build.[/quote]Just to clarify: Do you mean you still encounter crashes on your second PC, when you add a new #include?
[/quote]Sorry, I guess that was a little confusing. I can successfully build on the other machine, without errors. By "my machine", I was referring to the original computer (the one experience the error).[quote] Also, where did you download Qt Creator from and how did you install it?[/quote]I'm reasonably sure I downloaded it from this site, off the uwaterloo.ca mirror. I installed Qt on both computers off the same install file.
[quote]Do your 2 machines use the same graphics card?[/quote]Nope.
[quote]The only thing I can think of in Qt Creator that could trigger a BSOD are components related to Qt Quick, which use hardware acceleration for graphics.Go to "Help" -> "About Plugins..." and uncheck "Qt Creator" -> "Welcome", and restart. This disables the Welcome screen which is a Qt Quick UI. Do you still encounter crashes?[/quote]It looked for a second like this fixed it, but no luck.
[quote]If so, take a screenshot of your plugins list to record which ones are enabled. Then, try disabling other plugins (starting with the "Qt Quick" category) and see if this helps at all.[/quote]
I'll give it a go - I'm posting before I test, since I'll lose this post if it crashes!
Edit: No luck with any in QtQuick... :( I'll try a few more later... -
[quote author="wilcroft" date="1407304020"]Hi! Looking back through the stackdumps, it varies - so far I've seen 0x019, 0x0C2, 0x0C5, 0x024 and 0x032. The most common ones appear to be 0x19, 0x24 and 0xC2.[/quote]See http://msdn.microsoft.com/en-us/library/hh994433.aspx for an explanation of those codes. You have:
-
0x19: BAD_POOL_HEADER
-
0x24: NTFS_FILE_SYSTEM
-
0xC2: BAD_POOL_CALLER
-
0xC5: DRIVER_CORRUPTED_EXPOOL
-
0x32: PHASE1_INITIALIZATION_FAILED
I'm still convinced this is a problem(s) with hardware/drivers, but I am puzzled as to why Qt Creator is the only thing that triggers the symptoms.
[quote author="JKSH" date="1407297421"]Sorry, I guess that was a little confusing. I can successfully build on the other machine, without errors. By "my machine", I was referring to the original computer (the one experience the error).[/quote]The issue lies completely within your original computer, I'm afraid. Your best bet is to ask people who have experience with low-level Windows kernel troubleshooting.
-
-
Thanks for the help, JHSK and hskoglund. I'd thought I'd narrowed the cause to the C++ and/or Code Analyzer plugins, but it looks like they aren't the source either.
I'll try with the Microsoft forums, but I think moving what I've done so far to my linux partition and installing Qt there will be more productive in the short term.
Again, thanks for your time!
Wilcroft