PDA

View Full Version : Weird Windows Vista Permissions Causing Qmake Crash



CrazyIvanovich
4th June 2009, 15:08
Hi all,

This caused me enough sorrow and pain to figure out that I'm compelled to write it up in hopes that the next poor guy this happens to has some help. If I was blind in searching for this resolution and I'm making a redundant post, please just get rid of this one.

Recently, I was forced to turn my Vista laptop into a development box. Qt build crashed trying to run qmake on the PostgreSQL 8.3 plugin. I reconfigured without that and everything was okay. But, I NEEDED that plugin. Qmake would crash every time I ran this:


qmake "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro

Stepping into the debugger, it bombed out in some windows native code, dbghook.c:



__declspec(noinline)
void __cdecl _CRT_DEBUGGER_HOOK(int _Reserved)
{
/* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */
(_Reserved); << _Reserved could not be evaluated
_debugger_hook_dummy = 0;
}


Mildly disconcerting. If I ran qmake without configuring the includepath, it would make it through, but then nmake would complain that it didn't know about "libpq-fe.h" and finally I got wise and tried to open libpq-fe.h to see what was wrong in there. libpq-fe.h, and actually every single header in the postgres include directory, crashed Notepad++. Wordpad and Visual Studio opened them just fine, though.

Five or six dialog boxes deep into libpq-fe.h's windows permissions, it seemed that PostgreSQL's service user account was the owner, and even though my local user account was an admin, it seems like I was getting bitten by some very strange permissions issue in Vista.

The Solution: Copy C:\psql\include to the desktop, delete the original C:\psql\include, and drop the copy back into C:\psql\. At which time I died laughing.

Take care,

-Rob

wysota
4th June 2009, 21:52
...or disable UAE (I don't mean "Unix Amiga Emulator") or whatever the Vista permission gaining system was called (I don't remember the weird mnemonic...).