WPF c#.NET 4 With SQLite on XPe - c#

it's the first time that i ask help here, but i really desperete.
I had developed a WPF Applicacation with VS2010 SP1 in c#.NET and SQLite database. It's really a stupit application with 5 windows. The main one, on startup opens few thread: one is needed to manage http connection on it, and 2 thread interacts with a hardware connected with a usb connector (i used a DLL written in C). The main window has 3 buttons and when i press one of them, a new window is displayed. Every single window has a close button that close the window. When i press a button a play a wav file stored in a folder (I used full path to play wav file).
The image for XP embbeded is made starting with tool PE and made with the right tool of microsoft.
The application is developed on a PC with XP SP3 with VS2010 SP1 on board. The application run on it is working perfectly: i can open and close window with any problem and stop.
On XP embedded, i installed .NET Framework 4 and the installer for using SQLite with framework4 (i did the same on my Pc).
If i run my application on XPe (Q7 ATOM E640T with 1 giga of RAM and 4 giga of internal HD SSD), after 8 time that i open and close a windows, the application stops to work and i got a out of memory exception. i monitored with task manager, and when i got the exception the system is using 1/3 of the all memory.
The connection with SQLite is opened at startup of the application and is still opened till the end of it.
With dependency walker I checked witch DLL are loaded on Pc and witch on XPe and i saw that sometime the dll were with different version, so i copied from the Pc the newst on XPe, but nothing went right.
I installed WindDBG on XPe, but it's not help me.
I read a lot of forums where WPF is "compatible" with XPe, so i did the application.
Any suggestion to resolve my problem?
Thanks

Related

EAccessViolation Error in application running Windows 10

I've been using this certain application among previous windows versions (Windows XP-Vista-7-8-8.1) and it has worked perfectly without having any issues, after upgrading to Windows 10 though it started showing EAccessViolation error and spams the place with message boxes saying "Runtime error at XXXX" (memory address)
So what I've been trying to achieve is creating a program in C# which runs the application under all compatibility modes one by one, to check which one works and which one doesn't - and sadly, none of them did.
The application is not mine and has stopped development.
Do you guys have any idea what has changed in Windows 10 code-wise, and how am I able to fix this issue? Is there a way to fully emulate another windows version and run it for this application alone? (Without having to set up a Virtual PC or anything)
Thank you in advance.
Note: Microsoft said that Windows 10 is completely backwards compatible, which it doesn't seem like it? The application does not use any driver, it's just a standalone EXE coded in C++/Lua.
Note2: The EXE calls a DLL which might be outdated for Windows 10, any idea what to do about the DLL? Is there a way to make it work as it did in previous windows?
You can help prevent these kinds of errors from occurring by updating your device drivers after formatting and reinstalling your operating system or installing a Windows Updates. Always install the latest Windows Updates before going through and updating your device drivers.

Win Form Application run under Operating System?

I make and run Windows form application in VS. Then I close the VS (not running win form application). But still my Windows form application was running.
Does this mean that Windows form Application runs under operating system ?
basically when you create a win form application in visual studio, the first time you run it, it creates an executable (.exe) file in its bin folder. so even though when you close visual studio it will keep running.
(but when you run it in debug mode, the moment you close the VS, your
win form application will also be closed)
but one thing any program or process that runs in your machine is managed by operating system, like allocating memory resources etc...
Hope this will help
I have to put this as an answer since I need to place some image -
Closing VS will close the application only when its being debugged and you have started the app using VS
Being debugged - (you see a Running on top left)
This is true for both - Current project or an external system
However, if you are debugging an application by Debug -> Attach to process.
Closing VS will not kill the applicaiton although you can debug it.

Win Form exe closes immediately after launch, deploying a win form application using setup project

I have created a win form application in c# with sqlce. I followed the steps here http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html making some tweaks along the way since I was using sqlce 3.5 .net and that blog was talking about 4.0 .net.
When I finished the application, I created a set up project and build it which gave me an msi and setup file.
Now when I run this set up on my own machine where I developed the applicaton, it works a charm.
I tried it on a friend's machine as well, it worked well, he had visual studio 2010 as well on his machine.
Now when I tried it on 2 other machines with VS, after installation, on launching the exe, it launches and immediately closes, I do not see anything although.
I know it launches as i look at processes from my task manager it shows it in there for like 3-4 seconds and its gone.
I tried using this Not able to run the .exe file created from c# where i wrapped the try and catch around all the code inside the root win form but no text file was created with any errors.
On doing some research, it says it could be because I am missing some dll's, how do i make sure all the dlls from the references would be copied into the project ? I set all dll's to true for copy local.
Is this something else and not related to dlls?
I really just want to be able to install the application on any machine without any problems.
Thank you for your time.
EDIT
I need to add that this was a project that involved using an XBox controller sending data to a wireless receiver that was hooked to a PC. I used the XNA framework to intercept these and display some form of output on the Win Forms.
When packing and installing/deploying an application that makes use of the XNA DLLs on another non developer machine, the XNA framework needs to be installed.
My solution was packing my application along with the xna installer and so the xna framework installs as a prerequisite and then my application installs and then it no longer crashes.
Thanks to mrlucmoring and Mark for their support and troubleshooting.

C# application publish - errors on different systems

I've made an application in C# . it's a WPF application with SDF DB.
I have VS2008 express.
I published my application (with SQL-CE dll) and installed it on my computer (I have windows XP) and on another WinXP computer and it worked fine.
I sent the same files to 2 people with windows 7.
the first one couldn't install the application - she got an error message like "cannot download the application [...] missing required files [...]".
the second one (window 7 with 64 bit) installed it but she could see only the main screen (that doesn't require DB) but after she tried to go to another screen - the application crashed and there was an error message that told her that maybe the application wasn't installed correctly (I have a screenshot but it's in hebrew).
What do I have to do to make the application work on windows7?

.NET 4 Program written/compiled on Windows 7 machine won't run on XP

I have an app that I wrote using C# .NET 4.0 in Visual Studio 2010 on my Windows 7 Ultimate machine. This app works fine on both Vista and other Windows 7 computers, but whenever someone running Windows XP tries to run it it crashes.
In order to reproduce this I've tried running it on my Win XP VMWare machine and it crashes for me in there. Unfortunately it doesn't give me any specific error, just informing me that the program has crashed and needs to close.
One other user sent me the following:
Run-time error '339'
Component 'vbalSGrid6.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
Code 0xe0434352
Flags 0x00000001
I don't get that particular bit when I try to run it on my Virtual XP machine, and I also made sure to install .NET 4.0 on there.
What could be causing this, and why won't the app run in XP if the .NET 4 framework is supported for XP?
Components used in the program: DataGridView, ComboBox, Buttons, Labels, LinkLabel, NewtonSoft's JSON parser, and that's about it.
I am baffled and have utterly no idea where to start. Ideas?
UPDATE: Hmm, tried running my other recently created application on XP and it loaded fine. The only major difference (in the components I used anyway) between the two is my use of NewtonSoft's JSON library, which I actually think is a .NET 3.5 component.
UPDATE 2: Just for kicks I tried running the program on my Wind7 machine in "Windows XP SP3" compatibility mode and it ran fine. Of course, I have no idea just how closely the "compatibility mode" emulates a true XP SP3 environment, but I figured I'd give ya'll the info anyway.
¡¡ IT WAS THE APPLICATION ICON !!
I kept noticing that the module it referenced in the error it gave me was system.drawing which I thought was odd. I figured perhaps the PictureBox I was using was causing the issue, so I tried disabling everything to do with that, to no avail.
I had my business partner set up his XP box so that we'd have another machine to test with aside from my VMWare XP box just in case there was some odd issue with it.
After he got it set up and the app copied over he said "The icons look like DOS ones" and I had a eureka moment.
I was using .PNG's as the icons because they support transparencies and whatnot, but XP doens't natively support them. So when the app was copied to the desktop it just used a generic icon for it, and when the application was run it crashed because XP doesn't know how to render a .PNG.
Try using the Fusion Log Viewer to debug startup errors in .NET applications.
Scott Hanselman has written a nice howto along with links to further resources if you need to go deeper.
Are we sure this is some wierd .NET compatibility issue or just a run of the mill bad installer/deployment problem?
Here's one user who has that error message because the OCX DLL was copied to System32 with a shortname. Renaming the DLL to the correct name and running RegSvr32 resolved his problem.
Do you have an installer? Have you correctly identified all of your managed and unmanaged dependencies and properly authored them into your installer?
http://forums.elmsoftware.com/forum_posts.asp?TID=119

Categories