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

ThreadSearch 0.9 release (Windows only !!)

<< < (3/5) > >>

dje:
Hi all !

I have a linking problem...
Linking dynamic library: ..\..\..\devel\share\CodeBlocks\plugins\ThreadSearch.dll
..\..\..\.objs\plugins\contrib\ThreadSearch\ThreadSearchView.o: In function `ZN14BlockAllocatorI19CodeBlocksDockEventLj75ELb0EED1Ev':
C:/DevSofts/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:(.rdata$_ZTV16ThreadSearchView[vtable for ThreadSearchView]+0x14): undefined reference to `ThreadSearchView::Append(wxString const&, Logger::level)'

In ThreadSearchView.h, I have

--- Code: ---class ThreadSearchView: public Logger, public wxPanel {
public:
...
virtual void Append(const wxString& msg, Logger::level lv = info);
...
}

--- End code ---

In ThreadSearchView.cpp, I have

--- Code: ---void Append(const wxString& msg, Logger::level lv)
{
// In OnTmrListCtrlUpdate, the events sent by the worker thread replace
// this method. The ThreadSearchLoggerBase::OnThreadSearchEvent method
// is called.
}

--- End code ---

I cleaned my project and rebuilt it but the problem remains.

SVN4640
GCC 3.4.5
Win XP SP2

The problem must be so obvious that I can't find it  :oops:
Thanks for any help !

Dje

MortenMacFly:

--- Quote from: dje on November 18, 2007, 10:21:44 am ---In ThreadSearchView.cpp, I have

--- Code: ---void Append(const wxString& msg, Logger::level lv)
{
// In OnTmrListCtrlUpdate, the events sent by the worker thread replace
// this method. The ThreadSearchLoggerBase::OnThreadSearchEvent method
// is called.
}

--- End code ---

--- End quote ---
How about changing this to:

--- Code: ---void ThreadSearchView::Append(const wxString& msg, Logger::level lv)
{
// In OnTmrListCtrlUpdate, the events sent by the worker thread replace
// this method. The ThreadSearchLoggerBase::OnThreadSearchEvent method
// is called.
}

--- End code ---
??? ;-)
With regards, Morten.

dje:
I knew it was simple but couldn't find the trick, even giving the solution in te post !
Thanks Morten !

dje:
Hi all !

This code worked before with wxWidgets 2.8.4 but not any more with 2.8.6.
The crash happens during the preview editor (cbStyledTextCtrl) creation.
I don't understand why, all parameters are OK:


--- Code: ---#0 00000000 wxScintilla::Create(this=0x551ecb0, parent=0x55342f8, id=100, pos=@0x62de6858, size=@0x22f3a8, style=0, name=@0x22f1c0) (C:/Dev/codeblocks/trunk/src/sdk/wxscintilla/src/wxscintilla.cpp:163)
#1 6C9FF93D wxScintilla::wxScintilla(this=0x551ecb0, parent=0x55342f8, id=100, pos=@0x62de6858, size=@0x22f3a8, style=0, name=@0x22f1c0) (C:/Dev/codeblocks/trunk/src/sdk/wxscintilla/src/wxscintilla.cpp:147)
#2 00A97CDC cbStyledTextCtrl::cbStyledTextCtrl(this=0x551ecb0, pParent=0x55342f8, id=100, pos=@0x62de6858, size=@0x22f3a8, style=0) (C:/Dev/codeblocks/trunk/src/sdk/cbeditor.cpp:83)
#3 05E8DAAB ThreadSearchView::ThreadSearchView(this=0x5533708, threadSearchPlugin=@0x53d9010) (C:/Dev/codeblocks/trunk/src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp:60)
#4 05E77417 ThreadSearch::OnAttach(this=0x53d9010) (C:/Dev/codeblocks/trunk/src/plugins/contrib/ThreadSearch/ThreadSearch.cpp:170)
#5 00AAE1CF cbPlugin::Attach(this=0x53d9010) (C:/Dev/codeblocks/trunk/src/sdk/cbplugin.cpp:66)
#6 00B674AD PluginManager::AttachPlugin(this=0x2f9b130, plugin=0x53d9010, ignoreSafeMode=false) (C:/Dev/codeblocks/trunk/src/sdk/pluginmanager.cpp:209)
#7 00B6FF87 PluginManager::LoadAllPlugins(this=0x2f9b130) (C:/Dev/codeblocks/trunk/src/sdk/pluginmanager.cpp:1115)
#8 0042E83E MainFrame::ScanForPlugins(this=0x25fda18) (C:/Dev/codeblocks/trunk/src/src/main.cpp:1025)
#9 00428810 MainFrame::MainFrame(this=0x25fda18, parent=0x0) (C:/Dev/codeblocks/trunk/src/src/main.cpp:537)
#10 00402213 CodeBlocksApp::InitFrame(this=0x2559838) (C:/Dev/codeblocks/trunk/src/src/app.cpp:349)
#11 00403A23 CodeBlocksApp::OnInit(this=0x2559838) (C:/Dev/codeblocks/trunk/src/src/app.cpp:510)
#12 00461BA4 wxAppConsole::CallOnInit(this=0x2559838) (C:/DevSofts/wxWidgets-2.8.6/include/wx/app.h:76)
#13 6274E4C9 wxEntryReal() (C:\DevSofts\wxWidgets-2.8.6\lib\gcc_dll\wxmsw28u_gcc_custom.dll:??)
#14 627D1D1C wxEntry() (C:\DevSofts\wxWidgets-2.8.6\lib\gcc_dll\wxmsw28u_gcc_custom.dll:??)
#15 0040179E WinMain(hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x251f11 "", nCmdShow=10) (C:/Dev/codeblocks/trunk/src/src/app.cpp:287)
#16 0045E0EA main() (C:/Dev/codeblocks/trunk/src/include/logger.h:21)

--- End code ---

crash happens in

--- Quote ---bool wxScintilla::Create (wxWindow *parent,
                          wxWindowID id,
                          const wxPoint& pos,
                          const wxSize& size,
                          long style,
                          const wxString& name) {
#ifdef __WXMAC__
    style |= wxVSCROLL | wxHSCROLL;
#endif
    if (!wxControl::Create (parent, id, pos, size,
                            style | wxWANTS_CHARS | wxCLIP_CHILDREN,
                            wxDefaultValidator, name)) {
        return false;
    }
    ...
}

--- End quote ---

where wxControl::Create returns false.
As a result, m_swx is not allocated in contructor and the fisrt call results in a memory violation.
Does anyone have an idea concerning this crash (wxWidgets code reading didn't gave me the answer) ?
I have to build wxWidgets dll in debug and rebuild all C::B apps/plugin.

Dje

MortenMacFly:

--- Quote from: dje on November 20, 2007, 09:43:20 pm ---Does anyone have an idea concerning this crash (wxWidgets code reading didn't gave me the answer) ?

--- End quote ---
I could offer to give a try. I am using a newer wxScintilla release within C::B. Maybe it has already been fixed?! You might want to send me the sources to give it a try...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version