Vista debug Issue

S

Sid Price

Hello,
I am try to debug my application, built on XP SP2 machine with VS 2005, on a
Vista VMWare virtual machine in order to fix a startup exception when
running my application under Vista. Unfortunately I have been unable to make
much progress as the exception occurs during the main form initialization
before the first line of load event code is run. Here is the exception data:
System.TypeInitializationException was unhandled
Message="The type initializer for 'User.DirectX.DirectSound.VolumeMeter'
threw an exception."
Source="VolumeMeter"
TypeName="User.DirectX.DirectSound.VolumeMeter"
StackTrace:
at User.DirectX.DirectSound.VolumeMeter.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()

The 'Volume Meter" component is one of my project components but I do not
seem to be able to debug this issue. A breakpoint in the constructor is not
getting hit. I would appreciate any help or advice someone can give please,
I am at a loss as to how to proceed. I don't understand why the component
'Dispose' method is being called on startup.
Many thanks,
Sid.
 
S

Sid Price

Ick.

Thanks Pete, I was pretty much were you suggested and I am baffled by it.
What I don't understand is what is failing when my constructor does not
appear to be called, at least my breakpoint is never reached or triggered.
Any mystics out there?
Sid.
 
D

David Ching

Sid Price said:
Thanks Pete, I was pretty much were you suggested and I am baffled by it.
What I don't understand is what is failing when my constructor does not
appear to be called, at least my breakpoint is never reached or triggered.
Any mystics out there?

Perhaps since your app references DirectX, Windows tries to load the DirectX
modules prior to executing your constructor. That's what happens in native
C++ (my expertise) - the DLL's need to be loaded before your code that uses
them can run. I'm pretty sure the same thing happens in .NET.

Perhaps your XP system uses a downlevel DirectX version that is not
supported by your code? Or the Volume mixer configuration presented to
Windows is different on XP than on Vista. It almost certainly is a
DirectX/driver configuration issue, so even knowing the exact problem would
probably only help if you are an expert in DirectX or drivers. I suggest
you update DirectX/drivers and try again. Sorry not to give you a smoking
gun to the culprit! ;)

-- David
 
R

Rory Becker

Hello Sid,
Hello,
I am try to debug my application, built on XP SP2 machine with VS
2005, on a
Vista VMWare virtual machine in order to fix a startup exception when
running my application under Vista.

I wasn't aware that DirectX worked inside VM's.
 
S

Sid Price

David Ching said:
Perhaps since your app references DirectX, Windows tries to load the
DirectX modules prior to executing your constructor. That's what happens
in native C++ (my expertise) - the DLL's need to be loaded before your
code that uses them can run. I'm pretty sure the same thing happens in
.NET.

David, I believe this is the issue; under these types of circumstances my
approach is to change/remove something and see what happens. I temporarily
removed the VolumeMeter control and patched my code to not use it and sure
enough Vista complains about DirectX (I forget the assembly build) not being
available. So, when I get a moment to look at it I plan on following that
lead.
Thanks,
Sid.
 
S

Sid Price

David Ching said:
Perhaps since your app references DirectX, Windows tries to load the
DirectX modules prior to executing your constructor. That's what happens
in native C++ (my expertise) - the DLL's need to be loaded before your
code that uses them can run. I'm pretty sure the same thing happens in
.NET.
David, I thought since you were so kind as to set me on the right path I
would let you know that the DirectX assemblies were not on the target
computer and that was causing the problem. They are part of our installation
package but I was trying to run our application under debug from the XP
build machine, had not ever installed our application, and therefore those
assemblies were not available.

I do have another issue that relates to remote debugging on a Vista target
and it has to do with security. When I run remote debug on my virtual XP
machine I use an EXE called CASPOL to temporarily disable security on the
virtual target computer; this works fine. However, it appears that CASPOL is
not available on my virtual Vista Ultimate and I can not run my application
using remote debugging; I get security errors. Anyone know how to configure
either the application or preferably Vista Ultimate to allow remote
debugging. Note that UAC and the firewall is off on this virtual machine.
Thanks,
Sid.
 
D

David Ching

Sid Price said:
David, I thought since you were so kind as to set me on the right path I
would let you know that the DirectX assemblies were not on the target
computer and that was causing the problem. They are part of our
installation package but I was trying to run our application under debug
from the XP build machine, had not ever installed our application, and
therefore those assemblies were not available.

I do have another issue that relates to remote debugging on a Vista target
and it has to do with security. When I run remote debug on my virtual XP
machine I use an EXE called CASPOL to temporarily disable security on the
virtual target computer; this works fine. However, it appears that CASPOL
is not available on my virtual Vista Ultimate and I can not run my
application using remote debugging; I get security errors. Anyone know how
to configure either the application or preferably Vista Ultimate to allow
remote debugging. Note that UAC and the firewall is off on this virtual
machine.


Glad you're on your way Sid. For remote debugging, I created a video that
somewhat addresses the issue:
http://msdn.microsoft.com/en-us/visualc/bb608713.aspx

It details how to set a target XP machine up for remote debugging. I
believe these tips also work on Vista, but am not sure. It involves
removing permissions and setting guest logons, etc.

-- David
 
S

Sid Price

David Ching said:
Glad you're on your way Sid. For remote debugging, I created a video that
somewhat addresses the issue:
http://msdn.microsoft.com/en-us/visualc/bb608713.aspx

It details how to set a target XP machine up for remote debugging. I
believe these tips also work on Vista, but am not sure. It involves
removing permissions and setting guest logons, etc.

-- David
Again thank you David, however your video details native code debugging and
my application uses managed code. In fact connecting to my remote virtual
computer and starting debug is not the issue; the issue I have is that once
my application begins to run I get a security exception:

System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException
for details. The error is: Request for the permission of type
'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="CueAssist"
StackTrace:
at CueAssist.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at CueAssist.My.MyProject.MyForms.get_frmMain()
at CueAssist.frmMain.Main()

As you can see it is a question of UIPermissions and I can't find a clear
description of how to cope with this so that I may debug my application.
Again, many thanks for the pointers, they have really helped me make
progress on this,
Sid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top