|
Hi!
I do have strange crashes on an application.
An App, consisting of an .Net1.1/C#-Exe and some .Net1.1-DLLs is doing some communication over RS232 and executing some Threads/UserWorkItems. It processes some Jobs, that are started by commands that arrive over RS232.
At some point, when the app is running maybe about 45mins to 1.5 hours it disapperard without any sign. I put in a lot of logging (Status of the system, exceptions and so on), so there should be nearly no line of code outside a try/catch. Every try/catch-block has it´s own logging.
I even put a try/catch around the "Application.Run(...)" inside my main-routine. Logging before and after this application start should show me, what happened. No result: the app doesn´t even write the logging at the very end of the main-routine where any exception should be caught.
But when the app crashes i do not get any more logging-entry or event this nice "MS-Send Information on crash"-Window. It´s just gone, just if anyone killed the process with the task-manager.
And what the stangest thing is: it works fine for hours and hours on an simulation-worksstation, but crashes on the machine it should finally run on.
Who can help me? Any ideas are welcome!
Thanx a lot!
J.
|
|
|
|
|
Hi,
Assuming your application is multithreaded, its very much possible that your crash issue is related with thread synchronization.
You look for possible thread synchronization problem in your code. Also you can implement a debug writer to a file system which will write the debug message to a physical file (Debug file). When your application crashes, you can go through the file and find out what is the last few lines of code excecuted while crash occured.
Manoj
Never Give up
|
|
|
|
|
I do have a debug-writer. But i always get different code-lines with that.
The thread-sync is done by events, that are sent between the threads (this is because of the architecture and the needs of the app). Each class takes handles events it receives.
What i got a few minutes ago was a "ExecutionEngineException" while closing a Logging-FileStream.
Maybe this could be a hint on where the error might be...
|
|
|
|
|
|
Try this[^]
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
I am a C# beginner.
when attribute changed,I want to start a event for response.
like VisibleChanged event.
I mastery is bad about event and delegate,please guidance.
Thanks very much.
|
|
|
|
|
Use a delegate and add it to the event for your object.
TextBox txt = new TextBox();<br />
txt.VisibleChanged += new EventHandler(TextBox_VisibilityChanged);<br />
<br />
public void TextBox_VisibilityChanged(object sender, EventArgs e)<br />
{<br />
}
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
My Class :
public class MyClass
{
private int stauts =0;
public int Stauts
{
get{return status;}
set{status = value;}
}
}
How write a event associate "Stauts" when "Stauts" changed.
thanks.
|
|
|
|
|
hi,
you could try the following:
public class MyClass
{
private int stauts =0;
public delegate void MyEventHandler(object obj);
public event MyEventHandler OnStatusChange;
public int Stauts
{
get{return status;}
set
{
status = value;
OnStatusChange(this);
}
}
}
for more information read http://www.codeproject.com/csharp/eventarguments.asp[^]
regards
|
|
|
|
|
why "MyEventHandler" does not have "EventArgs" parameter?
|
|
|
|
|
Call the event hanlder inside the body of the set{ } statement.
|
|
|
|
|
the declared sentence: "public event StatusHandler statusChanged",
where should i write it?
thanks.
|
|
|
|
|
I have a very basic upload/download application. The app uses a select statement to download and a insert statement to upload. The reason I include those is because I am not sure how to get a progress report from them, ie completion percentage. I may be uploading upward of 100megs and don't want the user to just sit there waiting. I have tested a 5meg file and it takes about 3 minutes to upload and does so correctly, but the user has no idea what is going on.
How do I get progress of the SQL read/write so I can update my progress bar?
Thanks in advance!
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
I am not aware of a way to do this, but it has been my experience that as long as users see the progress bar moving they know the application is not hanging and feel some better. So estimating the % complete based on seconds elapse divided by (average megs per second * megs) should be a reasonable solution (I swear microsoft often does things like this). Just make sure that the last 5% of the progress bar moves much more slowly and stops at 99% so that you don't reach 100% before it's done.
topcoderjax
|
|
|
|
|
:(hi all,
in my window form i m bindng one datagrid with check boxes now i wnat to dele those record which are checked how i can do this in window C#
i m also bind the image of the member into datagirdview(images are in the DB)
how i can perform this
regard
|
|
|
|
|
Hi,
Deleting records:
You can follow the following steps to get the "checked" records deleted.
1) First get the records marked "checked"
2) Use the dataGridView1.Rows.Remove to remove the data from the Grid.
3) Use the SqlCommand to get the records deleted from the database.
Binding Images:
I have bound a image column from the access database with the "datagrid" automatically from wizard. Please note that the type of the column in data table is Ole Object.
Manoj
Never Give up
|
|
|
|
|
hi,
i'm trying to parse C# file and want to change the code..
i have a class with following lines of code, assume
class Test
{
public void method()
{
Foo.Bar = "Demo";
}
}
i want to extract only the property name and its value..
i have a pattern like this.. which extract the value only, but i need the property name too..
<code>
"\\Foo.[^;]*(=\\s*\")(?<val>([^\"]*))";
</code>
plz give me a pattern which extract the both.
regards,
nas
|
|
|
|
|
We are using SQLDbAccess.dll provided by Microsoft. There are two methods are filling the Dataset. Fill method and also ExecuteDataSet. Which one will be better? Thanks
|
|
|
|
|
K.P.Kannan wrote: Fill method and also ExecuteDataSet
If your taking about DataAdapter.Fill then it is better to use the ExecuteDataset method as the SQLDBAccess.dll would look after opening/closing connections
|
|
|
|
|
I've been coding for quite sometime but never with web. I just need someone to help me get started.
I'm trying to automatically push a button on a web page without a manual mouse click(its written in html). Where do I start? Can I even do it with C# or should I use another language. I was trying to use the standard webcontrol but it seems limited. Can anyone help? Thank you very much.
|
|
|
|
|
Hi.
It can be done quite easily with the webbrowser control. If this is what you would like to use I could guide you. Please reply if interested.
|
|
|
|
|
I am very interested. Very very interested. Maybe a small code snippet. Thanks again.
|
|
|
|
|
Ok, here it is.
I hope it's not too late. I was quite busy yesterday afternoon and I didn't have time to check the codeproject forum.
So, a simple example of how to do an automatic search on google:
Place a WebBrowser control on your form.
Use it's navigate method to load the google page:
MyWebBrowser.Navigate("http://www.google.com");
In order to access the controls on the webpage and use them, you need to know what their names are from the html source of the page. If you take a look at google's source you'll see all the controls, and among them these two:
and
The first one is the text box where you type the text to search and the second is the search button.
So, all you need to do is fill the text box and after that simulate clicking the "Google Search" button. Like this:
HtmlElement searchBox = MyWebBrowser.Document.All["q"];
searchBox.InnerText = "code project";
HtmlElement btnSearch = MyWebBrowser.Document.All["btnG"];
btnSearch.InvokeMember("click");
Hope this helps.
Have a nice day!
PS: There's a very quick and easy way to find the name of the controls you need from a web page. It's called Firebug. It's a plug-in for Firefox. Just use it. I'm sure you'll find it great, too.
|
|
|
|
|
Everything you said worked to perfection. Thanks for the help. Now that I have the basics down I am able to understand how the control works. You the man!
|
|
|
|
|
I'm glad I could help.
Good luck and happy coding!
|
|
|
|