Discussion:
wxWidgets 3.0.0 COCOA error when adding wxGLCanvas
stepasite
2014-04-01 08:54:17 UTC
Permalink
Hi I when I try to add instance of wxGLCanvas into wxFrame via wxBoxSizer,
I get the following error:

wxWindow::DoGetSize(int*, int*) const + 44
wxWindowBase::GetSize() const + 41
wxSizerItem::DoSetWindow(wxWindow*) + 175
wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 332
wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 57
wxSizer::Add(wxWindow*, int, int, int, wxObject*) + 91 (sizer.h:1152)

wxFrame is parent of wxGLCanvas and wxFrame is set as top window. Also
Show() method was invoked before adding wxGLCanvas into wxFrame.

Why wxWidgets fail to obtain window size? Is anyone familiar with this
error?

Thanks in advance for any help,
Pavel
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-04-01 11:44:43 UTC
Permalink
On Tue, 1 Apr 2014 01:54:17 -0700 (PDT) stepasite wrote:

s> Hi I when I try to add instance of wxGLCanvas into wxFrame via wxBoxSizer,
s> I get the following error:
s>
s> wxWindow::DoGetSize(int*, int*) const + 44
s> wxWindowBase::GetSize() const + 41
s> wxSizerItem::DoSetWindow(wxWindow*) + 175
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 332
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 57
s> wxSizer::Add(wxWindow*, int, int, int, wxObject*) + 91 (sizer.h:1152)

This is not an error for any meaning of the word "error" I'm familiar
with. Do you mean that it crashes with this stack trace? If it does, it's
most likely that you have a bug in your code (which you helpfully don't
show). As usual, trying to reproduce the problem in a sample, e.g.
opengl/cube one, should allow you to either find the bug in your code or
manage to make a simple patch reproducing the problem that we could then
have a look at.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
stepasite
2014-04-07 13:59:48 UTC
Permalink
I just tried "cube" sample application and it works perfectly.

I am wondering how wxGLCanvas is added to the parent wxWindow in the cube
application. It seems that wxGLCanvas constructor does the work. Is it
true? If yes, I need different scenario:

1) create wxGLCanvas
2) add it to the window later via wxBoxSizer

Is it possible?

Thanks in advance,
Pavel
Post by Vadim Zeitlin
s> Hi I when I try to add instance of wxGLCanvas into wxFrame via wxBoxSizer,
s>
s> wxWindow::DoGetSize(int*, int*) const + 44
s> wxWindowBase::GetSize() const + 41
s> wxSizerItem::DoSetWindow(wxWindow*) + 175
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 332
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 57
s> wxSizer::Add(wxWindow*, int, int, int, wxObject*) + 91 (sizer.h:1152)
This is not an error for any meaning of the word "error" I'm familiar
with. Do you mean that it crashes with this stack trace? If it does, it's
most likely that you have a bug in your code (which you helpfully don't
show). As usual, trying to reproduce the problem in a sample, e.g.
opengl/cube one, should allow you to either find the bug in your code or
manage to make a simple patch reproducing the problem that we could then
have a look at.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
stepasite
2014-04-07 16:01:13 UTC
Permalink
I finally found why my app crashes on my MAC OS X 10.9.

I am able to reproduce the crash also with the "cube" sample application.
When stereoscopic vision is requested by default (in the attributes list),
the app crashes with the syndrome I posted in my first message.

I cannot try the app on a different MAC machine so I do not know whether it
is a bug or whether it is graphics card driver problem.

Anyway, excluding stereo capabilities from the attributes list is not
solution for me.

Thanks in advance for any help,
Pavel
Post by stepasite
I just tried "cube" sample application and it works perfectly.
I am wondering how wxGLCanvas is added to the parent wxWindow in the cube
application. It seems that wxGLCanvas constructor does the work. Is it
1) create wxGLCanvas
2) add it to the window later via wxBoxSizer
Is it possible?
Thanks in advance,
Pavel
Post by Vadim Zeitlin
s> Hi I when I try to add instance of wxGLCanvas into wxFrame via wxBoxSizer,
s>
s> wxWindow::DoGetSize(int*, int*) const + 44
s> wxWindowBase::GetSize() const + 41
s> wxSizerItem::DoSetWindow(wxWindow*) + 175
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 332
s> wxSizerItem::wxSizerItem(wxWindow*, int, int, int, wxObject*) + 57
s> wxSizer::Add(wxWindow*, int, int, int, wxObject*) + 91 (sizer.h:1152)
This is not an error for any meaning of the word "error" I'm familiar
with. Do you mean that it crashes with this stack trace? If it does, it's
most likely that you have a bug in your code (which you helpfully don't
show). As usual, trying to reproduce the problem in a sample, e.g.
opengl/cube one, should allow you to either find the bug in your code or
manage to make a simple patch reproducing the problem that we could then
have a look at.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-04-07 19:25:07 UTC
Permalink
On Mon, 7 Apr 2014 09:01:13 -0700 (PDT) stepasite wrote:

s> I finally found why my app crashes on my MAC OS X 10.9.
s>
s> I am able to reproduce the crash also with the "cube" sample application.
s> When stereoscopic vision is requested by default (in the attributes list),
s> the app crashes with the syndrome I posted in my first message.

Please open a Trac ticket with:

0. All the information you gave so far (e.g. wx 3.0.0, OS X 10.9)

1. The patch (please see http://trac.wxwidgets.org/wiki/HowToSubmitPatches)
allowing to reproduce the problem.

2. The stack trace when the sample crashes, ideally from the version not
compiled without debug information.

TIA,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
stepasite
2014-04-08 10:27:15 UTC
Permalink
I created ticket number 16174 that contains modified cube example (just
patch file).

Reproduction steps are provided in the ticket.

Thanks in advance,
Pavel
Post by Vadim Zeitlin
s> I finally found why my app crashes on my MAC OS X 10.9.
s>
s> I am able to reproduce the crash also with the "cube" sample application.
s> When stereoscopic vision is requested by default (in the attributes list),
s> the app crashes with the syndrome I posted in my first message.
0. All the information you gave so far (e.g. wx 3.0.0, OS X 10.9)
1. The patch (please see http://trac.wxwidgets.org/wiki/HowToSubmitPatches)
allowing to reproduce the problem.
2. The stack trace when the sample crashes, ideally from the version not
compiled without debug information.
TIA,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...