Author Topic: wxSmith does not build for MacOSX at rev 3614  (Read 10658 times)

bnilsson

  • Guest
wxSmith does not build for MacOSX at rev 3614
« on: February 18, 2007, 04:17:01 pm »
wxSmith does not build for MacOSX at rev 3614:
Quote
Making all in wxSmith
Making all in properties
make[5]: Nothing to be done for `all'.
Making all in wxwidgets
Making all in defitems
make[6]: Nothing to be done for `all'.
Making all in icons
make[6]: Nothing to be done for `all'.
Making all in properties
make[6]: Nothing to be done for `all'.
make[6]: Nothing to be done for `all-am'.
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/opt/local/lib/wx/include/mac-unicode-release-2.6 -I/opt/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA   -I../../../../src/include -I../../../../src/include/wxFlatNotebook/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/propgrid/include    -O2 -ffast-math -I/opt/local/include -g -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT wxsresourcetree.lo -MD -MP -MF ".deps/wxsresourcetree.Tpo" -c -o wxsresourcetree.lo `test -f './wxsresourcetree.cpp' || echo './'`./wxsresourcetree.cpp; \
then mv -f ".deps/wxsresourcetree.Tpo" ".deps/wxsresourcetree.Plo"; else rm -f ".deps/wxsresourcetree.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/opt/local/lib/wx/include/mac-unicode-release-2.6 -I/opt/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I../../../../src/include -I../../../../src/include/wxFlatNotebook/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/propgrid/include -O2 -ffast-math -I/opt/local/include -g -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT wxsresourcetree.lo -MD -MP -MF .deps/wxsresourcetree.Tpo -c ./wxsresourcetree.cpp  -fno-common -DPIC -o .libs/wxsresourcetree.o
./wxsresourcetree.cpp: In static member function 'static wxImageList& wxsResourceTree::GetGlobalImageList()':
./wxsresourcetree.cpp:116: error: invalid use of undefined type 'struct wxImage'
/opt/local/include/wx-2.6/wx/bitmap.h:31: error: forward declaration of 'struct wxImage'
make[5]: *** [wxsresourcetree.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

'make clean' did not help.

Any suggestions?
« Last Edit: February 19, 2007, 07:21:25 pm by bnilsson »

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: wxSmith does not build fotr MacOSX at rev 3614
« Reply #1 on: February 18, 2007, 08:58:46 pm »
Quote
./wxsresourcetree.cpp:116: error: invalid use of undefined type 'struct wxImage'
/opt/local/include/wx-2.6/wx/bitmap.h:31: error: forward declaration of 'struct wxImage'

Add #include "wx/image.h"

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #2 on: February 18, 2007, 09:39:12 pm »
Ok, now it works, thanks.
Odd that we need tweaking the wxWidgets itself to build CB?
I haven't watched the development lately, is this publicly known, and when did it happen?
« Last Edit: February 19, 2007, 07:22:16 pm by bnilsson »

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: wxSmith does not build fotr MacOSX at rev 3614
« Reply #3 on: February 18, 2007, 09:42:39 pm »
Odd that we need tweaking the wxWidgets itself to build CB?

That file is not part of wxWidgets, it is a wxSmith file - no need to tweak wx, it's just amissing include in smith

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #4 on: February 18, 2007, 10:14:27 pm »
Sorry, I misunderstood.
I thought you told me to put in a "#include "wx/image.h"" into "/opt/local/include/wx-2.6/wx/bitmap.h".
Although I thought it was strange, I did that and it worked.

Now I reverted "wx/bitmap.h" to original and put it in wxsresourcetree.cpp and it seems to do the same job.

I expect it will it be there in the next rev?
« Last Edit: February 19, 2007, 07:21:59 pm by bnilsson »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not build fotr MacOSX at rev 3614
« Reply #5 on: February 19, 2007, 01:19:40 am »
Quote
./wxsresourcetree.cpp:116: error: invalid use of undefined type 'struct wxImage'
/opt/local/include/wx-2.6/wx/bitmap.h:31: error: forward declaration of 'struct wxImage'

Add #include "wx/image.h"

Strange, I've compiled after my last commit on linux using --disable-pch to find missing includes and it compiled fine :?: So there are probably some small differences between wx implementations on different platforms.

BTW How dows wxSmith work on Mac? Last time it made some enormous memory allocations and since I don't have any access to Mac I'm wondering whether new version works better :)

Regards
   BYO

EDIT: Committed in rev 3615
« Last Edit: February 19, 2007, 01:31:46 am by byo »

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #6 on: February 19, 2007, 02:46:52 pm »
The last rev (3615) built without problems, thanks.

About MacOSX behaviour:
There seems to be no memory guzzling in this version.
However, there is a graphics problem.
If I create a frame and a button, I see nothing in the graphics area.
However, if I open the Properties and change some settings, the layout appears.
But if I click in the graphics area (e.g. to select) or change focus between the windows on the desktop, it becomes white an all contents disappears. Window refresh seems to remove the content or paint it over.

Some "minor" things:
Scrollbars and splitters needs some work.
How do I remove an object? Right-click does not show any context menu of operations as I would expect. Selecting a button and then do Edit/Cut does not make it go away, but it crashes CB.

This is about as far as I have gone for now.

« Last Edit: February 19, 2007, 07:21:39 pm by bnilsson »

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #7 on: February 19, 2007, 08:27:38 pm »
Here is a crash report from when trying to remove an object:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x000000bf

Thread 0 Crashed:
0   libwxsmith.so                     0x1637d1b4 wxsItem::ClearSelection() + 20 (wxsitem.cpp:241)
1   libwxsmith.so                     0x1638fca8 wxsItemResData::SelectItem(wxsItem*, bool) + 56 (wxsitemresdata.h:218)
2   libwxsmith.so                     0x16312d88 wxsResourceTree::OnSelect(wxTreeEvent&) + 56 (wxsresourcetree.cpp:103)
3   libwx_macu-2.6.0.dylib            0x080244c8 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 200
4   libwx_macu-2.6.0.dylib            0x08024788 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 168

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #8 on: February 20, 2007, 12:02:10 am »
Here is a crash report from when trying to remove an object:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x000000bf

Thread 0 Crashed:
0   libwxsmith.so                     0x1637d1b4 wxsItem::ClearSelection() + 20 (wxsitem.cpp:241)
1   libwxsmith.so                     0x1638fca8 wxsItemResData::SelectItem(wxsItem*, bool) + 56 (wxsitemresdata.h:218)
2   libwxsmith.so                     0x16312d88 wxsResourceTree::OnSelect(wxTreeEvent&) + 56 (wxsresourcetree.cpp:103)
3   libwx_macu-2.6.0.dylib            0x080244c8 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 200
4   libwx_macu-2.6.0.dylib            0x08024788 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 168


I've created possible fix (commited into rev 3618), could you check if it works ?

BYO

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #9 on: February 20, 2007, 08:52:02 am »
Sorry, it crashed again:

Quote
Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x0000004c

Thread 0 Crashed:
0   libwxsmith.so                     0x081ad268 wxsItemResData::SelectItem(wxsItem*, bool) + 40
1   libwxsmith.so                     0x08130354 wxsResourceTree::OnSelect(wxTreeEvent&) + 68
2   libwx_macu-2.6.0.dylib            0x016244c8 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 200
3   libwx_macu-2.6.0.dylib            0x01624788 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 168
4   libwx_macu-2.6.0.dylib            0x01624f14 wxEvtHandler::ProcessEvent(wxEvent&) + 212
5   libwx_macu-2.6.0.dylib            0x01624f44 wxEvtHandler::ProcessEvent(wxEvent&) + 260
6   libwx_macu-2.6.0.dylib            0x01777968 wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) + 56

I am using Edit/Cut to remove the object. Is this correct?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #10 on: February 20, 2007, 08:57:35 am »
Exception:  EXC_BAD_ACCESS (0x0001)
0   libwxsmith.so                     0x081ad268 wxsItemResData::SelectItem(wxsItem*, bool) + 40
Hehe... I could imagine where it is happening... look at this line:
Code
for ( wxsParent* Parent = Item->GetParent(); Parent; Child = Parent, Parent = Parent->GetParent() )
There Item might still be NULL -> it's verified everywhere in this method but here... but better let byo decide... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #11 on: February 20, 2007, 03:24:42 pm »
I am using Edit/Cut to remove the object. Is this correct?

Oh, I thought you used delete button on the right side of editor. I've checked Edit/Cut long time ago but it looks as good starting point to search for crash

Exception:  EXC_BAD_ACCESS (0x0001)
0   libwxsmith.so                     0x081ad268 wxsItemResData::SelectItem(wxsItem*, bool) + 40
Hehe... I could imagine where it is happening... look at this line:
Code
for ( wxsParent* Parent = Item->GetParent(); Parent; Child = Parent, Parent = Parent->GetParent() )
There Item might still be NULL -> it's verified everywhere in this method but here... but better let byo decide... ;-)
With regards, Morten.

Should be no problem since there's
Code
    if ( !Item )
    {
        Item = m_RootItem;
    }
few lines above, and m_RootItem can not be NULL. But to be honest, currently I've no idea where it crashes. Most possible solution is that Item has just been freed but it's pointer is still kept inside resource browser

BYO

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #12 on: February 20, 2007, 03:42:35 pm »
Should be no problem since there's
Code
    if ( !Item )
    {
        Item = m_RootItem;
    }
Ooops... sorry - I have been blind. :oops:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

bnilsson

  • Guest
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #13 on: February 20, 2007, 10:31:43 pm »
Quote
Oh, I thought you used delete button on the right side of editor.
Ok, I missed that. I will use this from now on.
Any idea how to fix the erased layout display on the Mac?
It is a bit difficult to work whithout seeing anything.
Tell me where and what to test, an I'll try it.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not build for MacOSX at rev 3614
« Reply #14 on: February 20, 2007, 10:42:19 pm »
Quote
Oh, I thought you used delete button on the right side of editor.
Ok, I missed that. I will use this from now on.
Any idea how to fix the erased layout display on the Mac?
It is a bit difficult to work whithout seeing anything.
Tell me where and what to test, an I'll try it.

Is "property changing" the only way to show content ? Have you changed properties in property window or in QuickProperties panel (the one that can be shown using Q buttin on the right). Is there any other way to make things visible? What will happen when you resize editor's area?

Waiting for your answers :D