Windows XPe SP2 - Problem executing a .NET application

G

Guest

I've finnaly managed to installed the .Net Framework and boot my Windows XPe
image. I've copied a hello world application to the XPe computer.


When I execute the hello world.exe file. I get this exception immediately


CommonLanguage Runtime Debugging Service
"Application has generated an exception that could not be handled
Process ID=0x704(1796), thread id = 0x710(1808)"


Can any one tell me what went wrong, do I need to install any additional
components? I have the "autoresolve dependency" setting turned on.

-Jonas
 
K

KM

Jonas,

Sounded like you installed the .Net Framework at run time manually. Any particular reason not to use the .Net component from XPe
repository?

Alos, what is your image based on - Minlogon or Winlogon?

KM
 
G

Guest

I didn't install it manually, i added the .NET Framework 1.1 component to
the image. The image is based on the "WinLogon Sample Macro" component.
 
G

Guest

Just did some more testing and built a simple C# Console Application
displaying the current date and time, and it ran perfectly. A windows
application doing the same thing caouses the error mentioned in the first
post in this thread. So, obviously the .NET Framework is installed, but the
problem has something to do with WindowS Forms Applications.
 
K

KM

Jonas,

I can only suggest you to monitor the broken app launch with RegMon/FileMon to see what's missing there.
Again, I think this is a bug of XPe (I guess SP2?).

KM
 
G

Guest

Hmm...

I tried running both filemon and regmon on the computer, but not sure what
to look for. One of the last registry actions before the app crashes is a
language lookup. I tryed setting the app to only support English (since
that's the only language supported on the XPe computer) but with no luck.

I allso tryed adding a try-catch block around the entrypoint of the
application. This should catch any exception caoused by the application and
display it in a MEssageBox. The exception never get caought, so the error has
nothing to do with my code, but the JIT/Runtime.

I guess i'll have to do some fourther investigation of this.
 
K

KM

Jonas,
Hmm...

I tried running both filemon and regmon on the computer, but not sure what to look for.

It is hard to advise not seeing the log. Any chance for you to save, attach and post the Logs to this thread?
Also, I'd suggest you to first analyze there the misisng (FILE NOT FOUND) components (FileMon log).
One of the last registry actions before the app crashes is a
language lookup. I tryed setting the app to only support English (since
that's the only language supported on the XPe computer) but with no luck.

In your application do you use only English resources?
I allso tryed adding a try-catch block around the entrypoint of the
application. This should catch any exception caoused by the application and
display it in a MEssageBox. The exception never get caought, so the error has
nothing to do with my code, but the JIT/Runtime.

If you app runs fine on XP Pro, you may think it is not your app code that cause the problem.
 
G

Guest

Since you cant load log files into FileMon or RegMon, and viewing them as
plain text files can be a pain in the ass, i wrote a little log viewer in C#.

You can download it off http://jonas.greit.no/MonLogViewer.zip

It simply loads the log files into a list view that you can sort and remove
rows from. If you remove un-needed rows you can save the new stripped file to
disk.
 
K

KM

Jonas,

Thanks for the logs and the viewer app.

Just an idea... At runtime can you copy the System.Windows.Forms.dll from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 to
C:\WINDOWS\assembly\GAC\System.Windows.Forms\1.0.5000.0__b77a5c561934e089 (you will have to create this folder).
Then start your HelloWorld app and see if it helped anyhow.

If it did not, please copy the C:\WINDOWS\assembly\GAC\System.Windows.Forms\1.0.5000.0__b77a5c561934e089 folder from XP Pro machine
(with .Net 1.1 installed there) to your runtime, reboot XPe image and start the HelloWorld again.
 
G

Guest

Hi.

The file:
I:\windows\assembly\gac\System.Windows.Forms\1.0.5000.0__b77a5c561934e089\System.Windows.Forms.dll
allready exsists on the XPe image (I: is the CF attached to my developer
computer using a card reader).

How ever, i might get closer to an answer. I think it's my memory problem,
becaouse during FBA i got this error (i redeployed the image):

Fatal Execution Engine Error (0x792dc38e)

Registered JIT debugger is not available. An attempt to launch a JIT debugger
with the following command resulted in an error code of 0x2(2). Please check
computer settings.

cordbg.exe !a 0x1b4

If i click OK a few times the FBA runs through and the computer boots up
just fine. But, obvious there is something bogus going on... I tought i was
sooooo close to get this thing to run... Looks like getting more RAM or
forgetting about .NET and doing this in C++ are my only options?

I was hoping to use .NET Remoting on the frame to enable remote control
using a pocket pc and .NET CF. Say i do this in C++, how hard is it to do
sockets programming and reading some kind of input, like next picture,
previous picture, pause and play?

I'm a decent C# developer, but have never written a single line of C++... So
i _really_ want C# (so easy to consume my "person aware web service" etc.)
 
K

KM

Jonas,

I:? You must have sent me the wrong logs then because they show all the file requests made to C:.

JIT debugger error is not necessarily about the RAM available. But I am now forced to ask you about the system configuration. What
you are deploying to? What media presented on the target during FBA and post FBA? How does the FBAlog.txt look?

Btw, you may really want to have .Net 1.1 SP1 component added to your image (not just .Net 1.1) if you are using SP2. You will find
that component on XPe SP2 installation (CD, etc.) under VALUEADD\MSFT folder.


As to the .Net Remoting... I did not quite got why you mentioned "pictures"? Do you have a client app running on Pocket PC?
What type of connection you are planning to set up between the XPe and Pocket PC device? (IrDA, WLAN, etc.)

The final decision is going to be up to you. But if you really good with C# but not C++, Web Services technology would save you days
of development so I'd suggest you to stick with .Net Remoting. Btw, instead of .NET CF I'd recommend you to look into OpenNetCF
stuff which has many classes that will be helpful to you in this project.
Hope your Pocket PC device is not with the first release of the .NET Compact Framework which did not support remoting. (I am not
even sure if it is there for 1.x version. But it is there for 2.0 beta, IIRC).
 
G

Guest

Hi.

The log files where captured on the running Windows XP device, which is
booting off a 256MB compact flash. When i connect the CF card to my developer
computer (the one i'm using right now) CF cards are assigned to I:. So,
that's why it's called I:.

The hardware i'm using is a "stripped down" Dell Inspiron 7500 Laptop. When
i got it i didn't have a cd-rom or a floppy drive, and I've allso removed the
sound card and the modem, since those part wherent needed. The laptop is
beeing built into a frame and is ment to be used as a digital picture frame.

A few pics of the device can be found at:
- http://jonas.greit.no/img_2844.jpg (LCD beein mounted in foam to keep it
centered)
- http://jonas.greit.no/IMG_2851.JPG (Laptop mother board mounted on the
back of the frame)
- http://jonas.greit.no/img_2857.jpg (First test run, booting Win98 off 2.5"
IDE)

I've swaped the noisy 2.5" IDE hard drive with a 256 MB compact flash card,
using this CF -> 2.5" IDE adapter: http://www.pcengines.ch/pic/cf2e.jpg

The computer has a PIII 500mhz CPU and 128MB PC100 SO-DIMM RAM, and an ATI
Mobility screen adapter. That's the specs i was able to dig up online. But,
as i said, It's a Dell Inspiron 7500.

I've uploaded my FBALog.txt file to: http://jonas.greit.no/fbalog.txt


Regarding software:
On the Windows XPe Dell computer (the picture frame) I'm planning on
building a C# Windows Forms application, displaying pictures downloaded off a
network share. Since the frame will have no HID's I'll need a way to select
next picture, previous picture, pause etc. So, I'm going to expose a few
methods, such as Next(), Previous(), Pause(), Play() and GetThumbnail() as a
remoting server over SOAP.

Then, on the Pocket PC (running Windows Mobile 2003, .NET CF 1.0 SP2) i'll
write a remote controle application using the remoting server on the frame. I
know that .NET Remoting isn't supported by .NET CF 1.0, but if you expose
your remoting server using SOAP (not binary), you can simply add a web
reference and access the methods like any ASP.NET Web Service (even tough the
service is hosted inside the picture app, not IIS).

I've done some work using OpenNETCF, and will probably use it for the
feautures needed that arent supported by the core framework. The way i see
it, OpentNETCF is kinda like .NET CF 1.5, with lots of the stuff missing.

There is an excellent article about remote controlling your PC using
remoting and .NET CF called "Laziness .NET" in the "Code4Fun" section on
MSDN, written by Duncan Mackenzie. The article can be found at:
http://msdn.microsoft.com/library/en-us/dncodefun/html/code4fun06272003.asp?frame=true

And again, thank you so much for taking time investegating this problem
with me.

-Jonas
 
K

KM

Jonas,

Comments inline...
The log files where captured on the running Windows XP device, which is
booting off a 256MB compact flash. When i connect the CF card to my developer
computer (the one i'm using right now) CF cards are assigned to I:. So,
that's why it's called I:.

I see. I appologize I missed that part from your previous message where ou explicetely mentioned you plugged the card to your
dev.computer. Now it is all clear.

What bothed me was that why the FileMon log showed that the C:\WINDOWS\assembly\GAC\System.Windows.Forms\1.0.5000.0__b77a5c561934e08
file was missing from your runtime. But you are saying that it is there when you explore the disk content offline. I can only assume
that after the first HelloWorld usage, .Net creates GAC repository on the fly.
...>
I've swaped the noisy 2.5" IDE hard drive with a 256 MB compact flash card,
using this CF -> 2.5" IDE adapter: http://www.pcengines.ch/pic/cf2e.jpg

Is the card marked as fixed? (are you able to create more than one partition on the card?)
The computer has a PIII 500mhz CPU and 128MB PC100 SO-DIMM RAM, and an ATI
Mobility screen adapter. That's the specs i was able to dig up online. But,
as i said, It's a Dell Inspiron 7500.

I've uploaded my FBALog.txt file to: http://jonas.greit.no/fbalog.txt

Nothing obvious in this log. Pretty much the same file&dir structure as on XP Pro.
Maybe something in \windows\SetupApi.log?

Also, any method may help you figuring out the issue. On the top of your current image (with the .Net included), try to manually
install the .Net package from MSDN. If the HelloWorld app would work then you are missing something and it will be easy to catch
with tools like RegSnap or Inctrl5 (since you are going to do the manula install on the top of already included .Net component - the
Registry monitoring tool log won't have too many entries mentioned).

And one more thing you could potentially try out. There is XPProEmulation project on www.xpefiles.com that icnludes virtually every
software component from Xpe database (there are versions for SP1 and SP2). Use it (with SP2 no need to add .Net, with SP1 you will
have to add .Net 1.1 QFE component) and see if you are able to repro the issue. If not, you are missing dependencies from your own
runtime.
Regarding software:
...>
Then, on the Pocket PC (running Windows Mobile 2003, .NET CF 1.0 SP2) i'll
write a remote controle application using the remoting server on the frame. I
know that .NET Remoting isn't supported by .NET CF 1.0, but if you expose
your remoting server using SOAP (not binary), you can simply add a web
reference and access the methods like any ASP.NET Web Service (even tough the
service is hosted inside the picture app, not IIS).

I never tried that. But the article you mentioned explains how to use it.
Although only simple types would be availale throuhg Web Reference since SOAP messages are parsed for Web Services. But it should
work for your simple methods.
Anyway, you know your apps better than I do :) Btw, why you are not prototyping with XP Pro (instead of XPe?). then if works, you
can easy move to XPe.
I've done some work using OpenNETCF, and will probably use it for the
feautures needed that arent supported by the core framework. The way i see
it, OpentNETCF is kinda like .NET CF 1.5, with lots of the stuff missing.

Yup. That is the correct understaning. I would also add that OpenNetCF components on the top of core are very useful for many
different projects.
(frankly, I sometimes not even consider using .NetCF without OpenNetCF)
 
G

Giggsy

Hello,

I'm developing a XPe Image for my panel PC with touchscreen where I
have to run an managed app. So I have included the .NET Framework
component. For testing purpose I have the task manager as shell where I
can start applications from.

Now I get the same error as Jonas when I start my app from the task
manager. But if I first run the command and then start my app it will
work. So I it has nothing to do with my app I think. It also works fine
under Windows XP. Can some explane this?

Giggsy
 
K

KM

Giggsy,

Hello,

I'm developing a XPe Image for my panel PC with touchscreen where I
have to run an managed app. So I have included the .NET Framework
component. For testing purpose I have the task manager as shell where I
can start applications from.

Now I get the same error as Jonas when I start my app from the task
manager. But if I first run the command and then start my app it will

What command you run first?
 
G

Guest

I've uploaded my SetupAPI.log file to http://jonas.greit.no/setupapi.txt.

Copying the .NET Framework Redistributable installation file to the CF card
isn't possible with my current configuration (which is basicly Winlogon +
..NET), since there are only 18MB available space (and the installation file
is 23MB).

I'm going to check out XPProEmulation now and see what it is and if i can
get it to run.

Allso interesting that Giggsy is having the same problems as I am. I really
hope we'll figure this one out.
 
K

KM

Jonas,

You've got some driver problems on your device. Likely irrelevant to your problem with .Net but still.. Does the video driver work
at runtime? Check it out with Device Manager or devcon. From SetupApi.log, it seemed that, e.g., you are missing a GART component
(agp440.sys).

Btw, 18M worries me much. Any chance for you to switch (at least temporarily for development and testing purposes) to 512M card?
Just make sure it is marked as fixed.
 
G

Guest

Hi.

I havent added any Display Device Drivers yet. At the moment i'm running in
standard VGA (640x480x16). Didnt want to bother with setting up drivers
before i had .NET up and running. Think i need to add the "ATI Mobility
(Dell-P)" component (that's the graphic card in the laptop).

What's the GART componet?

I'll see if i can get my hand on a 512MB CF card. Was hoping that i didnt
have to buy a new one, so I'll see if some of my friends has one i can use.

Didn't quite get what to do with the XP Pro Emulation slx file..?
 

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