Menu

OpenConfigurator 1.3.1 crash

2014-07-03
2014-08-27
  • Romain Naour

    Romain Naour - 2014-07-03

    Hi all,

    There is a problem in WriteCNsData() causing a crash.

    *** glibc detected *** wish8.5: double free or corruption (!prev): 0x0dd8f410 ***
    

    See gdb :

    #7  0xb491c4bf in operator delete(void*) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
    #8  0xb491c50b in operator delete[](void*) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
    #9  0xb4b5e7bf in WriteCNsData(char*) () from /usr/lib/openCONFIGURATOR.so
    #10 0xb4b6029c in GenerateCDC(char*) () from /usr/lib/openCONFIGURATOR.so
    #11 0xb6e5f3ce in _wrap_GenerateCDC () from /usr/share/openCONFIGURATOR-1.3.1/openConfiguratorWrapper.so
    

    See attached backtrace and openconfigurator project.

    Thanks,

    Romain

     
  • Powerlink-team Kalycito

    Hi Romain

    Thank you for your interest in reporting the issue.

    It looks like a bug. Sorry for the inconvenience.

    We will look into this and provide a fix on the upcoming release.

    Regards,
    Powerlink-team
    Kalycito

     
  • Romain Naour

    Romain Naour - 2014-07-03

    Hi,

    Your welcome :)

    The problem is the size of cdcBuffer2 and cdcBuffer3 buffer:
    (APIoperation.cpp line 4104 - 4105)

    cdcBuffer3 = new char[30000];
    cdcBuffer2 = new char[60000];
    

    For the project OC-crash these buffer are too short...

    WriteCNsData() seem to be writen in C language, why C++ stream are not used here ?

    Another exemple, in WriteCNsData() the fileName is opened with fopen()
    while iostream are used in ApplicationProcess::CheckFileStatus().

    I saw that Ramakrishnan did a lot of code cleanup between 1.2.2 and 1.3.0, but there is still work to be done.

    Also, where is the source code of txt2cdc tool ?
    Why it's not in openconfigurator source code ?

    Best regards,
    Romain

     
    • Powerlink-team Kalycito

      Hello Romain,

      You can download the Txt2Cdc application from this link.
      Usage:
      Compile the txt2cdc source code using CMake
      Linux: ./txt2cdc <mnobd.txt> <mnobd.cdc>
      Windows: txt2cdc.exe <mnobd.txt> <mnobd.cdc>

      Regards,
      POWERLINK Team,
      Kalycito

       
  • Christoph Ruecker

    Hi Romain,

    I have implemented a fix for your problem and successfully tested it with the OC project you provided. Additionally I have increased the number of nodes in your project to 12 nodes with the same configuration and OC successfully builds this very big configuration.

    You can pull the fix from:
    http://sourceforge.net/u/rueckerc/openconf/ci/fix-static-memory/tree/

    We will also include the fix in the next release of openCONFIGURATOR which also includes lots of code cleanup and further improvements.

    I hope this solves your issues.

    Best regards,
    Christoph

     
  • Romain Naour

    Romain Naour - 2014-07-04

    Hi Christoph,

    Thanks for your patch, your prompt reply is highly appreciated :)
    It fix my build issue, now I need to test the cdc on hardware.

    I see your branch "integration-1.4.0", it's good to see a lot of work has been done.

    When this version will be released ?

    Best regards,
    Romain

     
  • Christoph Ruecker

    Hi Romain,

    We don't have a fixed release date because the changes within the library require an adaption of the GUI code. This is currently work in progress.

    Best regards,

    Christoph

     
  • Romain Naour

    Romain Naour - 2014-07-09

    Hi Christoph,

    I have another issue during the cdc loading with the fixed OpenConfigurator 1.3.1.

    I get this error:

    AppCbParseWarning(Err/Warn): Source = EventSourceObdu (0x14) EplError = kEplObdSubindexNotExist (0x032) OrgSource = INVALID 1600
    

    I'll open a new thread with the OpenConfigurator projects files.

    Best regards,
    Romain

     
  • Christoph Ruecker

    Hi Romain,

    Thx a lot for the bug report.

    Best Regards,
    Christoph

     

Log in to post a comment.