Being UAC compliant in user mode app...

Hi all,

I tried to update one of my user mode apps to be UAC compliant
by adding the following manifest file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

manifestVersion=“1.0”>
VanDyke Software, Inc. UAC_Crash



level=“asInvoker”
uiAccess=“false”/>



When built with VS 6.0, this works great. VS.2005
on the other hand, adds a bunch of other manifest
fu.

When I run the app generated by VS.2005 on WinXP
SP2, it causes csrss to crash. (I’m trying to
get MS support to look at this but they are stuck
on the fact that I added this for vista and vista
isn’t supported yet… it doesn’t seem to bother them
that WinXP crashed.)

(The new manifest works precisely as advertised under
vista by the way.)

Anyway, can anyone spot anything wrong with the
trustinfo section I added? The crash seems to
indicate that csrss is puking on the XML. I’d
really like to be able to make my apps work
correctly under vista… but I can’t really do
that if it cause XP to crash.

Thanks,

Joseph

PS. For anyone interested, you can reproduce this
trivially by taking the above manifest file and
putting into the “Manifest Tool” / “Input and Output” /
“Additional Manifest Files” of a MFC app. Build
a release app w/ VS 2005, run app, watch XP melt.

PPS. And for anyone interested, here is the call-stack
(I occasionally get messages about heap corruption in
windbg right before the crash.)

ntdll!RtlFreeHeap+0x4d4
sxs!operator delete+0x1c
sxs!_COM_FILE_CONTEXT::`scalar deleting destructor’+0x19
sxs!CXMLNamespaceManager::OnEndChildren+0x5a
sxs!CNodeFactory::EndChildren+0xb0
sxs!XMLParser::Run+0x4fd
sxs!SxspComponentParsePolicyCore+0x2e3
sxs!SxspParseComponentPolicy+0x9c
sxs!CProbedAssemblyInformation::LookForPolicy+0x5b2
sxs!CProbedAssemblyInformation::ProbeAssembly+0xcb
sxs!SxspResolvePartialReference+0x2f3
sxs!SxspProcessPendingAssemblies+0x17e
sxs!SxspCloseManifestGraph+0xc8
sxs!SxsGenerateActivationContext+0x54c
basesrv!BaseSrvSxsCreateActivationContextFromStruct+0x194
basesrv!BaseSrvSxsCreateActivationContextFromMessage+0x79
CSRSRV!CsrApiRequestThread+0x431

And to answer my own question (embarrassing but
needful):

http://support.microsoft.com/kb/921337/en-us

WinXP PRo sp2 is known to crash and there is a hotfix.

Sorry for the noise.

Thanks,

Joseph

Joseph Galbraith wrote:

Hi all,

I tried to update one of my user mode apps to be UAC compliant
by adding the following manifest file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

> manifestVersion=“1.0”>
> VanDyke Software, Inc. UAC_Crash
>
>
>
> > level=“asInvoker”
> uiAccess=“false”/>
>
>
>
>

When built with VS 6.0, this works great. VS.2005
on the other hand, adds a bunch of other manifest
fu.

When I run the app generated by VS.2005 on WinXP
SP2, it causes csrss to crash. (I’m trying to
get MS support to look at this but they are stuck
on the fact that I added this for vista and vista
isn’t supported yet… it doesn’t seem to bother them
that WinXP crashed.)

(The new manifest works precisely as advertised under
vista by the way.)

Anyway, can anyone spot anything wrong with the
trustinfo section I added? The crash seems to
indicate that csrss is puking on the XML. I’d
really like to be able to make my apps work
correctly under vista… but I can’t really do
that if it cause XP to crash.

Thanks,

Joseph

PS. For anyone interested, you can reproduce this
trivially by taking the above manifest file and
putting into the “Manifest Tool” / “Input and Output” /
“Additional Manifest Files” of a MFC app. Build
a release app w/ VS 2005, run app, watch XP melt.

PPS. And for anyone interested, here is the call-stack
(I occasionally get messages about heap corruption in
windbg right before the crash.)

ntdll!RtlFreeHeap+0x4d4
sxs!operator delete+0x1c
sxs!_COM_FILE_CONTEXT::`scalar deleting destructor’+0x19
sxs!CXMLNamespaceManager::OnEndChildren+0x5a
sxs!CNodeFactory::EndChildren+0xb0
sxs!XMLParser::Run+0x4fd
sxs!SxspComponentParsePolicyCore+0x2e3
sxs!SxspParseComponentPolicy+0x9c
sxs!CProbedAssemblyInformation::LookForPolicy+0x5b2
sxs!CProbedAssemblyInformation::ProbeAssembly+0xcb
sxs!SxspResolvePartialReference+0x2f3
sxs!SxspProcessPendingAssemblies+0x17e
sxs!SxspCloseManifestGraph+0xc8
sxs!SxsGenerateActivationContext+0x54c
basesrv!BaseSrvSxsCreateActivationContextFromStruct+0x194
basesrv!BaseSrvSxsCreateActivationContextFromMessage+0x79
CSRSRV!CsrApiRequestThread+0x431


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Joseph Galbraith wrote:

> And to answer my own question (embarrassing but needful):
>
> http://support.microsoft.com/kb/921337/en-us
>
> WinXP PRo sp2 is known to crash and there is a hotfix.

Note that KB921337 is describing more than just the hotfix. As an
application developer you are able to avoid the particular decoration
of the element that creates a parsing condition XP can’t
gracefully handle without the hotfix. Thereby permitting your
executable to run on even unpatched XP machines.

Alan Adams

Joseph Galbraith wrote:

> And to answer my own question (embarrassing but needful):
>
> http://support.microsoft.com/kb/921337/en-us
>
> WinXP PRo sp2 is known to crash and there is a hotfix.

Sorry for the double-post. I had intended to include a link to Chris
Jackson’s bog entry on the subject of a name space
designation that MT.EXE/VS2005 doesn’t subsequently change into a form
that XP will not gracefully handle.

Exploring Manifests Part 2: Default Namespaces and UAC Manifests in
Windows Vista
http://blogs.msdn.com/cjacks/archive/2006/09/08/745729.aspx

Also of interest may be one of the references their blog entry makes:

How to embed a manifest in an assembly: let me count the ways…
http://blogs.msdn.com/cheller/archive/2006/08/24/718757.aspx

Alan Adams

Alan Adams wrote:

Joseph Galbraith wrote:
>
>> And to answer my own question (embarrassing but needful):
>>
>> http://support.microsoft.com/kb/921337/en-us
>>
>> WinXP PRo sp2 is known to crash and there is a hotfix.
>
> Sorry for the double-post. I had intended to include a link to Chris
> Jackson’s bog entry on the subject of a name space
> designation that MT.EXE/VS2005 doesn’t subsequently change into a form
> that XP will not gracefully handle.
>
> Exploring Manifests Part 2: Default Namespaces and UAC Manifests in
> Windows Vista
> http://blogs.msdn.com/cjacks/archive/2006/09/08/745729.aspx

All I can say is Thank You, Thank You, Thank You. You
made my day.

They should pay you the wages of the MS support drone I
talked to today that cited me an irrelevant KB article
(I found the one above on my own), said Vista wasn’t
supported (I wasn’t complaining about Vista’s behavior),
and basically hung me out to dry.

Thanks,

Joseph

Joseph Galbraith wrote:

They should pay you the wages of the MS support drone I
talked to today that cited me an irrelevant KB article
(I found the one above on my own), said Vista wasn’t
supported (I wasn’t complaining about Vista’s behavior),
and basically hung me out to dry.

There’s a lot of that going around.

I spent a frustrating week trying to install Vista on some cutting-edge
motherboards, some of which had memory bus problems. When I finally got
one stable enough to install Vista all the way to firing up the GUI, it
blue screened and rebooted. I had an ATI Radeon X300 PCIExpress
graphics card in there, and the blue screen was in atikmdag.sys. I have
tried this same graphics card in three motherboards with four different
processors, on both Vista RC1 and Vista RC2, with identical results:
blue screen in atikmdag.sys. There are many reports of this on the web,
but no resolution. The driver on ATI’s web site is older than the one
in RC2.

So, I went to ATI’s support forum and asked about it. After a couple of
days, I got a response saying that ATI doesn’t support their beta
display drivers.

Now, that’s a load of cr@p. This is RC2, gosh darn it. It is a
“release candidate”. If those drivers aren’t done by now, they won’t be
in the box for RTM, and ATI isn’t about to let that happen. I’ll bet
real dollars that the same blue screen will be present in Vista Final.
And in the meantime, they’ve lost the opportunity to have me exercise
their Aero support while there was still time to improve it.

The net result is that it will be a long time before I recommend an ATI
PCIExpress card to my clients.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> I spent a frustrating week trying to install Vista on some cutting-edge

motherboards, some of which had memory bus problems. When I finally got
one stable enough to install Vista all the way to firing up the GUI, it
blue screened and rebooted. I had an ATI Radeon X300 PCIExpress
graphics card in there, and the blue screen was in atikmdag.sys. I have
tried this same graphics card in three motherboards with four different
processors, on both Vista RC1 and Vista RC2, with identical results:
blue screen in atikmdag.sys. There are many reports of this on the web,

Funny, but Vista RC1 on my machine (Radeon 9600 video, Asus P5P800 based on
i865PE chipset with Pentium Prescott 2800MHz) could not play WMV movies.

It was played 30 times slower then necessary as a slide show, and the CPU
load was not an issue - it was near zero. AVI movies were fine.

The same movie is played fine even on w2k/Media Player 6 with some modern
WMV-related codecs from MS/Pentium-III 800.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com