Author Topic: wxWidgets 2.8.11 build tests [PATCH]  (Read 26409 times)

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
wxWidgets 2.8.11 build tests [PATCH]
« on: April 23, 2010, 12:00:24 pm »
UPDATE:

Thanks to cgarcia109 and Loaden, rendering issues related to wxWidgets 2.8.11 were fixed, and a reliable build using wxWidgets 2.8.11 is now possible.
A simple patch to main.cpp, just submitted to berlios.de, can be viewed here.

Hi to all,

Since the latest wxWidgets stable release, version 2.8.11, happened today (yay :D), I'm starting a thread where everybody can post any possible problems that may have occurred trying to build the Code::Blocks SVN head, or any plugins, with it.

EDIT: An excerpt from 'changes.txt', highlighting significant changes introduced in 2.8.11:
Quote
*** INCOMPATIBLE CHANGES: ***

   Due to an oversight, a bug fix in wxMSW resulted in an incompatible change in
   wxTreeCtrl behaviour: its EVT_TREE_ITEM_ACTIVATED handler now must skip the
   event being processed to allow the item to be toggled by double clicking on it.
   I.e. you need to ensure there is an "event.Skip()" in your item activation
   handler if you do wish to allow the item to be toggled.

All:

- Fixed crashes due to invalid input in PNG and TIFF image loaders (Tielei Wang).
- Fix compilation of wxWidgets headers with recent Sun CC (Brian Cameron).
  NB: If your code uses _T() macro you must either replace it with wxT() to
      use Sun CC or define wxNEEDS__T before including wx headers and avoid
      including many standard headers (again, only with this compiler).
- Added several functions forward compatible with wxWidgets 3.0 (troelsk):
  wxDC::SetDeviceClippingRegion(), wxShowEvent::IsShown(),
  wxIconizeEvent::IsIconized(), wxFileName::StripExtension(),
  wxXmlNode::GetAttribute(), wxXmlNode::AddAttribute().
- wxDateTime timezone functions now dynamic (no caching).

All (GUI):

- Add wxBU_EXACTFIT support to wxToggleButton XRC handler (Ronny Krueger).
- wxRTC: fixed AltGr+key input and numeric keypad Delete on Windows.
- wxRTC: added background colour setting to font dialog.
- wxRTC: added wxRICHTEXT_HANDLER_USE_CSS flag for HTML handler to use CSS
  where possible.
- wxRTC: corrected centring and right-justification spacing.
- wxRTC: corrected some problems with SelectAll. Caret is now set to end.
- Paper size conversion from dimensions to id now uses definition ordering
  in order to use common types where there are duplications, fixing problems
  where invalid sizes caused incorrect second invocation of page setup
  dialog.
- Corrected writing direction for Farsi.
- Added wxBORDER_THEME to XRC.
- Speeded up wxTreeCtrl by caching text size (botg).
- Fix building with using system libpng 1.4 (Volker Grabsch).
- Fixed generic wxDatePickerCtrl keyboard navigation.
- Added EVT_WIZARD_PAGE_SHOWN event for wxWizard.

wxMSW:

- Fixed crash when copying Unicode URLs to the clipboard (Tim Kosse).
- Fixed generation of wxEVT_CHAR_HOOK events.
- Implement wxFileName::SetTimes() for directories (Steve Lamerton).
- Correct wxTopLevelWindow::SetShape() for windows with menu bar (Peter Friis).
- Backported speed-up of Vaclav Slavik's high quality print preview speed-up.
  You now need to set wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW in
  src/common/prntbase.cpp and wxUSE_ENH_METAFILE_FROM_DC in
  include/wx/msw/enhmeta.h.
- Worked around child window and caret positioning bug (in Windows) when using
  wxBORDER_THEME in a container window.
- Suppressed spurious character event for decimal key in numeric keypad.
- Prevented wxCheckListBox from corrupting menu items.

wxGTK:

- Don't access a possibly destroyed timer object from GTK callback (Tim Kosse).

wxMac:

- Fixed a problem with wxListCtrl whereby event processing would change
  the event object identifier, and thereby affect subsequent processing,
  and defeat custom event propagation of commands from current focus window.
- Fixed a problem with wxFontDialog on Mac OS 10.6.

UPDATE

Just gave it a try. I'm using MinGW-TDM 4.4.1-2 under Windows Vista.

Both Code::Blocks and the supplied contrib plugins compiled without a problem, and work exactly the same as before. Of course, that means that the infamous mixed menu rendering problem under Win7/Vista was not fixed for 2.8.11 :(.
On the other hand, the program itself works reliably, being little distinction between this version and the previous in terms of stability. Didn't get any surprise crashes.
I also tested the following plugins, all of which compiled without an issue: DoxyBlocks, FileManager, PowerShell and XPMEditor.

Unfortunately, I did come accross something in the XPMEditor, as it no longer draws on screen after opening an xpm image through the toolbar or the File menu. Using the "Start here" shortcuts, though, seems to work fine. While I don't remember noticing this with the 2.8.10 build, I have no idea if this is a wxWidgets issue or not.
Screenshot attached:

[attachment deleted by admin]
« Last Edit: May 26, 2010, 09:50:59 am by ptDev »

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: wxWidgets 2.8.11 build tests
« Reply #1 on: April 23, 2010, 10:08:59 pm »
Quote
Unfortunately, I did come accross something in the XPMEditor, as it no longer draws on screen after opening an xpm image through the toolbar or the File menu. Using the "Start here" shortcuts, though, seems to work fine. While I don't remember noticing this with the 2.8.10 build, I have no idea if this is a wxWidgets issue or not.

Thank you for the bug report. The editor is still in development - and I have still many bugs to solve.
This one, it is the first time I see it - if you could tell me the exact steps you used for triggering the bug, I could certainly solve the problem

These last days I could not update it too much, since I have a heavy workload at work ...
 

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6076
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxWidgets 2.8.11 build tests
« Reply #2 on: April 26, 2010, 03:06:41 pm »
Hi, Thanks for your report. So, it is reliable to do a upgrade to wx 2.8.11 now( under MinGW ).  :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: wxWidgets 2.8.11 build tests
« Reply #3 on: April 27, 2010, 06:46:12 pm »
Quote
Unfortunately, I did come accross something in the XPMEditor, as it no longer draws on screen after opening an xpm image through the toolbar or the File menu. Using the "Start here" shortcuts, though, seems to work fine. While I don't remember noticing this with the 2.8.10 build, I have no idea if this is a wxWidgets issue or not.

Thank you for the bug report. The editor is still in development - and I have still many bugs to solve.
This one, it is the first time I see it - if you could tell me the exact steps you used for triggering the bug, I could certainly solve the problem

These last days I could not update it too much, since I have a heavy workload at work ...
 

All I know is that once I built C::B with wx2.8.11, this problem happened. I think it is an unforseen incompatibility with that wx version.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: wxWidgets 2.8.11 build tests
« Reply #4 on: April 28, 2010, 02:56:10 am »
I found a bug.

1. create a new project, and opened some source files.
2. close project.
3. reopen it use "File - Open"

I trying to fix it, bug I found, that's wxWidgets's bug.
If i switch to wxWidgets 2.8.10, all question is gone.

[attachment deleted by admin]

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: wxWidgets 2.8.11 build tests
« Reply #5 on: April 28, 2010, 08:16:34 am »
I found a bug.

1. create a new project, and opened some source files.
2. close project.
3. reopen it use "File - Open"

I trying to fix it, bug I found, that's wxWidgets's bug.
If i switch to wxWidgets 2.8.10, all question is gone.

Did this bug happen to you in Linux? I tried to reproduce it under Vista, but what happened to me was slightly different.
wxAui refused to update the wxAuiNotebook, and shrinked it to a little square in the upper left corner (shown in attachment). It does refresh properly and show all the source files if I open another file right after this, though.

I think this confirms it, it's a wxWidgets 2.8.11 problem.

These problems probably come from "small" API changes, and need patches.

[attachment deleted by admin]
« Last Edit: April 28, 2010, 07:35:03 pm by ptDev »

Offline cgarcia109

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: wxWidgets 2.8.11 build tests [PROBLEMS FOUND]
« Reply #6 on: May 12, 2010, 06:40:15 pm »
It is something about calling Freeze()/Thaw() ina top level window

in src/src/main.cpp

in MainFrame::OnDropFiles

try replacing Freeze() and Thaw() with

        Manager::Get()->GetEditorManager()->GetNotebook()->Freeze();
        Manager::Get()->GetEditorManager()->GetNotebook()->Thaw();

edit: no sorry, that doesnt works. Removing Freeze/Thaw does it, but of course you dont have Freeze and Thaw
« Last Edit: May 12, 2010, 07:08:14 pm by cgarcia109 »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: wxWidgets 2.8.11 build tests [PROBLEMS FOUND]
« Reply #7 on: May 23, 2010, 02:39:13 pm »
It is something about calling Freeze()/Thaw() ina top level window

in src/src/main.cpp

in MainFrame::OnDropFiles

try replacing Freeze() and Thaw() with

        Manager::Get()->GetEditorManager()->GetNotebook()->Freeze();
        Manager::Get()->GetEditorManager()->GetNotebook()->Thaw();

edit: no sorry, that doesnt works. Removing Freeze/Thaw does it, but of course you dont have Freeze and Thaw
I test it, if removing Freeze/Thaw, it's works well.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: wxWidgets 2.8.11 build tests [PROBLEMS FOUND]
« Reply #8 on: May 26, 2010, 08:56:20 am »
If you removed Freeze() and Thaw(), wouldn't it make sense to also remove the dummy wxPaintEvent creation?
This would only affect the files main.cpp and editormanager.cpp, if I'm not mistaken?

EDIT:

We only need to change main.cpp.
Just tested: removed the dummy wxPaintEvent and all calls to Freeze() and Thaw() from OnDropFiles(...) and from the menu and toolbar initialization code, and everything seems to work fine now.

A patch is attached. The same patch was submitted to berlios.de.

[attachment deleted by admin]
« Last Edit: May 26, 2010, 09:46:42 am by ptDev »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxWidgets 2.8.11 build tests [PROBLEMS FOUND]
« Reply #9 on: May 26, 2010, 03:10:32 pm »
If you removed Freeze() and Thaw(), wouldn't it make sense to also remove the dummy wxPaintEvent creation?
This would only affect the files main.cpp and editormanager.cpp, if I'm not mistaken?

EDIT:

We only need to change main.cpp.
Just tested: removed the dummy wxPaintEvent and all calls to Freeze() and Thaw() from OnDropFiles(...) and from the menu and toolbar initialization code, and everything seems to work fine now.

A patch is attached. The same patch was submitted to berlios.de.

I have no problems on linux, with the packages from wxwidgets.org.
I just try it on windows (vista).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxWidgets 2.8.11 build tests [PATCH]
« Reply #10 on: May 26, 2010, 03:41:55 pm »
No such issues on vista with wxwidgets 2.8.11.

Did you clean the project and/or removed at least the devel and output folders and the precompiled-headers (src/include/*.gch) ?


Sorry, my fault, I reopened the project from recent-projects-list, which seems to work fine.
I get the same issue as ptDev on Vista.

If it's a wxAui-issue it should be reported upstream, if it is an issue with the slightly changed api of wxWidgets 2.8.11 it should be fixed in our sources.
I will look into it.
« Last Edit: May 26, 2010, 04:17:19 pm by jens »

Offline keenblade

  • Multiple posting newcomer
  • *
  • Posts: 36
  • tao
    • keenblade
Re: wxWidgets 2.8.11 build tests [PATCH]
« Reply #11 on: June 12, 2010, 10:01:33 am »
Hi, C::B trunk doesn't compile if pch is not enabled. Fails here with this output:
Code
replacedlg.cpp: In constructor 'ReplaceDlg::ReplaceDlg(wxWindow*, const wxString&, bool, bool, bool)':
replacedlg.cpp:140: error: invalid use of incomplete type 'struct wxSizer'
/usr/include/wx-2.8/wx/window.h:64: error: forward declaration of 'struct wxSizer'
make[3]: *** [replacedlg.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/sdk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src'
make: *** [all-recursive] Error 1
I think killerbot did fix the same or similar bug before in rev 6216. Anyway it came back with wxWidgets 2.8.11.
C::B svn rev:6345   Gcc-4.4.4   wxGTK-2.8.11.0  ~amd64 gentoo.
« Last Edit: June 12, 2010, 10:53:04 am by keenblade »
Anyway it\'s all the same at the end...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5526
Re: wxWidgets 2.8.11 build tests [PATCH]
« Reply #12 on: June 12, 2010, 12:48:06 pm »
Hi, C::B trunk doesn't compile if pch is not enabled. Fails here with this output:
Code
replacedlg.cpp: In constructor 'ReplaceDlg::ReplaceDlg(wxWindow*, const wxString&, bool, bool, bool)':
replacedlg.cpp:140: error: invalid use of incomplete type 'struct wxSizer'
/usr/include/wx-2.8/wx/window.h:64: error: forward declaration of 'struct wxSizer'
make[3]: *** [replacedlg.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/sdk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src'
make: *** [all-recursive] Error 1
I think killerbot did fix the same or similar bug before in rev 6216. Anyway it came back with wxWidgets 2.8.11.
C::B svn rev:6345   Gcc-4.4.4   wxGTK-2.8.11.0  ~amd64 gentoo.

should be fixed now.

Offline keenblade

  • Multiple posting newcomer
  • *
  • Posts: 36
  • tao
    • keenblade
Re: wxWidgets 2.8.11 build tests [PATCH]
« Reply #13 on: June 13, 2010, 07:52:06 am »
killerbot, thanks. Now a different error to solve with rev 6352:
Code
environmentsettingsdlg.cpp: In member function 'virtual void EnvironmentSettingsDlg::EndModal(int)':
environmentsettingsdlg.cpp:437: error: invalid use of incomplete type 'struct EditorManager'
../../src/include/manager.h:27: error: forward declaration of 'struct EditorManager'
environmentsettingsdlg.cpp:439: error: invalid use of incomplete type 'struct EditorManager'
../../src/include/manager.h:27: error: forward declaration of 'struct EditorManager'
make[3]: *** [environmentsettingsdlg.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src'
make: *** [all-recursive] Error 1
 * ERROR: dev-util/codeblocks-9999 failed
Anyway it\'s all the same at the end...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5526
Re: wxWidgets 2.8.11 build tests [PATCH]
« Reply #14 on: June 13, 2010, 09:14:49 am »
killerbot, thanks. Now a different error to solve with rev 6352:
Code
environmentsettingsdlg.cpp: In member function 'virtual void EnvironmentSettingsDlg::EndModal(int)':
environmentsettingsdlg.cpp:437: error: invalid use of incomplete type 'struct EditorManager'
../../src/include/manager.h:27: error: forward declaration of 'struct EditorManager'
environmentsettingsdlg.cpp:439: error: invalid use of incomplete type 'struct EditorManager'
../../src/include/manager.h:27: error: forward declaration of 'struct EditorManager'
make[3]: *** [environmentsettingsdlg.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999/work/codeblocks-9999/src'
make: *** [all-recursive] Error 1
 * ERROR: dev-util/codeblocks-9999 failed
fixed .. bring on the next one ;-)