FW: SetIcon in sample programs causing BadAlloc error in
gdk (wx2.8.3, SunStudio12, g++ 3.4.3)
Bond, Gary D
gary.d.bond at lmco.com
Tue Apr 8 10:17:03 PDT 2008
Vadim,
Thanks for your reply. I caught the minimal sample in the debugger and
it is failing at the same location. In the wxBitmap::GetPixbuf method.
In answer to your question Does GetPixbuf return anything valid, the
answer is it never returns from GetPixbuf. The gtk error is triggered
in the GetPixbuf method where it is calling the
gdk_pixbuf_get_from_drawable on line 937 of src/gtk/bitmap.cpp. The
gdk_pixbuf_get_from_drawable function is passed
M_BMPDATA->m_mask->GetBitmap(), width and height, with all other
arguments 0. The width and height values are both 32. So it would seem
as though the mask might be a problem???
When I run the minimal program I get the following error:
The program 'minimal' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
(Details: serial 141 error_code 11 request_code 131 minor_code
5)
To generate the backtrace given in the earlier email I did use sync when
I ran the executable in the debugger (dbx).
Thanks for your assistance. I'll try to find out what it will take to
upgrade to 2.8.7. Unfortunately, it sometimes takes a miracle to do the
simplest things around here.
Thanks again,
Gary
-----Original Message-----
From: wx-users-bounces+gary.d.bond=lmco.com at lists.wxwidgets.org
[mailto:wx-users-bounces+gary.d.bond=lmco.com at lists.wxwidgets.org] On
Behalf Of Vadim Zeitlin
Sent: Tuesday, April 08, 2008 7:08 AM
To: wx-users at lists.wxwidgets.org
Subject: Re: FW: SetIcon in sample programs causing BadAlloc error in
gdk (wx2.8.3, SunStudio12, g++ 3.4.3)
On Thu, 27 Mar 2008 19:01:39 -0600 "Bond, Gary D" <gary.d.bond at lmco.com>
wrote:
BGD> I recently installed wx2.8.3 on a solaris box and encountered a
runtime
BGD> problem
First of all you should really use wx 2.8.7, it's 100% compatible with
2.8.3 so you shouldn't have any trouble upgrading to it but it contains
many bug fixes and while I don't remember anything related to this one,
you
should still try it first.
BGD> (actually the problem occurs in any sample using SetIcon).
So in the minimal sample too?
BGD> I used
BGD> configure to perform a debug build of gtk2. I ran the listctrl
sample
BGD> and the application died with the following backtrace (I'm sorry it
is
BGD> only a partial listing, but the program is on a classified system
and I
BGD> cannot transfer the full backtrace to an unclassified host)
Just to confirm it, did you run it with --sync command line option?
BGD> exit
BGD> gdk_x_error
BGD> _XError
BGD> _XReplay
BGD> XSync
BGD> _gdk_x11_copy_to_image
BGD> gdk_drawable_copy_to_image
BGD> gdk_pixmap_copy_to_image
BGD> gdk_drawable_copy_to_image
BGD> gdk_pixbuf_get_from_drawable
BGD> wxBitMap::GetPixbuf
BGD> wxTopLevelWindowGTK::SetIcons
BGD> wxTopLevelWindowGTK::SetIcon
BGD> MyFrame::MyFrame
BGD> MyApp::OnInit
BGD> wxAppCOnsole::CallOnInit
BGD> wxEntry
BGD> main
Can you check if GetPixbuf() returns something valid (at least non
NULL)?
BGD> Thanks for your assistance. Please let me know if you have any
BGD> questions.
It's really difficult to do anything about such bug without being able
to
reproduce it or even see the details of the stack trace... Does the bug
appear only when using some visuals by chance? Which one do you use in
fact?
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
_______________________________________________
wx-users mailing list
wx-users at lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wx-users
More information about the wx-users
mailing list