Re: Crash in TextControl

Ed Sweetman <[email protected]>
Newsgroups gmane.comp.audio.zinf.devel
Message-ID <[email protected]>
I've never seen this exact error before in my life.

The general error though i have seen.  the malloc/mallopt/mallopt error.

create_font_raster has a serious free'ing problem that may be related to 
your malloc problem.  For one, it malloc's rmap, but doesn't check to 
see if it's not null.  Second it malloc's pointers inside rmap, but on 
non-successful exit, it free's rmap before freeing previously successful 
malloc's to members of rmap. Locks wont help you, since it's all local 
data that's being worked on in create_font_raster, nothing from outside 
the method is really used.

Robert Hart wrote:
> Here's a backtrace from a crash I seem to be getting fairly often. Does
> anybody else see this? I assume this is some kind of race as it seems to
> occur sporadically at track change. I tried extending the mutex in
> TextChanged to cover the RenderText, but I don't think it helped. 
> 
> #0  0x4022346f in mallopt () from /lib/libc.so.6
> #1  0x40222e80 in mallopt () from /lib/libc.so.6
> #2  0x40222145 in malloc () from /lib/libc.so.6
> #3  0x404eccce in create_font_raster(int, int) () from ./plugins/zinf.ui
> #4  0x404ecec8 in calc_size(_efont*, int*, int*, char*) ()
>    from ./plugins/zinf.ui
> #5  0x404ed760 in EFont_draw_string(_GdkWindow*, _GdkGC*, int, int,
> char*, _efont*) () from ./plugins/zinf.ui
> #6  0x404e5cf3 in GTKFont::Render(Rect&, std::string&, int, Color
> const&, GTKBitmap*, bool) () from ./plugins/zinf.ui
> #7  0x404ec9d7 in GTKCanvas::RenderText(int, Rect&, std::string&,
> AlignEnum, Font*, Color const&, bool, bool, bool) () from
> ./plugins/zinf.ui
> #8  0x404b0bd3 in TextControl::TextChanged() () from ./plugins/zinf.ui
> #9  0x404b0b0b in TextControl::Transition(ControlTransitionEnum, Pos*)
> ()
>    from ./plugins/zinf.ui
> #10 0x404acd54 in Control::AcceptTransition(ControlTransitionEnum, Pos*)
> ()
>    from ./plugins/zinf.ui
> #11 0x404accb6 in Control::StringValue(bool, std::string&) ()
>    from ./plugins/zinf.ui
> #12 0x404a7e28 in Panel::ControlStringValue(std::string const&, bool,
> std::string&) () from ./plugins/zinf.ui
> #13 0x404a9a9f in Window::ControlStringValue(std::string const&, bool,
> std::string&) () from ./plugins/zinf.ui
> ---Type <return> to continue, or q <return> to quit---
> #14 0x404d58f3 in ZinfTheme::UpdateTimeDisplay(int) () from
> ./plugins/zinf.ui
> #15 0x404cfba5 in ZinfTheme::AcceptEvent(Event*) () from
> ./plugins/zinf.ui
> #16 0x08064d55 in Player::SendToUI(Event*) (this=0x80b3f58,
> pe=0x94943f8)
>     at /usr/include/c++/3.2/bits/stl_vector.h:289
> #17 0x080646e2 in Player::HandleMediaTimeInfo(Event*) (this=0x80b3f58,
>     pEvent=0x94943f8) at base/src/player.cpp:1861
> #18 0x08064c24 in Player::ServiceEvent(Event*) (this=0x80b3f58,
> pC=0x94943f8)
>     at base/src/player.cpp:2076
> #19 0x0806211e in Player::EventServiceThreadFunc(void*)
> (pPlayer=0x80b3f58)
>     at base/src/player.cpp:894
> #20 0x080917e0 in pthreadThread::InternalThreadFunction()
> (this=0x935cf88)
>     at base/unix/src/pthreadthread.cpp:71
> #21 0x080917aa in pthreadThread::internalThreadFunction(void*)
> (arg=0x935cf88)
>     at base/unix/src/pthreadthread.cpp:60
> #22 0x40032d53 in pthread_start_thread () from /lib/libpthread.so.0
> 
>



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.