Menu

Stability

Help
2003-01-20
2003-01-25
  • Zack Erhart

    Zack Erhart - 2003-01-20

    Hi,

    Thanks for providing an interesting and useful library. I've been experimenting with it and like what I see, but I have seen some stability problems. How stable is it believed to be?

    My problems are specifically related to changes in the build options. I'm making the following changes:

    1. Remove the /GZ compile flag
    2. Switch from "Program Database with Edit and Continue" to "Program Database"
    3. Switch to use multithreaded runtime

    When I rebuild the library and the TestValues sample with these options, the TestValues sample always crashes during the struct testing. It only seems to crash if both changes 1 and 2 are made. It doesn't crash if only one of those two changes is made. (I can provide a stack trace, if desired.) It appears to be crashing in <xtree> at line 195.

    I've tried dropping XMLRPC into one of my applications, and it crashes there as well. This time it is on the construction of a struct.

    Any thoughts? I'm building w/ VC6 (SP5). I've tried applying the STL changes, but they didn't seem to have an effect.

    Thanks,
    Zack

     
    • Chris Morley

      Chris Morley - 2003-01-21

      Those symptoms are exactly the ones which caused me to create the TestValues program and narrow the problem down to the VC++ 6 STL code.

      Are you sure you installed the dinkumware version of xtree? The header of the file should look like this:

      // tree internal header
      #ifndef _TREE_
      #define _TREE_

      /* This file is for use only in conjunction with a valid license for
      Microsoft Visual C++ V5.0. Microsoft Corporation is in no way involved
      with the production or release of this file. The file is offered on an
      ``as is'' basis.

      DINKUMWARE, LTD. AND P.J. PLAUGER MAKE NO REPRESENTATIONS OR WARRANTIES
      ABOUT THE SUITABILITY OF THIS FILES, EITHER EXPRESS OR IMPLIED,
      INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
      FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. DINKUMWARE, LTD.
      AND P.J. PLAUGER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
      LICENSEE AS A RESULT OF USING THIS FILE.

      For additional information, contact Dinkumware, Ltd. (+1-888-4DINKUM or
      support@dinkumware.com).

      Version date: 25 June 1998
      */

       
    • Chris Morley

      Chris Morley - 2003-01-21

      As an aside, I didn't test without the /GZ flag because I didn't see a way to remove it through the project settings. But why would you want to? If you are creating a debug build, don't you want more error checking?

      Chris

       
    • Chris Morley

      Chris Morley - 2003-01-21

      I guess I never answered the original question.

      I believe the code is fairly stable. It is an integral part of the app my employer is developing, and as such it is in active use by 10 developers and various testers etc.

      That needs to be qualified a bit because our application does not use the XmlRpcValue class at all (by subclassing the client and server connection classes and providing its own xml encoding and parsing), so problems in the values would typically not be seen by us.

      However, I will say that the TestValues exe ran fine everywhere (linux, solaris, VS.net) except VC++ 6 until I patched the VC++ 6 STL files.

       
    • Chris Morley

      Chris Morley - 2003-01-21

      Also, note that there is a bug that will cause an assertion failure in TestValues.cpp.

      The section that tests creation of a DateTime value should be using the XmlRpcValue(std::string const& xml, int* offset) contructor to create the value from the xml string. Instead, it is simply creating a string. I forgot to update the cvs before creating the release package.

      I'll update tonight or tomorrow and make a new release.

      Chris

       
    • Zack Erhart

      Zack Erhart - 2003-01-21

      Chris,

      Thanks for your detailed responses. I really appreciate the additional information you provided. I have verified that I am using the correct version of <xtree>. Regarding the /GZ flag, I'm attempting to integrate the library into a much larger application that is built w/o that additional debug info so I removed the /GZ flag from XMLRPC++ to avoid warnings.

      I just tried a test where I used the stlport (http://www.stlport.org/) version of the STL instead of the patched MS version. This seemed to prevent TestValues from crashing when compiled with my options. However, my application still crashes in xtree when I try the following:

      XmlRpcValue Event;
      Event["Name"] = "string";

      At this point, I'm going to need to try another approach in my application. I'm hoping to get time to look at XMLRPC++ again and get it working.

      If you have any other ideas, let me know. Thanks for your help!

      Zack

       
      • Chris Morley

        Chris Morley - 2003-01-25

        Re-reading this message, something is not kosher here.

        You say you tried using STLport but you are still getting a crash in xtree. That doesn't make sense; xtree is part of the vc++ STL. STLport doesn't have a file called xtree. Better clean out all your objects and rebuild so you know what you've got.

         
    • Chris Morley

      Chris Morley - 2003-01-23

      Zack, You are right, there was a bug in the XmlRpcValue copy constructor (not initializing the type tag). Depending on what the type tag ended up as, it could crash as you observed. Fixed in version 0.5.

      Thanks for spotting the problem-
      Chris

       
    • Zack Erhart

      Zack Erhart - 2003-01-23

      Chris,

      Thanks for looking into this further. I grabbed the latest version and the TestValues sample now seems to work under both the MS and stlport implementation of the STL. Unfortunately, XMLRPC++ still crashes (in the same location) when I attempt to use it from my application. If I get a chance, I'll investigate. If you see any other issues in XMLRPC++, let me know.

      Thanks,
      Zack

       
      • Chris Morley

        Chris Morley - 2003-01-23

        So its still crashing at this code?

        XmlRpcValue Event;
        Event["Name"] = "string";

        There is nothing particularly tricky going on, its just creating a map and inserting a value into it, so it ought to be easy to find the problem.

        Can you send a traceback (or even better a small example)? Email me at users.sourceforge.net if you can. In the meantime I can try to write something that stresses the code a little more than the TestValues et al programs to see if I can make it break.

         
    • Chris Morley

      Chris Morley - 2003-01-24

      Well, I have put the code through the wringer, generating structs with up to 10,000 elements and then deleting them and starting over, periodically calling _CrtDumpMemoryLeaks() and  _CrtCheckMemory( ), but no problems have turned up. (This version of the test is in cvs as TestValuesWin32.cpp if you want to try it).

      Is it possible you need to rebuild the app since the change was in an inline ctor in the .h file, just re-linking won't get the fix.

       

Log in to post a comment.