News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Switch to this thread crashes

Started by Multinode Nick, November 02, 2006, 09:54:24 PM

Previous topic - Next topic

Multinode Nick

Hi,

It's my first Code Blocks day, it seems to be a really promising IDE so I'm testing it every way I can to be sure to choose a best IDE for my development team and I for the next years.

I think I just felt on an application bug by trying basic multithread functions.

I coded a simple thread function in a Win32 project:

DWORD WINAPI CommunicationFct(LPVOID param)
{
    int i =0;
    while(1)
    {
        i++;
        Sleep(100);
    }
    return 0;
}


I create 4 threads with these calls:

CreateThread(NULL,0,CommunicationFct,NULL,0,&dThreadID);
CreateThread(NULL,0,CommunicationFct,NULL,0,&dThreadID);
CreateThread(NULL,0,CommunicationFct,NULL,0,&dThreadID);
CreateThread(NULL,0,CommunicationFct,NULL,0,&dThreadID);


The software works fine and in debugging mode, the 4 threads appear in the "Running Threads" debug window.

But if I stop debugging, the threads are still available in the GUI and if I click on "Switch to this Thread", the whole IDE crashes. Not a really bad bug, but a bug and possibly easy to fix.

Should I report it to the official Bug reporting services?

Thanks

MortenMacFly

#1
Confirmed. This is the back trace (rev. 3155).
Will have a look into... the expert should be mandrav.
With regards, Morten.

Edit: Reason is access to a NULL object (m_pDbg->GetState().GetDriver() returns NULL because the driver isn't active anymore). Will fix the crash, but the listbox shouldn't have content at that time... mandrav?

Edit2: Fixed in revision 3173.

[attachment deleted by admin]
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

Quotebut the listbox shouldn't have content at that time... mandrav?

Yes, all debugging windows should be cleared when the debugging session ends.
Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: mandrav on November 03, 2006, 09:06:08 AM
Yes, all debugging windows should be cleared when the debugging session ends.
Ok - I had a look into it. I implemented cleaning all debugging windows in the destructor of DebuggerDriver::~DebuggerDriver(). But then I realised that this would also clear the backtrace (BacktraceDlg) which makes no sense. So I took that off. Then I realised that it may make sense to keep the DisassemblyDlg, too. After that came the ExamineMemoryDlg, CPURegistersDlg... in the end I think it is OK just as it is because this might still be valuable information even if the debugger has stopped. It just shouldn't crash when "clicking on it".
Yiannis: Do you agree?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

Be patient!
This bug will be fixed soon...