Author Topic: Code::blocks against wxWidgets 2.9.4  (Read 16983 times)

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Code::blocks against wxWidgets 2.9.4
« on: December 06, 2012, 08:27:58 pm »
 I've successfully built this on my windows 7 box. When I run the C::B I am getting occasional asserts from the wxwidgets
and crashes when I try to use wxsmith . Is it too early yet?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Code::blocks against wxWidgets 2.9.4
« Reply #1 on: December 07, 2012, 01:46:32 pm »
I don't understand your question. What did you compile how? What is crashing? What versions are you using?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Code::blocks against wxWidgets 2.9.4
« Reply #2 on: December 08, 2012, 07:43:19 am »
As per title , C::B trunk with wxWidgets 2.9.4 with gcc4.7.2 on windows.I've just wanted to know whether it is stable
or not since I am getting assertions from wxWidgets when I switch editor tabs etc.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Code::blocks against wxWidgets 2.9.4
« Reply #3 on: December 08, 2012, 04:32:59 pm »
As per title , C::B trunk with wxWidgets 2.9.4 with gcc4.7.2 on windows.
Wjhat I wanted to know is if you self-compiled, or want to copile a wx app based on wx2.9
If its a self-compiled C::B: Its not yet prime-time for the development releases of wx29. Please use the recommended and stable version 2.8.12.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #4 on: May 24, 2013, 02:51:03 pm »
Sorry to awake this post, but is it always true that there are still incompatibilities between C::B (svn 9114 in my case) and wxwidgets 2.9 under Windows (2.9.4 in my case) ?
I ask this, because I see that there is some work on C::B 64 bits version under Windows, apparently based on wxwidgets 2.9.
It's why I'm interested by trying first to test the .cbp and .workspace svn C::B generating files, but in 32 bits for now.
So, as a first step I tried to use CodeBlocks_wx29.workspace and found different problems.

1) when compiling Exporter wx29, I obtained a warning :
Code: [Select]
WARNING: Target 'Exporter wx2.9.x - default': Unable to resolve 1 external dependency/ies:
        libwxPdfDocument.a
Strange, because this lib has been correctly generated in subfolder lib29 in the previous generating step. More, the plugin seems to work correctly when generating a pdf file from a source file !
2) except this point, C::B is correctly generated. But problems appear after launching it :
2.1) If I launch C::B directly (double click on the .exe for example), then choose a project in the displayed project list, C::B crashes because of a problem with FortranProject plugin. The displayed message is :
Code: [Select]
wxWidgets Debug Alert
../../src/msw/bitmap.cpp(846): assert "image.IsOK()" failed in
CreateFromImage(): invalid image
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.
But if I choose the button Yes, No or Cancel, the results is a crash with some references to fortran plugin in the .RPT file :
Code: [Select]
-------------------

Error occured on Friday, May 24, 2013 at 08:19:54.

C:\Program Files (x86)\CodeBlocks_wx29\codeblocks.exe caused a Breakpoint at location 77113219 in module C:\Windows\syswow64\KERNELBASE.dll.

Registers:
eax=00000001 ebx=00000000 ecx=76b698da edx=00000002 esi=6f2ca39c edi=00000088
eip=77113219 esp=0028e64c ebp=0028e968 iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202

Call stack:
77113219  C:\Windows\syswow64\KERNELBASE.dll:77113219  DebugBreak
00B09C66  C:\Program Files (x86)\CodeBlocks_wx29\codeblocks.dll:00B09C66  _Z12cbLoadBitmapRK8wxString12wxBitmapType
65E6D158  C:\Program Files (x86)\CodeBlocks_wx29\share\codeblocks\plugins\FortranProject.dll:65E6D158
65E80B5A  C:\Program Files (x86)\CodeBlocks_wx29\share\codeblocks\plugins\FortranProject.dll:65E80B5A
...

2.2) I disabled fortran plugin. Then I tried to load some project as previouly (C++ or fortran, no matter)
Here, it's OK, but when I generate the code I obtain the same type of error messages as previouly, for example:
Code: [Select]
wxWidgets Debug Alert
../../src/common/arrsts.cpp(385): assert "iIndex != (-1)" failed in
Do you want to stop the program?
Remove(): removing inexistent element in wxArrayString::Remove
You can also choose [Cancel] to suppress further warnings.
But here, I can choose the Cancel button without C::B crash. The code is correctly generated and works as expected.

A strange thing too, is the title of these windows "wxWidgets Debug Alert" because I generated WxWidgets as usually, a release version, not a debug one !

3) Results and messages are the same if I generate C::B with the environment variable cb_release_type = -g or -O

4) If FortranProject is activated but envar plugin disabled, I obtained no error messages and no C::B crashes !

So, do I miss something ! Does anybody succeeded in generating svn C::B with wxwidgets 2.9.4 with the provided CodeBlocks_wx29.workspace file?
Or is it still too early to generate C::B with wxwidgets 2.9.4 under Windows? (but the goal is not so far, I think)

gd_on

PS : Is it possible to mix a 64 bits generated C::B version and 32 bits plugins?
« Last Edit: May 24, 2013, 06:50:58 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Code::blocks against wxWidgets 2.9.4
« Reply #5 on: May 24, 2013, 03:09:55 pm »
1) Ignore the warning message about libwxPdfDocument.a, it is linked correctly, but the target dependencies in the exporter plugin are incorrect.
If I remember correctly, I corrected this on linux, but obviously not on windows (do not use it often).

2.1) I guess the Fortran -plugin is not (yet?) wx2.9 compatible.
It is not maintained by us (external plugin), so we can not do anything here, except not putting it in the wx2.9 workspaces.
2.2) The wxWidgets default-build is always (more or less) a debug-build in w2.9, you have to explicitely disable this, that's the cause for the tons of warnings.

3) See 2.2) the messages are from wxWidgets and you hvae to change this, but not C::B.

And in general, C::b is much better with wx2.9 then some months ago (a lot of work is done, not only for win64), but still not as stable as with wx2.8

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12127
    • Travis build status
Re: Code::blocks against wxWidgets 2.9.4
« Reply #6 on: May 24, 2013, 04:40:25 pm »
And in general, C::b is much better with wx2.9 then some months ago (a lot of work is done, not only for win64), but still not as stable as with wx2.8
Does watches work?
Last time I've tried C::B+wx2.9 (long time ago) they were totally broken.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Code::blocks against wxWidgets 2.9.4
« Reply #7 on: May 24, 2013, 06:43:12 pm »
And in general, C::b is much better with wx2.9 then some months ago (a lot of work is done, not only for win64), but still not as stable as with wx2.8
Does watches work?
Last time I've tried C::B+wx2.9 (long time ago) they were totally broken.


wx2.9.5 from actual trunk.

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #8 on: May 24, 2013, 06:45:12 pm »
Quote
I guess the Fortran -plugin is not (yet?) wx2.9 compatible.
I'm not sure, see my 4) point. May be an interaction with envar plugin ! In an other .RPT file there was also a problem in envar.dll

Quote
The wxWidgets default-build is always (more or less) a debug-build in w2.9, you have to explicitely disable this, that's the cause for the tons of warnings.
I use this command line to generate wxwidgets.
Code: [Select]
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"I have explicitly asked for a release build, so what should I must add?

And what about my question in P.S. ?
Thanks,

gd_on
« Last Edit: May 24, 2013, 06:51:51 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12127
    • Travis build status
Re: Code::blocks against wxWidgets 2.9.4
« Reply #9 on: May 24, 2013, 07:29:07 pm »
Jens: does shortcut keys work? up/down/insert/delete/typing for new watch?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #10 on: May 24, 2013, 07:30:29 pm »
After looking in the Wiki, I see that for WxWidgets 2.9.0 there are a few differences in the make line.  vs. WxWidgets 2.8.* :
USE_STC=0 USE_PROPGRID=1 have to be added
and the setup.h must be modified by setting explicitely #define wxUSE_STC 0

Is that always like that ?
Could this be the reason of my problems?  ???

gd_on

Edit :
I tried that, but it does not change anything  :'(
« Last Edit: May 24, 2013, 09:13:03 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Code::blocks against wxWidgets 2.9.4
« Reply #11 on: May 27, 2013, 06:25:34 am »
Jens: does shortcut keys work? up/down/insert/delete/typing for new watch?
No, not all of them.
I never use them, so I did not recognize it.

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Code::blocks against wxWidgets 2.9.4
« Reply #12 on: May 31, 2013, 05:54:13 pm »

2.2) I disabled fortran plugin. Then I tried to load some project as previouly (C++ or fortran, no matter)
Here, it's OK, but when I generate the code I obtain the same type of error messages as previouly, for example:
Code: [Select]
wxWidgets Debug Alert
../../src/common/arrsts.cpp(385): assert "iIndex != (-1)" failed in
Do you want to stop the program?
Remove(): removing inexistent element in wxArrayString::Remove
You can also choose [Cancel] to suppress further warnings.
But here, I can choose the Cancel button without C::B crash. The code is correctly generated and works as expected.

A strange thing too, is the title of these windows "wxWidgets Debug Alert" because I generated WxWidgets as usually, a release version, not a debug one !

I've added a patch for this and two other minor things in the tracker . You may check them out.I'll continue
 to try to fix them when I encounter other stuff like this.

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #13 on: June 01, 2013, 10:58:09 am »
Quote
I've added a patch for this and two other minor things in the tracker . You may check them out.I'll continue
 to try to fix them when I encounter other stuff like this.

I have seen 3 patches : 3471, 3472 and 3473 published yesterday. Which one is it ? All ?

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Code::blocks against wxWidgets 2.9.4
« Reply #14 on: June 01, 2013, 11:06:10 am »
Quote
I've added a patch for this and two other minor things in the tracker . You may check them out.I'll continue
 to try to fix them when I encounter other stuff like this.

I have seen 3 patches : 3471, 3472 and 3473 published yesterday. Which one is it ? All ?

gd_on

3471 is the one you are looking for.the other two fixes the the
assertions when opening, Settings->Environment, Setting->Compiler, Help->About

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #15 on: June 01, 2013, 12:17:40 pm »
OK. Tested finally with all 3 patches.
Looks better.
Always a problem with FortranProject plugin => C::B crash, OK if disabled.
Nevertheless, after a while (compiling, executing test programs), when I have closed C::B, I have obtained, one time, a similar wxwidget debug alert (no crash). I have not been able to reproduce the problem an other time  :(

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Code::blocks against wxWidgets 2.9.4
« Reply #16 on: June 01, 2013, 01:08:11 pm »
I have committed patch# 3471 and 3473. Patch# 3472 is under testing.


I'm also getting following assert. CC gurus may want to take a look at this.
Quote
ASSERT INFO:
./src/unix/threadpsx.cpp(960): assert "GetState() == STATE_NEW" failed in Run(): thread may only be started once after Create()

BACKTRACE:
[1] wxOnAssert(char const*, int, char const*, char const*, wchar_t const*)
[2] wxThread::Run()
[3] CodeCompletion::OnParserEnd(wxCommandEvent&)
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::DoTryChain(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] Parser::ProcessParserEvent(ParserCommon::ParserState, int, wxString const&)
[10] Parser::OnAllThreadsDone(CodeBlocksEvent&)
[11] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[12] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[13] wxEvtHandler::TryHereOnly(wxEvent&)
[14] wxEvtHandler::ProcessEventLocally(wxEvent&)
[15] wxEvtHandler::ProcessEvent(wxEvent&)
[16] wxEvtHandler::ProcessPendingEvents()
[17] wxAppConsoleBase::ProcessPendingEvents()
[18] wxApp::DoIdle()
[19] g_main_context_dispatch
[20] g_main_loop_run
[21] gtk_main
[22] wxGUIEventLoop::Run()
Be a part of the solution, not a part of the problem.

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Code::blocks against wxWidgets 2.9.4
« Reply #17 on: June 01, 2013, 01:39:58 pm »
I have committed patch# 3471 and 3473. Patch# 3472 is under testing.

Cheers. For 3472, the wxListBook in EnvironmentSettingsDlg is created with wxLC_REPORT style bit
set for its list view. wxWidgets runtime complains about setting another style (wxLC_SMALL_ICON or
wxLC_ICON in this case) without clearing that bit.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Code::blocks against wxWidgets 2.9.4
« Reply #18 on: June 01, 2013, 07:35:19 pm »
I'm also getting following assert. CC gurus may want to take a look at this.
Yes, I stumbled across that, too. but the thing is: Its actually weird, because we do check if the thread is already running, as shown in the the code snippet:
Code: [Select]
       if (   m_CCEnableHeaders
            && !m_SystemHeadersThreads.empty()
            && !m_SystemHeadersThreads.front()->IsRunning()
            && m_NativeParser.Done() )
        {
            m_SystemHeadersThreads.front()->Run();
        }
So either its a weird timing issue (maybe m_NativeParser.Done() takes long and therefore the thread already got started meanwhile) or I simply don't get it... there is no other thread we launch there.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline gd_on

  • Regular
  • ***
  • Posts: 494
Re: Code::blocks against wxWidgets 2.9.4
« Reply #19 on: June 06, 2013, 02:57:24 pm »
Quote
1) Ignore the warning message about libwxPdfDocument.a, it is linked correctly, but the target dependencies in the exporter plugin are incorrect.
If I remember correctly, I corrected this on linux, but obviously not on windows (do not use it often).
Here are two small patches to solve this warning when building C::B workspace under Windows.

for wx 2.8 :
Code: [Select]
Index: Exporter.cbp
===================================================================
--- Exporter.cbp (révision 9138)
+++ Exporter.cbp (copie de travail)
@@ -58,7 +58,7 @@
  <Target title="default">
  <Option output="..\..\..\devel\share\CodeBlocks\plugins\Exporter" prefix_auto="0" extension_auto="1" />
  <Option object_output="..\..\..\.objs\plugins\contrib\source_exporter" />
- <Option external_deps="libwxPdfDocument.a;" />
+ <Option external_deps="wxPdfDocument\lib\libwxPdfDocument.a;" />
  <Option type="3" />
  <Option compiler="gcc" />
  <Option parameters="--debug-log --multiple-instance -na -ns -nd" />

and the same one for wx 2.9 :
Code: [Select]
Index: Exporter_wx29.cbp
===================================================================
--- Exporter_wx29.cbp (révision 9138)
+++ Exporter_wx29.cbp (copie de travail)
@@ -58,7 +58,7 @@
  <Target title="default">
  <Option output="..\..\..\devel29\share\CodeBlocks\plugins\Exporter" prefix_auto="0" extension_auto="1" />
  <Option object_output="..\..\..\.objs29\plugins\contrib\source_exporter" />
- <Option external_deps="libwxPdfDocument.a;" />
+ <Option external_deps="wxPdfDocument\lib29\libwxPdfDocument.a;" />
  <Option type="3" />
  <Option compiler="gcc" />
  <Option parameters="--debug-log --multiple-instance -na -ns -nd" />

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).