Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • Last Modified:

WPF APP

My application has started crashing each time i run with a message saying :windows presentation Host stopped working... I have no clue why..

In the event viewer I could see
Faulting application PresentationHost.exe, version 3.0.6920.1453, time stamp 0x4858e3e0, faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a7a6, exception code 0xc0000374, fault offset 0x000b015d, process id 0xd6c, application start time 0x01c9c38976f3ffb4.
0
Pavithra_S
Asked:
Pavithra_S
  • 2
  • 2
1 Solution
 
CuteBugCommented:
try installing dot net framework 3.5 sp1.

then if you still get the same problem, the issue is with your code.
surround your code with try catch and in the catch show the execption details in a message box.
0
 
unmeshdaveCommented:
On what scenerio, it get crashed? or it get crashed on startup only?
0
 
Pavithra_SAuthor Commented:
In my application i have different tabs,  only under one particluar tab when I click the add button it crashes. I used break points and it crashes at the executenonquery line. Where it makes a call to the said stored procedure on mysql.

I am passing 23 parameters and i double checked the order and data types etc etc.. everything seems fine... i tried to send less data but that too didnt work.. so i am clueless now.

0
 
unmeshdaveCommented:
can you please put the line with call executenonquery? it will be better if u put code of that function here which calls  executenonquery.
0
 
Pavithra_SAuthor Commented:
i checked my code and found two places where I had messed up.. thanks for all ur help.



OdbcParameter psdesc = new OdbcParameter();
                psdesc.OdbcType = System.Data.Odbc.OdbcType.Text;
                psdesc.Value = txtBox_SDesc.Text;
                psdesc.Direction = System.Data.ParameterDirection.Input;

                OdbcParameter pnotes = new OdbcParameter();
                psdesc.OdbcType = System.Data.Odbc.OdbcType.Text;
                psdesc.Value = txtBox_notes.Text;
                psdesc.Direction = System.Data.ParameterDirection.Input; the psdesc had to be changed to pnotes...
I am surprised it didnt throw any error and actually crashed because of this mistake, had been working on thsi for soo long and didnt notice this obvious error in code! sorry

Thanks once again
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now