News:

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

Main Menu

wxSmith does not build for MacOSX at rev 3614

Started by bnilsson, February 18, 2007, 04:17:01 PM

Previous topic - Next topic

bnilsson

wxSmith does not build for MacOSX at rev 3614:
QuoteMaking 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?

Auria

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

#2
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?

Auria

Quote from: bnilsson on February 18, 2007, 09:39:12 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

#4
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?

byo

#5
Quote from: Auria 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"

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

bnilsson

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


bnilsson

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

byo

Quote from: bnilsson 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


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

BYO

bnilsson

Sorry, it crashed again:

QuoteException:  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?

MortenMacFly

Quote from: bnilsson on February 20, 2007, 08:52:02 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:

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: [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]

byo

Quote from: bnilsson on February 20, 2007, 08:52:02 AM
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

Quote from: MortenMacFly on February 20, 2007, 08:57:35 AM
Quote from: bnilsson on February 20, 2007, 08:52:02 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:

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

MortenMacFly

Quote from: byo on February 20, 2007, 03:24:42 PM
Should be no problem since there's
    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: [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]

bnilsson

QuoteOh, 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.

byo

Quote from: bnilsson on February 20, 2007, 10:31:43 PM
QuoteOh, 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