Re: segfault when using UIManager



El mar, 05-04-2005 a las 10:35 +0000, Matthias Kaeppler escribió:
> Hello,
> 
> The last line in this function leads to a segmentation fault:
> 
> FileBrowser::FileBrowser()
>     : m_ActionGroup( Gtk::ActionGroup::create() ),
>       m_UIManager( Gtk::UIManager::create() )
> {
>     // snipped irrevelant stuff
> 
>     m_ActionGroup->add(
>     Gtk::Action::create( "Quit", Gtk::Stock::QUIT ), sigc::mem_fun( *this,
> &FileBrowser::on_action_quit )
>     );
> 
>     m_UIManager->insert_action_group( m_ActionGroup );
> 
>     Glib::ustring ui_info =
>         "<ui>"
>         "  <popup name='PopupMenu'>"
>         "    <menuitem action='Quit'/>"
>         "  </popup>"
>         "</ui";                   <--------- LOOK HERE

Look above here. It must be:

	        "</ui>";

You have a missing ">".
            

> 
>     m_UIManager->add_ui_from_string( ui_info ); // segfault here
> }
> 
> m_UIManager and m_ActionGroup are Glib::RefPtrS. Any idea what is causing this?
> 

I've received five copies of this mail. Please be careful the next
time :)

-- 
-----------------------------------
Diego Fdez. Durán <diego goedi net>
Web: http://www.goedi.net
GPG ID: 90D266BB
-----------------------------------

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]