Click here to Skip to main content
14,825,439 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I have a program that should be used by several people and access the data with postgrelsql (NpgsqlCommand). When it comes to implementation, the program runs super well, but after installation, the program crashes for no reason.
There is also a trigger that does not work for all cases.
Could you please help me

What I have tried:

i have debbuging mein Pramm but not success
Updated 6-Mar-20 3:55am
Richard Deeming 6-Mar-20 8:04am
We can't help you fix an error that we can't see in code that we also can't see.

You need to debug your program to find out what the problem is. If you're completely stuck, then click the green "Improve question" link and update your question to include the relevant parts of your code and the full details of the error. Remember to indicate which line of your code the error is thrown from.
Member 14655281 6-Mar-20 8:10am
I have already debugged my code but I found no error. Is there a program that hardly monitors the code in the event of a problem?
Stefan_Lang 6-Mar-20 10:29am
Solution 1 offers great advice, but there's one more thing you can try (if you haven't already): run the release build of your program on your own machine.

If it runs fine, then the only idea I have is that your program refers to a file or other resource that is available on your machine, but not on other machines,

If it doesn't run, then there is a difference between release and debug - then you can look for code that only runs in Debug mode, such as assert statements.

Programs don't crash for no reason: they crash because a developer made a mistake in code, because an environment is different (or differently configured), because one or more access permissions are missing, because connections strings aren't valid in a new location, ...

There are as many reasons for a crash as there are developers writing software ... but no app has ever crashed for "no reason"!

Since it only fails in production, that rules out the easy way: using the debugger. Which means you need to fall back to pre-debugger days and get manual. Start adding code to your app to log exactly what it is doing to a log file, and run that version on the production machine. When it crashes, look at the log and add more specific logging code to start narrowing down what exactly is happening. Repeat this process until you know the method that it crashes in, and then work on where exactly and why it is crashing. Do not expect this to be a quick process - in a large app this can take days, and you still won't know what caused the crash - just where it crashed, and what data caused it to fail. Hopefully, you can then replicate the problem on your dev machine, or find a difference between them that is relevant to the area of code.

Good luck - but we can't do any of that for you!
Member 14655281 6-Mar-20 8:47am
OriginalGriff 6-Mar-20 8:57am
You're welcome!
In addition to the valuable hints in solution one I would like to suggest to debug your programme by means of remote debugging.
A detailed description of remote debugging is described here.
Remote Debug a C# or VB project - Visual Studio | Microsoft Docs[^]
Member 14655281 10-Mar-20 10:22am
TheRealSteveJudge 11-Mar-20 3:00am
ur welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900