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. Deadlocked UI need a little help

Deadlocked UI need a little help

Scheduled Pinned Locked Moved C / C++ / MFC
designdata-structureshelplounge
2 Posts 1 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.
  • S Offline
    S Offline
    Spawn Melmac
    wrote on last edited by
    #1

    I have what seems to be a random deadlock in my application which I am hoping someone can shed some light on. The occurance of the deadlock is random but the call stack is far from it... below is the stack I am getting.

    0:001> ~0s;kbn
    eax=002f0f60 ebx=00000000 ecx=00000f60 edx=00000f60 esi=0079cc10 edi=0015ec54
    eip=61088bc4 esp=0015ea90 ebp=0015ebd0 iopl=0 nv up ei pl nz na pe nc
    cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206
    mfc90ud!CWnd::OnWndMsg+0x224:
    61088bc4 335508 xor edx,dword ptr [ebp+8] ss:002b:0015ebd8=00000087

    ChildEBP RetAddr Args to Child

    00 0015ebd0 61088962 00000087 00000000 00000000 mfc90ud!CWnd::OnWndMsg+0x224
    01 0015ebf0 61085d80 00000087 00000000 00000000 mfc90ud!CWnd::WindowProc+0x32
    02 0015ec6c 61086346 0015f884 000b1068 00000087 mfc90ud!AfxCallWndProc+0xf0
    03 0015ec8c 61081a3b 000b1068 00000087 00000000 mfc90ud!AfxWndProc+0xa6
    04 0015ecc8 750c6238 000b1068 00000087 00000000 mfc90ud!AfxWndProcBase+0x5b
    05 0015ecf4 750c68ea 610819e0 000b1068 00000087 USER32!InternalCallWinProc+0x23
    06 0015ed6c 750ccd1a 00000000 610819e0 000b1068 USER32!UserCallWinProcCheckWow+0x109
    07 0015edb0 750ccd81 00c8ba70 00000000 610819e0 USER32!SendMessageWorker+0x581
    08 0015edd4 750e0fb1 000b1068 00000087 00000000 USER32!SendMessageW+0x7f
    09 0015ee00 750e29a2 00cadd90 00000000 00c87810 USER32!xxxRemoveDefaultButton+0x5f
    0a 0015ee30 750dc0cd 00cadd90 00000000 00290b46 USER32!xxxCheckDefPushButton+0x12d
    0b 0015ee68 610eebb3 001e0ada 00000000 f53163fb USER32!IsDialogMessageW+0x156
    0c 0015ee80 6108f76e 0079cbc8 0058cff8 0015eea8 mfc90ud!CWnd::IsDialogMessageW+0x73
    0d 0015ee90 610c730f 0079cbc8 0058cff8 0058cff8 mfc90ud!CWnd::PreTranslateInput+0x6e
    0e 0015eea8 6108afbd 0079cbc8 0058cff8 00190712 mfc90ud!CDialog::PreTranslateMessage+0xef
    0f 0015eebc 611174df 001e0ada 0079cbc8 0015eedc mfc90ud!CWnd::WalkPreTranslateTree+0x8d
    10 0015eed8 61118595 0079cbc8 002f9940 0015eef8 mfc90ud!AfxInternalPreTranslateMessage+0x4f
    11 0015eee8 61117555 0079cbc8 002f9940 0015ef18 mfc90ud!CWinThread::PreTranslateMessage+0x25
    12 0015eef8 61117391 0079cbc8 0015ef14 61081be9 mfc90ud!AfxPreTranslateMessage+0x25
    13 0015ef18 611188ee 002f9940 0015ef30 611173e1 mfc90ud!AfxInternalPumpMessage+0xe1
    0:000> .frame c
    0c 0015ee80 6108f76e mfc90ud!CWnd::IsDialogMessageW+0x73
    0:000> dv
    this = 0x0058cff8
    lpMsg = 0x0079cbc8
    0:000> dt lpMsg -r
    Local var @ 0x15ee88 Type tagMSG*
    0x0079cbc8
    +0x000 hwnd

    S 1 Reply Last reply
    0
    • S Spawn Melmac

      I have what seems to be a random deadlock in my application which I am hoping someone can shed some light on. The occurance of the deadlock is random but the call stack is far from it... below is the stack I am getting.

      0:001> ~0s;kbn
      eax=002f0f60 ebx=00000000 ecx=00000f60 edx=00000f60 esi=0079cc10 edi=0015ec54
      eip=61088bc4 esp=0015ea90 ebp=0015ebd0 iopl=0 nv up ei pl nz na pe nc
      cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206
      mfc90ud!CWnd::OnWndMsg+0x224:
      61088bc4 335508 xor edx,dword ptr [ebp+8] ss:002b:0015ebd8=00000087

      ChildEBP RetAddr Args to Child

      00 0015ebd0 61088962 00000087 00000000 00000000 mfc90ud!CWnd::OnWndMsg+0x224
      01 0015ebf0 61085d80 00000087 00000000 00000000 mfc90ud!CWnd::WindowProc+0x32
      02 0015ec6c 61086346 0015f884 000b1068 00000087 mfc90ud!AfxCallWndProc+0xf0
      03 0015ec8c 61081a3b 000b1068 00000087 00000000 mfc90ud!AfxWndProc+0xa6
      04 0015ecc8 750c6238 000b1068 00000087 00000000 mfc90ud!AfxWndProcBase+0x5b
      05 0015ecf4 750c68ea 610819e0 000b1068 00000087 USER32!InternalCallWinProc+0x23
      06 0015ed6c 750ccd1a 00000000 610819e0 000b1068 USER32!UserCallWinProcCheckWow+0x109
      07 0015edb0 750ccd81 00c8ba70 00000000 610819e0 USER32!SendMessageWorker+0x581
      08 0015edd4 750e0fb1 000b1068 00000087 00000000 USER32!SendMessageW+0x7f
      09 0015ee00 750e29a2 00cadd90 00000000 00c87810 USER32!xxxRemoveDefaultButton+0x5f
      0a 0015ee30 750dc0cd 00cadd90 00000000 00290b46 USER32!xxxCheckDefPushButton+0x12d
      0b 0015ee68 610eebb3 001e0ada 00000000 f53163fb USER32!IsDialogMessageW+0x156
      0c 0015ee80 6108f76e 0079cbc8 0058cff8 0015eea8 mfc90ud!CWnd::IsDialogMessageW+0x73
      0d 0015ee90 610c730f 0079cbc8 0058cff8 0058cff8 mfc90ud!CWnd::PreTranslateInput+0x6e
      0e 0015eea8 6108afbd 0079cbc8 0058cff8 00190712 mfc90ud!CDialog::PreTranslateMessage+0xef
      0f 0015eebc 611174df 001e0ada 0079cbc8 0015eedc mfc90ud!CWnd::WalkPreTranslateTree+0x8d
      10 0015eed8 61118595 0079cbc8 002f9940 0015eef8 mfc90ud!AfxInternalPreTranslateMessage+0x4f
      11 0015eee8 61117555 0079cbc8 002f9940 0015ef18 mfc90ud!CWinThread::PreTranslateMessage+0x25
      12 0015eef8 61117391 0079cbc8 0015ef14 61081be9 mfc90ud!AfxPreTranslateMessage+0x25
      13 0015ef18 611188ee 002f9940 0015ef30 611173e1 mfc90ud!AfxInternalPumpMessage+0xe1
      0:000> .frame c
      0c 0015ee80 6108f76e mfc90ud!CWnd::IsDialogMessageW+0x73
      0:000> dv
      this = 0x0058cff8
      lpMsg = 0x0079cbc8
      0:000> dt lpMsg -r
      Local var @ 0x15ee88 Type tagMSG*
      0x0079cbc8
      +0x000 hwnd

      S Offline
      S Offline
      Spawn Melmac
      wrote on last edited by
      #2

      After a little more digging I have discovered that I am getting stuck in a loop inside CWnd with a WM_GETDLGCODE being passed to all of the controls in my application?|?|? The main dialog consists of

      BEGIN
      CONTROL "",IDC_MNG_TAB,"SysTabControl32",0x0,17,25,248,300
      PUSHBUTTON "Edit",IDC_MNG_EDIT,31,345,51,14,WS_GROUP
      PUSHBUTTON "Apply",IDC_MNG_APPLY,112,345,50,14,WS_DISABLED | WS_GROUP
      DEFPUSHBUTTON "Cancel",IDC_MNG_CANCEL,194,345,50,14,WS_GROUP
      CONTROL "",IDC_MAIN_TREE,"SysTreeView32",WS_BORDER | WS_HSCROLL | WS_GROUP | WS_TABSTOP,299,75,209,250
      CONTROL "",IDC_RPT_TAB,"SysTabControl32",0x0,544,25,248,300
      PUSHBUTTON "Execute",IDC_RPT_EXECUTE,561,345,50,14,WS_GROUP
      PUSHBUTTON "Cancel",IDC_RPT_CANCEL,724,345,50,14,WS_GROUP
      CONTROL 284,IDC_LOGO,"Static",SS_BITMAP,299,329,209,39
      GROUPBOX "Manage",IDC_MNG,7,7,268,369
      GROUPBOX "Monitor",IDC_MONITOR,285,7,237,369
      GROUPBOX "Report",IDC_RPT,532,7,268,369
      GROUPBOX "Status",IDC_ST_STATUS,299,21,209,44
      CONTROL 0,IDC_STATUS,"Static",SS_BITMAP,324,31,159,28
      END

      The group boxes and tab controls are owner drawn. Any help would be appreciated.

      Alan

      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