Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Stange crashes of an application

Stange crashes of an application

Scheduled Pinned Locked Moved C#
csharphelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    J Holzer
    wrote on last edited by
    #1

    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.

    M 1 Reply Last reply
    0
    • J J Holzer

      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.

      M Offline
      M Offline
      Manoj Kumar Rai
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • M Manoj Kumar Rai

        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

        J Offline
        J Offline
        J Holzer
        wrote on last edited by
        #3

        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...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups