Glib::Markup and win32 crash



Hi!
I've compiled the glibmm/examples/markup/parcer.cc example under win32 using gtk+-2.6.10 (from gladewin32 site) and gtkmm-2.6.2 (from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/)
on win2000 professional.
It crashes on a strange place:

void DumpParser::on_start_element(Glib::Markup::ParseContext&,
                                 const Glib::ustring& element_name,
                                 const AttributeMap&  attributes)
{
 indent();
 std::cout << '<' << element_name;
std::cout << attributes.size() << std::endl;   <-------- HERE1
for(AttributeMap::const_iterator p = attributes.begin(); p != attributes.end(); ++p)
 {
std::cout << "here!: " << (p != attributes.end()) << std::endl; <------HERE2
   std::cout << ' ' << p->first << "=\"" << p->second << '"';
 }

 std::cout << ">\n";

 ++parse_depth_;
}

And even when attributes.size() == 0 (HERE1) the code in the for(AttributeMap::...) loop is
accessible (HERE2) because the iterator  p != attributes.end() !!!!!!!!
How is it possible?
As an input file I use the simplified text file:

"<config>
     <property name="type">2</property>
<config>"

so there should be no Glib::ustring conversions error.

Any help needed!!!
   Igor Gorbounov



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