The CDB process terminated unexspectetly

  • Hallo,
    I changed to a new computer and from Windows 8.1 to Windows 10 and change to Qt5.4.2 toQt5.5.1.
    Now in debugging mode, after I exit my program in a normal way I get this message in an error box.
    It is not really a great problem but it is one click more.
    What is the reason and how can I avoid it.

  • Lifetime Qt Champion

    Could you test with a new project if it does the same?

  • Indeed a new project (QtWidgets-App) produces NOT the errors.

  • Lifetime Qt Champion

    Ok. so its something in that project that does crash some how.
    Very hard to guess what it could be.
    Setting a break point in mainwindow destructor and
    single step dont provides any hints?

  • Hi @mrjj
    Destructor of MainWindow will been never reached in my program.

    In general I dont know what happens if a program closes. All worked before so I never thought about it.
    Does a close action calls all destructors ? In which order ?
    What should I do before close a program ?

  • Lifetime Qt Champion

    well normally, the message loop is exited.

    int main(int argc, char* argv[]) {
    QApplication a(argc, argv);
    MainWindow w;;
    return a.exec(); << this is exited
    } << here w destructor should be called.

  • Hi @mrjj

    Indeed I get the error after the a.exec in the "}" row.
    Debugging gives only assembler-code of my CarDamage-Program: In 0x15187bd I get the message from the debugger.
    Any ideas. My return code is 0.
    Strange is that I dont get the message in my old system. What has changed in Qt /Debugger?

    0x151879a  <+0x022a>         movzx   eax,word ptr [ebp-1Ch]
    0x151879e  <+0x022e>         push    eax
    0x151879f  <+0x022f>         mov     ecx,dword ptr [ebp-20h]
    0x15187a2  <+0x0232>         push    ecx
    0x15187a3  <+0x0233>         push    0
    0x15187a5  <+0x0235>         push    offset CarDamage!__ImageBase (01380000)
    0x15187aa  <+0x023a>         call    CarDamage!WinMain (01519290)
    0x15187af  <+0x023f>         mov     dword ptr [CarDamage!mainret (0191921c)],eax
    0x15187b4  <+0x0244>         cmp     dword ptr [CarDamage!managedapp (01919220)],0
    0x15187bb  <+0x024b>         jne     CarDamage!__tmainCRTStartup+0x25a (015187ca)
    0x15187bd  <+0x024d>         mov     edx,dword ptr [CarDamage!mainret (0191921c)]          **** Debuger Msg
    0x15187c3  <+0x0253>         push    edx
    0x15187c4  <+0x0254>         call    dword ptr [CarDamage!_imp__exit (0191a13c)]
    0x15187ca  <+0x025a>         cmp     dword ptr [CarDamage!has_cctor (01919218)],0

  • Lifetime Qt Champion

    Well its odd if it really is same code.
    Often its a double delete of some data.
    Say mainwindow deletes something and u do to.
    Else it's some mismatch of Qt dll versions or something like that.
    But should do in fresh project also.

    You could try to create a new button and do
    MainWindow *test=new MainWindow()
    delete test;

    just to see if the actual destruction of mainwind that does it.

    Also, do you have any global data?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.