Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Clang CC
oBFusCATed:
No, it has not been updated.
yvesdm3000:
--- Quote from: MortenMacFly on February 19, 2017, 07:53:57 pm ---Dear Yves,
I've tried to compile this plugin on a more recent compiler. I suggest to apply the patch that is attached to:
- get rid of the deprecated auto_ptr
- simplify the singleton pattern
- fix an compiler error in non-PCH builds due to missing #include <iostream>
The patch applies to 2 files on the staging branch only: cclogger{.h/.cpp}.
--- End quote ---
I applied your patch. Thank you!
Maybe apply it also on the builltin codecompletion plugin since it has the same file?
Yves
BlueHazzard:
Hi, your last commit seems to have fixed my previous crash.
But on project closing (like the codeblocks project file) i get sometimes this crash report:
--- Code: ---AddrPC Params
02FEABF6 0000002E FFFFFFFF 0028BAD4 wxmsw28u_gcc_custom.dll!wxStringBase::rfind
02FED382 0000002E 00000001 0028BB64 wxmsw28u_gcc_custom.dll!wxString::Find
02FED3DB 2F772C98 0000002E 0028E488 wxmsw28u_gcc_custom.dll!wxString::AfterLast
618734B6 2F772C98 00000001 00000000 codeblocks.dll!FileTypeOf
0BA78572 2D171550 0E8AA3B0 2B0D5A50 compiler.dll!SetupIncludeDirs [codeblocks_sf/src/plugins/compilergcc/compilerMINGWgenerator.cpp @ 55]
53: {
54: ProjectFile* f = *it;
> 55: if (FileTypeOf(f->relativeFilename) == ftHeader &&
56: f->compile)
57: {
6181B4CA 2AA20288 0A84315C 00000024 codeblocks.dll!CompilerCommandGenerator::Init
0BA75442 2AA20288 0028E488 00000000 compiler.dll!GetCommandGenerator [codeblocks_sf/src/plugins/compilergcc/compilerMINGW.cpp @ 51]
49: {
50: CompilerMINGWGenerator *generator = new CompilerMINGWGenerator;
> 51: generator->Init(project);
52: return generator;
53: }
0A756A6E 063E0198 2F789598 2D29D1C8 clanglib.dll!GetCompileCommand [ClangLib/src/clangplugin.cpp @ 1186]
1184: if (compileCommandStr.IsEmpty())
1185: compileCommandStr = wxT("$options $includes");
> 1186: CompilerCommandGenerator* gen = comp->GetCommandGenerator(proj);
1187: if (gen)
1188: gen->GenerateCommandLine(compileCommandStr, target, pf, filename,
0A757958 2D29D070 FFFFFFFC 0028C484 clanglib.dll!UpdateCompileCommand [ClangLib/src/clangplugin.cpp @ 1262]
1260: int ClangPlugin::UpdateCompileCommand(cbEditor* ed)
1261: {
> 1262: std::vector<wxString> compileCommand = GetCompileCommand( ed->GetProjectFile(), ed->GetFilename() );
1263:
1264: if (compileCommand.empty())
0A753B54 0028C518 0028C484 0028C3D4 clanglib.dll!OnEditorActivate [ClangLib/src/clangplugin.cpp @ 656]
654: if(m_TranslUnitId == wxNOT_FOUND)
655: m_TranslUnitId = GetTranslationUnitId(filename);
> 656: UpdateCompileCommand(ed);
657: if (m_TranslUnitId == wxNOT_FOUND)
658: {
0A7B008F 0028C518 0028C418 06332D18 clanglib.dll!Call [wxWidgets-2.8.12/include/wx/buffer.h @ 127]
125: #endif // wxABI_VERSION >= 20804
126:
> 127: DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
128: #if wxABI_VERSION >= 20804
129: DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
6188D58E 0028C518 FFFFFFFC 0028C454 codeblocks.dll!Manager::ProcessEvent
618A321B 0028C518 FFFFFFFF 00000000 codeblocks.dll!PluginManager::NotifyPlugins
61856F4D 0028D044 2D3508C8 0028C5D4 codeblocks.dll!EditorManager::OnPageChanged
02FA1261 06331094 61856DBA FFFFFFFC wxmsw28u_gcc_custom.dll!wxAppConsole::HandleEvent
0302436E 61C32430 06331094 0028D044 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEventIfMatches
0302443A 0028D044 06331094 030243E3 wxmsw28u_gcc_custom.dll!wxEventHashTable::HandleEvent
03024895 0028D044 06332D1C 030243E3 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
--- repeats 16 times ---
03024829 0028D044 0028C828 030243E3 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
0A751716 0028D044 06585ED0 0028C954 clanglib.dll!ProcessEvent [ClangLib/src/clangplugin.cpp @ 222]
220: bool ClangPlugin::ProcessEvent( wxEvent& event )
221: {
> 222: if (cbPlugin::ProcessEvent(event))
223: return true;
224: for (std::vector<ClangPluginComponent*>::iterator it = m_ActiveComponentList.begin(); it != m_ActiveComponentList.end(); ++it)
03024829 0028D044 0641E648 525A6C97 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
--- repeats 54 times ---
03024829 0028D044 00000000 FEEDBAB1 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
031338F2 0028D044 05DFD9A8 0323C913 wxmsw28u_gcc_custom.dll!wxWindowBase::TryParent
03024829 0028D044 000000B3 033B31D5 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
03247331 0000002B 0028D0C4 0028D0C8 wxmsw28u_gcc_custom.dll!wxAuiNotebook::SetSelection
03247B2A 0000001E 0028D168 033B9FCC wxmsw28u_gcc_custom.dll!wxAuiNotebook::RemovePage
03247BC3 0000001E 2D3508C8 0028D1E0 wxmsw28u_gcc_custom.dll!wxAuiNotebook::DeletePage
617C7E84 0000001E 00000003 2CC706A4 codeblocks.dll!cbAuiNotebook::DeletePage
618531BA 2D3508C8 00000001 0028D1C4 codeblocks.dll!EditorManager::Close
61853140 0028D22C 00000001 0028D224 codeblocks.dll!EditorManager::Close
617F27E4 00000001 00000000 00000000 codeblocks.dll!cbProject::CloseAllFiles
618C1F53 2AA20288 00000000 00000001 codeblocks.dll!ProjectManager::CloseProject
0049091E 0028DF84 0000000D 0000001A codeblocks.exe!ProjectManagerUI::OnCloseProject
02FA1261 05ECBAE8 004906FC 00000000 wxmsw28u_gcc_custom.dll!wxAppConsole::HandleEvent
0302436E 00590460 05ECBAE8 0028DF84 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEventIfMatches
0302443A 0028DF84 05ECBAE8 0028D4E4 wxmsw28u_gcc_custom.dll!wxEventHashTable::HandleEvent
03024895 0028DF84 05E18F48 0028D504 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
--- repeats 16 times ---
03024829 0028DF84 00000000 0028D724 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
0A751716 0028DF84 06585ED0 00000040 clanglib.dll!ProcessEvent [ClangLib/src/clangplugin.cpp @ 222]
220: bool ClangPlugin::ProcessEvent( wxEvent& event )
221: {
> 222: if (cbPlugin::ProcessEvent(event))
223: return true;
224: for (std::vector<ClangPluginComponent*>::iterator it = m_ActiveComponentList.begin(); it != m_ActiveComponentList.end(); ++it)
03024829 0028DF84 0641E648 0028D784 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
--- repeats 53 times ---
03024829 0028DF84 00000000 FEEDBAB1 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
031338F2 0028DF84 062EDBD8 FEEDBAB1 wxmsw28u_gcc_custom.dll!wxWindowBase::TryParent
03024829 0028DF84 04102D6C 2F7B7CB0 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
031338F2 0028DF84 00000366 00000084 wxmsw28u_gcc_custom.dll!wxWindowBase::TryParent
0310DA81 00000366 00000000 00000000 wxmsw28u_gcc_custom.dll!wxMenuBase::SendEvent
0309A32B 00000000 00000366 00000000 wxmsw28u_gcc_custom.dll!wxMenu::MSWCommand
0306DAB0 00000366 00000000 00000000 wxmsw28u_gcc_custom.dll!wxWindow::HandleCommand
0307134C 00000111 00000366 00000000 wxmsw28u_gcc_custom.dll!wxWindow::MSWWindowProc
030BF047 00000111 00000366 00000000 wxmsw28u_gcc_custom.dll!wxTreeCtrl::MSWWindowProc
0306ADAE 00040AA8 00000111 00000366 wxmsw28u_gcc_custom.dll!wxWndProc
770E62FA 0306AD60 00040AA8 00000111 USER32.dll!_InternalCallWinProc@20
770E6D3A 00000000 0306AD60 00040AA8 USER32.dll!_UserCallWinProcCheckWow@32
770E77C4 0306AD60 00000000 0028E588 USER32.dll!_DispatchMessageWorker@8
770E788A 0028E554 00000000 00000111 USER32.dll!_DispatchMessageW@4
0306FBB9 0028E664 0000007E 00000066 wxmsw28u_gcc_custom.dll!wxWindow::DoPopupMenu
004F7C06 0028E664 0028E8B8 0028E800 codeblocks.exe!wxWindowBase::PopupMenu
0048AC05 2E0A2378 0028E8B8 00770020 codeblocks.exe!ProjectManagerUI::ShowMenu
0048DB76 0028F468 00000000 00000000 codeblocks.exe!ProjectManagerUI::OnTreeItemRightClick
02FA1261 05ECBAE8 0048DAD2 00000000 wxmsw28u_gcc_custom.dll!wxAppConsole::HandleEvent
0302436E 00590178 05ECBAE8 0028F468 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEventIfMatches
0302443A 0028F468 05ECBAE8 00000000 wxmsw28u_gcc_custom.dll!wxEventHashTable::HandleEvent
03024895 0028F468 05E18F48 00000000 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
--- repeats 16 times ---
03024829 0028F468 00000000 00000000 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
0A751716 0028F468 06585ED0 2FD76F80 clanglib.dll!ProcessEvent [ClangLib/src/clangplugin.cpp @ 222]
220: bool ClangPlugin::ProcessEvent( wxEvent& event )
221: {
> 222: if (cbPlugin::ProcessEvent(event))
223: return true;
224: for (std::vector<ClangPluginComponent*>::iterator it = m_ActiveComponentList.begin(); it != m_ActiveComponentList.end(); ++it)
03024829 0028F468 0641E648 6DBFBC4E wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
---- repeats 54 times -----
03024829 0028F468 00000000 FEEDBAB1 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
031338F2 0028F468 062EDBD8 0028F3B8 wxmsw28u_gcc_custom.dll!wxWindowBase::TryParent
03024829 0028F468 770E965E 00000014 wxmsw28u_gcc_custom.dll!wxEvtHandler::ProcessEvent
031338F2 0028F468 00001111 00000000 wxmsw28u_gcc_custom.dll!wxWindowBase::TryParent
030BDF15 00000361 0028F968 0028F618 wxmsw28u_gcc_custom.dll!wxTreeCtrl::MSWOnNotify
0307240C 0000004E 00000361 0028F968 wxmsw28u_gcc_custom.dll!wxWindow::MSWWindowProc
0306ADAE 00090BAE 0000004E 00000361 wxmsw28u_gcc_custom.dll!wxWndProc
770E62FA 0306AD60 00090BAE 0000004E USER32.dll!_InternalCallWinProc@20
770E6D3A 00000000 0306AD60 00090BAE USER32.dll!_UserCallWinProcCheckWow@32
770E965E 04512E20 00000000 0306AD60 USER32.dll!_SendMessageWorker@24
770E96C5 00090BAE 0000004E 00000361 USER32.dll!_SendMessageW@16
030BFBE4 00000204 00000002 0066007E wxmsw28u_gcc_custom.dll!wxTreeCtrl::MSWWindowProc
0306ADAE 00040AA8 00000204 00000002 wxmsw28u_gcc_custom.dll!wxWndProc
770E62FA 0306AD60 00040AA8 00000204 USER32.dll!_InternalCallWinProc@20
770E6D3A 00000000 0306AD60 00040AA8 USER32.dll!_UserCallWinProcCheckWow@32
770E77C4 0306AD60 00000000 0028FBE8 USER32.dll!_DispatchMessageWorker@8
770E788A 0028FBC4 00000000 00000000 USER32.dll!_DispatchMessageW@4
0304FAEF 2A7D0B58 00000001 0028FD40 wxmsw28u_gcc_custom.dll!wxEventLoop::Dispatch
--- End code ---
seems to be a recursive loop? Hope this helps.
greetings keep up the good work!!!
MortenMacFly:
--- Quote from: BlueHazzard on February 27, 2017, 01:17:55 am ---> 55: if (FileTypeOf(f->relativeFilename) == ftHeader &&
--- End quote ---
I would also verify "f"not being NULL:
if (f && FileTypeOf(f->relativeFilename) == ftHeader &&
...especially on shut-down.
oBFusCATed:
And reversing the conditions speeds things quite a bit. :)
Checking f->compile is quite a lot faster than calling FileTypeOf and most of the times it is false.
This change will land in master/head soon.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version