Maintenance tool error: "Cannot open file "" for writing: No error"
-
So a little explanation of what the h.. was happening
After my last post, I realised that the Qt Installer wasn't generating a new temporary file resulting in name conflicts as I reported in one earlier post.
This leads me to take a look into
QTemporaryFile
implementation since I was pretty sure that the installer was using this class to generate new temporary files.Looking into the source code for
QTemporaryFile
I found the loop where the random string was being generated.QTemporaryFile
can generate unique file names based on a name template defined with X's in a string.I adapted that piece of code to print the generated name:
int main(int argc, char *argv[]) { // qsrand(uint(std::time(0))); QString s(6); s.resize(6); for(int i = 0; i < 6; ++i) { char ch = char((rand() & 0xffff) % (26 + 26)); if (ch < 26) s[i] = Latin1Char(ch + 'A'); else s[i] = Latin1Char(ch - 26 + 'a'); } qDebug() << s; return 0; }
Note that the call to
srand()
is commented out. Running this program will produce the exact same result each time since the seed wasn't initialised properly. But that is expected. What is not expected was the following message being printed when running my simple program:WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffffIt turns out that I have an AMD Ryzen CPU, and this warning was being emitted because of a faulty BIOS, as reported in this forum.
So I updated my BIOS to the latest version and voila, the warning is gone and the installer works again.
The reason I couldn't get it working on my second machine was because I was using a virtual machine in the same CPU. The laptop is an Intel Core CPU.
I never thought I would see a BIOS update fix some apparently unrelated program. It was a fun investigation. I would like to say thanks to @hskoglund for the patience and all the tips.
Solution:
If you have an AMD Ryzen CPU, update the BIOS.
-
Possibly your installation with the book-keeping is messed up.
A radical measure would be a complete reinstall. At least that is all popping up in my mind.Typically I am bit reluctant to throw away my installs since there is a chain of things to do to get back to work. So maybe you wait if you can afford. Possibly someone else has a better idea.
-
Hi@mcleary,
did you run the tool as normal user or as administrator?
If you have run it as admin before, you will probably need to do so again.
Also, ave you checked there is enough free space on your drives?
Regards.
-
I tried running as admin but the same message keeps popping.
I do have plenty of space (more than 100GB free) and I don't have any antivirus software installed.
I am trying to run some debug tools like process monitor to see if I can figure it out without reinstalling everything.
-
Right, so now I can say for sure that there is something wrong with the installer.
I just tried the installer in a brand new machine and I get the same message:
Right after it finishes downloading the repositories.
Now I am pretty sure it is not just my machine anymore.