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 / C++ / MFC
  4. Logoff XP error caused by VC++ Program

Logoff XP error caused by VC++ Program

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcomquestionannouncement
4 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.
  • V Offline
    V Offline
    vikas vaish
    wrote on last edited by
    #1

    Hi! I am looking the solution or direction in order to resolve this problem I am having during logoff using Windows XP. We have got few applications written in VC++ 6.0 (using MFC and OLE Servers). When we logon few applications started as they are specified in startup, which also invokes OLE servers. When we come to logoff, first of all logoff process is very slow, though I found that by just killing few MFC Applications, will really logoff quickly. Though I could not figure it out why? So I need some suggestion, where to look at? And sometimes it errors by just coming up the standard XP dialogue showing program is not responding and End button has to be invoked to end the program. While investigating we found that few dispatch pointers did not release properly when we were calling OLE Servers, which I fixed and it slightly improves the logoff process and now Standard XP dialog for not responding program not happening every so often as it used to be, but still happening quite a few times and logoff process is still very slow. I am trying to figure it out but don’t know where else it could be a problem. Any suggestion would be appreciated. Thanks

    M 1 Reply Last reply
    0
    • V vikas vaish

      Hi! I am looking the solution or direction in order to resolve this problem I am having during logoff using Windows XP. We have got few applications written in VC++ 6.0 (using MFC and OLE Servers). When we logon few applications started as they are specified in startup, which also invokes OLE servers. When we come to logoff, first of all logoff process is very slow, though I found that by just killing few MFC Applications, will really logoff quickly. Though I could not figure it out why? So I need some suggestion, where to look at? And sometimes it errors by just coming up the standard XP dialogue showing program is not responding and End button has to be invoked to end the program. While investigating we found that few dispatch pointers did not release properly when we were calling OLE Servers, which I fixed and it slightly improves the logoff process and now Standard XP dialog for not responding program not happening every so often as it used to be, but still happening quite a few times and logoff process is still very slow. I am trying to figure it out but don’t know where else it could be a problem. Any suggestion would be appreciated. Thanks

      M Offline
      M Offline
      Martin Koorts
      wrote on last edited by
      #2

      Hi It sounds like you've got more dangling references elsewhere that haven't been fixed. In this case, you can try to isolate the functionality in your code, by trying to exercising only certain parts of your application between a startup-shutdown cycle - this way you might discover which part(s) of your app is causing the problem(s). If you can, even try to disable parts of your application by commenting it out and re-building for test. Trace all threads in your app too, making sure they all close properly. Good luck ;-) Martin

      V 1 Reply Last reply
      0
      • M Martin Koorts

        Hi It sounds like you've got more dangling references elsewhere that haven't been fixed. In this case, you can try to isolate the functionality in your code, by trying to exercising only certain parts of your application between a startup-shutdown cycle - this way you might discover which part(s) of your app is causing the problem(s). If you can, even try to disable parts of your application by commenting it out and re-building for test. Trace all threads in your app too, making sure they all close properly. Good luck ;-) Martin

        V Offline
        V Offline
        vikas vaish
        wrote on last edited by
        #3

        Hi! thanks for your suggestion.seems to me very practical approach.but the problem is where to isolate that.there are so many applications lieing around.if i give you very brief example by just explaining the scenario: 1. mainapp1 2. mainapp2 both kics off following OLE Servers 1. OLEServer1, which Kicks off OLEServer2 ( this is the server which most of the time come up with XP dialog showing nonresponsive program click End ). though we proved that disabling the OLEServer2 completely solve the problem and error never happend. but my sneaking suspicion is its not the OLEServer2 who is causing its MainAPP1/MainApp2 or OLEServer1, which instantiating OLEServer2 causing the dangling pointer. Where do you think problem lies?and how to isolate this. thanks in advance.

        M 1 Reply Last reply
        0
        • V vikas vaish

          Hi! thanks for your suggestion.seems to me very practical approach.but the problem is where to isolate that.there are so many applications lieing around.if i give you very brief example by just explaining the scenario: 1. mainapp1 2. mainapp2 both kics off following OLE Servers 1. OLEServer1, which Kicks off OLEServer2 ( this is the server which most of the time come up with XP dialog showing nonresponsive program click End ). though we proved that disabling the OLEServer2 completely solve the problem and error never happend. but my sneaking suspicion is its not the OLEServer2 who is causing its MainAPP1/MainApp2 or OLEServer1, which instantiating OLEServer2 causing the dangling pointer. Where do you think problem lies?and how to isolate this. thanks in advance.

          M Offline
          M Offline
          Martin Koorts
          wrote on last edited by
          #4

          Going on your hunch, I'd say you should look at OLEServer1's use of OLEServer2 - might be that it's not releasing a reference. If you suspect that it's a COM reference, you can change reference access to use smart pointers, if you're not already - also provided it's worth the change (I don't know how many such cases there are). If you're using ATL, you can turn on _ATL_DEBUG_REFCOUNT, _ATL_DEBUG_INTERFACES, but these trace to the debug output window, so if you're turning the machine off, output is lost (unless you find a way to stop powering down). Also play around with stopping the 2 apps by hand (and checking with the Task Manager to see if they're still running). Play around with the order in which the 2 apps are stopped. Martin

          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