Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code completion using LSP and clangd

<< < (34/85) > >>

ollydbg:

--- Quote from: gd_on on September 12, 2022, 04:26:59 pm ---Probably because of recent changes in C::B sdk, clangd_client does not compile when using wxWidgets 3.2.1 (probably >= 3.1.6)
Error in client.cpp, line 3672 : CodeBlocksLogEvent waits for a wxBitmapBundle*, but logbmp is a wxBitmap*

--- End quote ---

I'm building C::B rev12886, and clangd_client rev76, I don't have build issue against wx 3.2.1.

Maybe the recent change from rev12887 to rev12890 causes the build issue.

Miguel Gimenez:
Starting with r12887, if you are compiling with wxWidgets >= 3.1.6 the last parameter of CodeBlocksLogEvent must be a pointer to wxBitmapBundle.

The change is straightforward, I will publish a patch in this thread tomorrow (I have detected an error in the original notebook HiDPI code that must be fixed beforehand).

Miguel Gimenez:
Bug fixed in r12891.

To fix the plugin replace (in client.cpp:3664) this

--- Code: ---        const int uiSize = Manager::Get()->GetImageSize(Manager::UIComponent::InfoPaneNotebooks);
        const int uiScaleFactor = Manager::Get()->GetUIScaleFactor(Manager::UIComponent::InfoPaneNotebooks);
        const wxString imgFile = ConfigManager::GetDataFolder()
                              + wxString::Format(_T("/resources.zip#zip:/images/%dx%d/filefind.png"),
                                                 uiSize, uiSize);
        wxBitmap* logbmp = new wxBitmap(cbLoadBitmapScaled(imgFile, wxBITMAP_TYPE_PNG, uiScaleFactor));

--- End code ---
with this

--- Code: ---        const int uiSize = Manager::Get()->GetImageSize(Manager::UIComponent::InfoPaneNotebooks);
        wxString prefix(ConfigManager::GetDataFolder()+"/resources.zip#zip:/images/");
#if wxCHECK_VERSION(3, 1, 6)
        const double uiScaleFactor = Manager::Get()->GetUIScaleFactor(Manager::UIComponent::InfoPaneNotebooks);
        wxBitmapBundle* logbmp = new wxBitmapBundle(cbLoadBitmapBundle(prefix, "filefind.png", wxRound(uiSize/uiScaleFactor), wxBITMAP_TYPE_PNG));
#else
        prefix << wxString::Format("%dx%d/", uiSize, uiSize);
        wxBitmap* logbmp = new wxBitmap(cbLoadBitmap(prefix+"filefind.png", wxBITMAP_TYPE_PNG));
#endif

--- End code ---

ollydbg:
Hi, Miguel Gimenez, Thanks for the fix.

Pecan:
@ MaxGaspa

Until I can find the cause of the crash, you can disable Settings/Editor/GeneralSetting/Documentation popup.

This should eliminate the stall/crash. If It does not, let me know.

Thanks

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version