wxMAX 2.9.1

BlitzMax Forums/Brucey's Modules/wxMAX 2.9.1

Nigel Brown(Posted 2011) [#1]
@Brucey,

I have updated wx.mod via SVN today and am now getting many link errors, anything I should try first? Or is it in a state of flux?

have tried building with and without debug mt, here is the content of my installed.ini MinGW file:

[settings]
mirror=
installtype=current

[components]
runtime=mingwrt-3.17-mingw32-dev.tar.gz
w32api=w32api-3.14-mingw32-dev.tar.gz
binutils=binutils-2.20-1-mingw32-bin.tar.gz
core=gcc-core-3.4.5-20060117-3.tar.gz
gpp=gcc-g++-3.4.5-20060117-3.tar.gz
g77=
ada=
java=
objc=
make=


And here is one of the many link errors:

Files/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_core.a(corelib_fldlgcmn.o):fldlgcmn.cpp:(.text+0x300): multiple definition of `wxFileDialogBase::SetFilename(wxString const&)'


Brucey(Posted 2011) [#2]
The libs have been built with gcc 4.5.2 ... which is probably where the issues are arriving.

It gets difficult to support X number of MinGW versions... especially since 3.4.5 refuses to build things like CEGUI any more. (the rest of the world moves forward to use the latest gcc, and BlitzMax in its default manifestation is still using 2006 gcc 3.4.5).

Yes, I can do a build of the libs with 3.4.5 probably, but then you've got the problem of having to copy them over the other ones.

Ho hum :-(


Brucey(Posted 2011) [#3]
As it happens, my win32 libs also generate a bunch of warnings when linking against the applications.
Only warnings, mind you... but the wxwidgets sample build does not, and comparing the two command-lines, I can't see what the different is (for one to throw warnings, and the other to not!)

And there's an assertion thrown when quitting an app - something to do with an event handler not releasing before its parent is destroyed. I'm looking into that one at the moment :-)

Fun fun...


Nigel Brown(Posted 2011) [#4]
Brucey,

Thank's I did wonder if it might be something like this do you have a guide on setting up / downloading your tool chain to ensure I am in line?


Russell(Posted 2011) [#5]
What files does BMax actually need to compile modules? If it is allowed in the minGW licensing, it would solve a lot of problems people are having if the files BMax needs could either be included as part of the BMax installation OR statically linked into the exe.

Russell


TaskMaster(Posted 2011) [#6]
So, what exactly does somebody need to do to run the samples?

I have the latest BlitzMax installed, I grabbed the latest wxMax from the Google SVN, I was able to build all the modules in single threaded and multi-threaded.

But, when I try to run any of the samples, I get errors like this:

C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xcd): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xa6a): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xa8e): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xaa3): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xac9): more undefined references to `_Unwind_Resume' follow
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xmlres.o):xmlres.cpp:(.text+0x23c): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xmlres.o):xmlres.cpp:(.text+0x491): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xmlres.o):xmlres.cpp:(.text+0x77b): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xmlres.o):xmlres.cpp:(.text+0x939): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xmlres.o):xmlres.cpp:(.text+0x95f): undefined reference to `_Unwind_Resume'

The list of errors goes on and on.

I have tried building in debug and non-debug, threaded and non=threaded.

Do I need to install a newer version of mingw? Will that newer version be incompatible with BlitzMax? Do I also need your newer version of the BlitzMax compiler?

BTW, I am doing this on Windows XP, not Mac or Linux.

Thanks for any help...


TaskMaster(Posted 2011) [#7]
I have grabbed Brucey's bmk, compiled it threaded, installed the new MingW, copied the new bmk.exe and the .bmk files and ld.exe and ar.exe into their correct spots and am now recompiling all of my mods.

I will post back here with my results of whether or not it helps me compile the wx samples.

Edit: This seems to have solved it for me.

Last edited 2011


Nigel Brown(Posted 2011) [#8]
@TaskMaster, Any updates?


sebas76(Posted 2011) [#9]
Hello

I have : bmax 1.44 + Gcc 4.2.1 +wxMAX 2.9.1.
I have update module wxMax to latest release trhough SVN ( R692)
All modules were rebuildt without warning.

I try the samples but with aui.bmx , i get at exiting the error :
"wxWidgets Debug alert"
...
assert " GetEventeHAndler () == this" failed in ~wxWindowBase(): any pushed event handlers must have been removed.

Then the debugger go to the file wxapp.bmx at line :

Method Run:Int()
-> Return bmx_app_wxentry()
End Method

Please can you help me ?
Thank in advance.

Last edited 2011


Derron(Posted 2011) [#10]
Ok, just read your posting and remembered that I fixed that for a small tool some weeks ago:

- open "aui.bmx"
- go to: Type MyFrame... Method OnInit
- add: ConnectAny(wxEVT_CLOSE, OnClose)
- add the function:
	Function OnClose(event:wxEvent)
		MyFrame(event.parent).manager.UnInit()
		wxWindow(event.parent).Destroy() ' remove the frame
	End Function

to the type MyFrame

I thought that had something to do with unexpected behaviour of wxwidget assuming the removal of handlers when closing the windows (further interests will need a refined google search :D).

So keep in mind: add an onClose-Event to your Frames / AUI-handled xwindows.

bye
Ron

PS: I'm not using the most current SVN as it has problems compiling on all of my linux setups and I need a working wxscintilla with blitzmax/monkey highlighting.

Last edited 2011


sebas76(Posted 2011) [#11]
Ok thanks Derron, it works fine.
Now I have others errors with the sample particularly this one :

The XRCdemo sample worked but there is a bug it displays :
wxWidgets Debug Alert : /../src/common/sizer.cpp: assert failure in setDimension(): can't set size of uninitialized sizer item... ?
Any idea where is the problem ?

I use bmax 1.44b + gcc 4.6.1 + wxmax 2.9.1 (r692).

In spite of this bug, I have modified the xrc demo for my own purposes with a xrc file that displays fine but when I close the wxDialog I have this assert :
/src/common/ctrlsub.cpp(211) : assert
HasClientUntypeData() failed in GetClientData(): this window doesn't have void client data.
Do you want to stop the program ?...
It seems to be a bug when gagdet are freed ?

Thanks in advance.
Seb


sebas76(Posted 2012) [#12]
Hi,

I have always the same problem when main window is closed...
Please help me

Thanks


sebas76(Posted 2012) [#13]
I have located the problem :
It is wxcombobox in XRC file.
They are few bug : no item is memorized and pointer are lost when an event occurs...


Brucey(Posted 2012) [#14]
I haven't got around to sorting out wxMax yet.

It's difficult to get everything built on the various platforms. It almost seems that the bigger the version number, the more difficult it is to get everything built ! :-(


Dabhand(Posted 2012) [#15]
Well, well you do, I recall there was a problem with wxScintilla on OSX, in regards to folding... when you had set up folding, using something like:-

setproperty("fold", 1)
		setproperty("fold.comment", 1)
		setmargintype(1, wxSCI_MARGIN_SYMBOL)
		setmarginwidth(1, 0)
		setmarginmask(1, wxSCI_MASK_FOLDERS)
		SetMarginWidth(1, 20)
		SetMarginSensitive(1, 1)
		
		MarkerDefine(wxSCI_MARKNUM_FOLDER, wxSCI_MARK_CIRCLEPLUS)
		MarkerSetBackground(wxSCI_MARKNUM_FOLDER, New wxColour.CreateNamedColour("BLACK"))
		MarkerSetForeground(wxSCI_MARKNUM_FOLDER, New wxColour.CreateNamedColour("WHITE"))
		MarkerDefine(wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_CIRCLEMINUS)
		MarkerSetBackground(wxSCI_MARKNUM_FOLDEROPEN, New wxColour.CreateNamedColour("BLACK"))
		MarkerSetForeground(wxSCI_MARKNUM_FOLDEROPEN, New wxColour.CreateNamedColour("WHITE"))
		
		MarkerDefine(wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_EMPTY)
		MarkerDefine(wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_SHORTARROW)
		MarkerDefine(wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_ARROWDOWN)
		MarkerDefine(wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_EMPTY)
		MarkerDefine(wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_EMPTY)


Then run, and type a few things down, I noticed when you double clicked to select a whole line, and then hit the backspace key, you'd get this error:-

<Error>: CGContextRestoreGState: invalid context 0x0

Which is a quiet error until you exit the application where your greeted to a message box that states the same sadness. :)

EDIT: Just had a play and it does the same when you add and delete either "£" or "±" characters! :/

Dabz

Last edited 2012


sebas76(Posted 2012) [#16]
I use wxmax on windows 7 pro.
All is built fine with GCC 4.6.1 and Bmax 1.48.

I could help if I know what code to modify for resolving the problem.
I have found that the bug is in the follwing code in glue.cpp :

void bmx_wxcontrolwithitems_clear(wxControlWithItems * control) {

int count = control->GetCount();
for (int i = 0; i < count; i++) {
void * data = control->GetClientData(i);
if (data) {
BBRELEASE((BBObject*)data);
}
}

control->Clear();
}

void bmx_wxcontrolwithitems_deleteitem(wxControlWithItems * control, int item) {
void * data = control->GetClientData(item);
if (data) {
BBRELEASE((BBObject*)data);
}

control->Delete(item);
}

When I try to deleteitem or clear in a wxcombobox loaded from a XRC ressource file then it generates an assert alert :
/src/common/ctrlsub.cpp(211) : assert
HasClientUntypeData() failed in GetClientData(): this window doesn't have void client data.

But i didn't find where is that code in wxmax...

Last edited 2012


sebas76(Posted 2012) [#17]
The bug is with appenditems function.
Another thing, JPEGHandler doesn't work ?