Crash in wfut

Bug #285630 reported by Alexey Torkhov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ember
Invalid
High
Alexey Torkhov
libwfut
Invalid
High
Alexey Torkhov
libwfut (Fedora)
Fix Committed
Undecided
Alexey Torkhov

Bug Description

When starting ember with wfut enabled it crashes with following bt:

#0 parseFile (element=0x18ecc10, file=@0x7fffff7a6570) at /usr/include/c++/4.3.0/bits/basic_string.h:278
#1 0x00007f96f50a99d2 in parseFiles (node=0x18ed0e0, files=@0x14094b0) at FileParser.cpp:48
#2 0x00007f96f50a9e69 in WFUT::parseFileListXML (xml=@0x7fffff7a6690, files=@0x14094b0) at FileParser.cpp:93
#3 0x00007f96f50ad7bb in WFUT::WFUTClient::getFileList (this=<value optimized out>, url=<value optimized out>, files=@0x14094b0) at WFUT.cpp:183
#4 0x000000000076ea00 in Ember::WfutSession::startUpdate (this=0x1409420, serverRoot=@0x7fffff7a7020, channelName=<value optimized out>,
    localPath=<value optimized out>, systemPath=@0x7fffff7a6fa0)
    at /usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:607
#5 0x0000000000480c40 in EmberOgre::MediaUpdater::performUpdate (this=<value optimized out>)
    at /usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ext/atomicity.h:83
#6 0x000000000046d687 in EmberOgre::EmberOgre::setup (this=0x13e4230) at ../../../../src/components/ogre/EmberOgre.cpp:427
#7 0x00000000004645c4 in Ember::Application::start (this=0x7fffff7a7570) at ../../../src/main/Application.cpp:279
#8 0x00000000004680e5 in main (argc=0, argv=<value optimized out>)
    at /usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/locale_facets.h:873

Revision history for this message
Alexey Torkhov (atorkhov) wrote :
Changed in ember:
assignee: nobody → erik-hjortsberg
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Alexey Torkhov (atorkhov) wrote :

> Окт 19 02:19:20 <erikh> I did find some funky string allocations in Ember::WfutSession. I've committed a fix for those, could you update and see if that has anything to do with it (probably not).
This didn't helped.

> Окт 19 02:18:05 <erikh> Nope. Going through your bt. But FileParser.cpp:48 shouldn't even try to access any string, at least not in my version of libwfut.
> Окт 19 02:18:19 <erikh> It says "parseFile(e, file);"
> Окт 19 02:18:40 <erikh> And parsefile accepts a reference and a pointer, so there's no dereferencing going on.
It accesses string somewhere from parseFile(), from #0 frame - it doesn't show inlined calls.

At /usr/include/c++/4.3.0/bits/basic_string.h:278 there is private function that accesses private data (_M_data()).
And the only access to std::string from parseFile() is
   file.filename = Encoder::decodeString(fname);
file is FileObject _struct_, and file.filename is its std::string member. I'm unsure about are members in structs constructed properly. Probably will be better to have it as simple classes.

Revision history for this message
Alexey Torkhov (atorkhov) wrote :

Issue in wrong system-tinyxml patch used for Fedora package.
There was statements like
  const char *name_val = element->Attribute(TAG_name)->c_str();
instead of right ones
  const char *name_val = element->Attribute(TAG_name.c_str());

In libwfut cvs/git sources there is right version.
Closing the bug.

Changed in ember:
assignee: erik-hjortsberg → atorkhov
status: Confirmed → Invalid
assignee: nobody → atorkhov
status: New → Invalid
Changed in ember:
status: Invalid → Confirmed
status: Confirmed → Invalid
Changed in libwfut:
assignee: nobody → atorkhov
status: New → Fix Committed
Changed in ember:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.