News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Codesnippets cannot be linked with C::B under linux

Started by Jenna, July 12, 2008, 08:43:09 PM

Previous topic - Next topic

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

#16
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.

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.

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---

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...
Thanks, fixed in svn 5126
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:


    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);


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.
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]

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...
Thanks, fixed in svn 5126
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:


    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);


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.


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

#19
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."
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
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]

PsYhLo

#20

g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1   -I../../../../../src/include -I../../../../../src/include/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/wxFlatNotebook/include  -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT editproperties.o -MD -MP -MF .deps/editproperties.Tpo -c -o editproperties.o `test -f '../editor/editproperties.cpp' || echo './'`../editor/editproperties.cpp
mv -f .deps/editproperties.Tpo .deps/editproperties.Po
make[1]: *** No rule to make target `../prefs.cpp', needed by `prefs.o'.  Stop.
make[1]: Leaving directory `/home/psyhlo/devel/cb-src/src/plugins/contrib/codesnippets/resources'
make: *** [all-recursive] Error 1


latest svn 5129

linux Ubuntu 8.04 gcc ver 4.2.3
[url="http://img529.imageshack.us/img529/822/3664286vy.png"]http://img529.imageshack.us/img529/822/3664286vy.png[/url]

Pecan

Quote from: PsYhLo on July 16, 2008, 02:19:14 PM

g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1   -I../../../../../src/include -I../../../../../src/include/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/wxFlatNotebook/include  -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT editproperties.o -MD -MP -MF .deps/editproperties.Tpo -c -o editproperties.o `test -f '../editor/editproperties.cpp' || echo './'`../editor/editproperties.cpp
mv -f .deps/editproperties.Tpo .deps/editproperties.Po
make[1]: *** No rule to make target `../prefs.cpp', needed by `prefs.o'.  Stop.
make[1]: Leaving directory `/home/psyhlo/devel/cb-src/src/plugins/contrib/codesnippets/resources'
make: *** [all-recursive] Error 1


latest svn 5129

linux Ubuntu 8.04 gcc ver 4.2.3

pref.h is now in the ..\editor directory. Make sure you do a clean.

killerbot

haha, i have the same issue, make clean, even a new ./configure does NOT help

Seems like the only option might be do a fresh svn checkout and delete the existing stuff. Enjoy :-(

Pecan

#23
Quote from: killerbot on July 16, 2008, 05:10:22 PM
haha, i have the same issue, make clean, even a new ./configure does NOT help

Seems like the only option might be do a fresh svn checkout and delete the existing stuff. Enjoy :-(

Would you clarify that for me?

When I did an svn update on Ubuntu 8.02 it automatically deleted the old editor files for me. Why didn't it do that for you?

I then did a make clean to get rid of old .o files, then ./bootstrap, ./configure ..., make. It worked.

What's different here?
What can I do to make the process smoother?

Jenna

Quote from: killerbot on July 16, 2008, 05:10:22 PM
... , even a new ./configure does NOT help

Did you also run "./bootstrap" ?

I'm not sure, but I guess the directory/file-structure might go into "Makefile.in" and therefore into "Makefile" when doing "./configure".
And if that's right you need to run "./bootstrap" to generate a new "Makefile.in" first.

I cannot test in the moment, because I only have my USB-Stick with very rudimentary build-tools at wok today.

killerbot

I have just tried, the chain starting from ./boostrap  --> no luck
how joly nice, time for a fresh svn checkout

PsYhLo

after the fresh svn it compiles without any problem
[url="http://img529.imageshack.us/img529/822/3664286vy.png"]http://img529.imageshack.us/img529/822/3664286vy.png[/url]

killerbot


keenblade

Quote from: killerbot on July 16, 2008, 06:47:19 PM
I have just tried, the chain starting from ./boostrap  --> no luck
how joly nice, time for a fresh svn checkout
svn rev:5133 and C::B still doesn't compile. Isn't it possible without a fresh svn checkout?
This seems a little odd to me why the fresh svn checkout needed for some of us.
Is it a svn bug? I think a git repo would be cool.
Anyway it\'s all the same at the end...

killerbot

note that another build issue got introduced which is solved in rev v5135