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

Codesnippets cannot be linked with C::B under linux

<< < (4/7) > >>

Jenna:
"CheckForModifiedFiles" works now (again) .
Tested on Linux 64bit and on w2k (32bit).

The crash on uninstall occurs on Linux and on Windows.
On Linux it's a segfault in the destructor of the "wxBusyCursor" used in "void PluginsConfigurationDlg::OnUninstall(wxCommandEvent& event)".

It might be that uninstalling codesnippets-plugin does something harmfull to the stack.

I don't know if the crash happens in the same piece of code in Windows.
Perhaps I try it ou tomorrow.

Pecan:

--- Quote from: jens on July 15, 2008, 01:02:19 am ---I don't know if the crash happens in the same piece of code in Windows.
Perhaps I try it ou tomorrow.

--- End quote ---

Yes, the crash does happen on XP with gcc345 also. This seems to happen to me when I use a wxEVT_IDLE routine. Usually, I have to disable the plugin first, then restart CB, then the uninstall runs ok.

I've never found the root of the problem.

--- Code: ---Program received signal SIGSEGV, Segmentation fault.
0x101b17fb in wxAppBase::SendIdleEvents ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
(gdb) bt
#0  0x101b17fb in wxAppBase::SendIdleEvents ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#1  0x101b1828 in wxAppBase::SendIdleEvents ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#2  0x101b16fe in wxAppBase::ProcessIdle ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#3  0x101e253f in wxEventLoopManual::Run ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#4  0x1015b79b in wxDialog::ShowModal ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#5  0x618aaa51 in PluginManager::Configure (this=0x1bacb08)
    at c:/Usr/Proj/cbBeta/trunk/src/sdk/pluginmanager.cpp:1431
#6  0x00446fc5 in MainFrame::OnSettingsPlugins (this=0x14b9bb0,
    event=@0x22f8ec) at c:/Usr/Proj/cbBeta/trunk/src/src/main.cpp:4067
#7  0x100c70d5 in wxEvtHandler::ProcessEventIfMatches ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#8  0x100c742c in wxEventHashTable::HandleEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#9  0x100c83f9 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#10 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#11 0x100c8399 in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#12 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#13 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#14 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#15 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#16 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#17 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#18 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#19 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#20 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#21 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
#22 0x100c8399 in wxEvtHandler::ProcessEvent ()
   from c:\usr\bin\wxmsw28u_gcc_custom.dll
---Type <return> to continue, or q <return> to quit---

--- End code ---

MortenMacFly:

--- Quote from: Pecan on July 13, 2008, 10:43:51 pm ---
--- Quote from: MortenMacFly on July 13, 2008, 03:50:36 pm ---...The "codesnippets.exe" stand-alone executable does not work...

--- End quote ---
Thanks, fixed in svn 5126

--- End quote ---
I saw the changes and it's working now. ;-)

But... You quote all over the files that C::B is lying when it comes to GetConfigFolder(), but C::B is *not*. This method returns the current path of config files, which really is the one returned. What you are looking for is a special file, named [personality].conf under a special case, in the case of relocation (portable C::B). If you want to retrieve this file then the C::B documentation states what you have to do. You need to do something like:


--- Code: ---    PersonalityManager* PersMan = Manager::Get()->GetPersonalityManager();
    wxString personality = PersMan->GetPersonality();
    ConfigManager* CfgMan = Manager::Get()->GetConfigManager(_T("app"));
    wxString current_conf_file = CfgMan->LocateDataFile(personality+_T(".conf"), sdAllKnown);

--- End code ---

This way, current_conf_file is retrieved "the right way". Hence the config folder may be different. This is just a special case if ConfigManager::relo is true.

Pecan:

--- Quote from: MortenMacFly on July 15, 2008, 11:09:39 am ---
--- Quote from: Pecan on July 13, 2008, 10:43:51 pm ---
--- Quote from: MortenMacFly on July 13, 2008, 03:50:36 pm ---...The "codesnippets.exe" stand-alone executable does not work...

--- End quote ---
Thanks, fixed in svn 5126

--- End quote ---
I saw the changes and it's working now. ;-)

But... You quote all over the files that C::B is lying when it comes to GetConfigFolder(), but C::B is *not*. This method returns the current path of config files, which really is the one returned. What you are looking for is a special file, named [personality].conf under a special case, in the case of relocation (portable C::B). If you want to retrieve this file then the C::B documentation states what you have to do. You need to do something like:


--- Code: ---    PersonalityManager* PersMan = Manager::Get()->GetPersonalityManager();
    wxString personality = PersMan->GetPersonality();
    ConfigManager* CfgMan = Manager::Get()->GetConfigManager(_T("app"));
    wxString current_conf_file = CfgMan->LocateDataFile(personality+_T(".conf"), sdAllKnown);

--- End code ---

This way, current_conf_file is retrieved "the right way". Hence the config folder may be different. This is just a special case if ConfigManager::relo is true.


--- End quote ---

Ok, I give...

I've spent an hour searching Google, the forum, the web site, and the wiki for "::relo",  "documentation", "sdk documentation", "CodeBlocks documentation",etc.

The info mentioned must be under a different search term.

Could you point me to "the C::B documentation" that  "states what you have to do."

MortenMacFly:

--- Quote from: Pecan on July 15, 2008, 03:15:19 pm ---Could you point me to "the C::B documentation" that  "states what you have to do."

--- End quote ---
Sure thing: ;-)

Take a look at SDK documentation of the ConfigManager class, especially the description of ConfigManager::LocateDataFile(). The SDK docu which you can d/l from BerliOS should have this included, too (obviously).

Edit: Forgotten to add the link:
http://prdownload.berlios.de/codeblocks/codeblocks_sdk_doc_r5046.chm

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version