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 13:15:56 PDT 2008


Vadim,

I discovered one interesting item while looking into this problem.  In
the wxBitmap::wxBitmap(const char* const* bits) (line 253 of
gtk/bitmap.cpp) constructor I found out that the
gdk_pixmap_create_from_xpm_d does change the mask argument.  If after
the call I reset mask to 0 then the application runs, but it looks as
though no mask is created for the bitmap.  I'm not sure why this
prevents the gdk error from occurring, but I thought it might be useful
for you or someone who knows more about gdk than I do.

Thanks again for your help.  I'll keep trying to isolate the problem
further.

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