test programs crashs on windows 7 64 bits

Help
TanguyM
2013-07-03
2013-07-10
  • TanguyM

    TanguyM - 2013-07-03

    Hi,

    I compiled it++ using Mingw64 and MKL 11 library on windows 7 without any errors. I compiled different cpp test files with netbeans using the library itpp.a.

    My problem is that the program crash during the execution.

    For example with the test of filter routines :

    int main()
    {
    cout << "======================================" << endl;
    cout << " Test of filter routines " << endl;
    cout << "======================================" << endl;

    // Test signals
    vec x = randn(20), x2 = randn(20);
    cvec cx = randn_c(20), cx2 = randn_c(20);

    cout << "Input signals: " << endl;
    cout << "x = " << x << endl;
    cout << "x2 = " << x2 << endl;
    cout << "cx = " << cx << endl;
    cout << "cx2 = " << cx2 << endl;

    // Filter coefficients
    vec b(10);
    b.ones();
    b(0) += 0.1;
    cvec cb(10);
    cb.ones();
    cb(0) += 0.1;

    cvec ca(2);
    ca(0) = 1.0;
    ca(1) = -1.0;
    vec a(2);
    a(0) = 1.0;
    a(1) = -1.0;

    cout << "Filter coefficients: " << endl;
    cout << "b = " << b << endl;
    cout << "cb = " << cb << endl;
    cout << "a = " << a << endl;
    cout << "ca = " << ca << endl;

    vec y, y2;
    vec s1, s2;

    cvec cy, cy2;
    cvec cs1, cs2;

    cout << endl << "-----------------------------------------------" << endl;
    cout << "MA Filter: " << endl;

    MA_Filter<double, double,="" double=""> H(b);
    MA_Filter<complex<double>, double, complex<double> > CH(b);
    MA_Filter<complex<double>, complex<double>, complex<double> > C(cb);

    The program runs fine until the first MA_Filter<> and then simply crashs.

    It seems i could have the same problem as mentioned here: http://sourceforge.net/p/itpp/discussion/115655/thread/5deeb987/
    this posts was last updated the 2012-09-15 and i don't know if the proposed solution is right.

    Anyone already experience that problem and could resolve it?

    Thx,
    Tanguy.

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-07-03

    Could you build also the test files, with gtest, and check IT++ library ?

     
  • TanguyM

    TanguyM - 2013-07-04

    Hi Bogdan,

    I built the test files and like my previous test on netbeans, the itpp_gtests application crashs immediately.
    Like i said before i had no errors during the compilation of it++, i don't know what i'm doing wrong.

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-07-04

    What IT++ version do you use ? And cmake ?

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-07-04

    On windows 7, 32 bits, I cannot reproduce this behavior, unit test run with no problem. I am generating IT++ as shared library.

     
  • TanguyM

    TanguyM - 2013-07-05

    I'm on windows 7 64 bits. I compiled it++ 4.3.0 with cmake 2.8.10

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-07-05

    IT++ is compiled as shared library ?

     
  • TanguyM

    TanguyM - 2013-07-05

    i tried both, shared and static library.

     
  • Gert Wollny

    Gert Wollny - 2013-07-05

    Could you post a backtrace to see where the crash actually happens?

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-07-06

    I am wondering how have you installed mingw64 ? The recommended way is to use the installer, which seems to install the 32 bits version. Are you using the prepackaged version or the latest packages ?

     
  • Gert Wollny

    Gert Wollny - 2013-07-08

    What you will need is a debugger, e.g. gdb. See Updating or Changing your MinGW or MSYS Installation.

    Then you have to run the program from within the debugger. i.e. on the command line do

    gdb [program with full path]
    

    and at the gdb prompt

    run [give the command line parameters here]
    

    when it crashes you do

    bt
    

    and there you have your backtrace. Of course you will need to compile it++ with debug information turned on to get useful results.

    See also this basic tutorial for running gdb.

     
  • TanguyM

    TanguyM - 2013-07-10

    Thx for helping.

    I have this errors :

    C:\Users\admin\Desktop\it++\itpp-4.3.0\gtests>gdb itpp_gtests.exe
    GNU gdb (GDB) 7.6
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-w64-mingw32".
    For bug reporting instructions, please see:
    http://www.gnu.org/software/gdb/bugs/...
    Reading symbols from C:\Users\admin\Desktop\it++\itpp-4.3.0\gtests\itpp_gtests.e
    xe...done.
    (gdb) run
    Starting program: C:\Users\admin\Desktop\it++\itpp-4.3.0\gtests\itpp_gtests.exe

    [New Thread 1100.0x8a0]

    Program received signal SIGSEGV, Segmentation fault.
    0x000000006bdc80f0 in dcopy_ ()
    from C:\Users\admin\Desktop\it++\itpp-4.3.0\itpp\libitpp_debug.dll

    (gdb) backtrace

    0 0x000000006bdc80f0 in dcopy_ ()

    from C:\Users\admin\Desktop\it++\itpp-4.3.0\itpp\libitpp_debug.dll

    1 0x000000006bc44b92 in itpp::copy_vector (n=3, x=0x2e2a60, incx=1,

    y=0x2e2880, incy=8)
    at C:\Users\admin\Desktop\it++\itpp-4.3.0\itpp\base\copy_vector.cpp:71
    

    2 0x000000006be47fae in itpp::Mat<double>::set_row (this=0x5d2840 <m_ref>,

    r=0, v=...) at C:/Users/admin/Desktop/it++/itpp-4.3.0/itpp/base/mat.h:932
    

    3 0x000000006be46204 in itpp::Mat<double>::set (this=0x5d2840 <m_ref>,

    str="1e-9 0.2 0.7; -1.0 0.0 3e10")
    at C:/Users/admin/Desktop/it++/itpp-4.3.0/itpp/base/mat.h:788
    

    4 0x000000006be4a285 in itpp::Mat<double>::Mat (this=0x5d2840 <m_ref>,

    str=0x56646c <assert_cmat(itpp::Mat<std::complex<double> > const&, itpp::Mat
    

    <std::complex<double> > const&)::eps+924> "1e-9 0.2 0.7; -1.0 0.0 3e10",
    f=...) at C:/Users/admin/Desktop/it++/itpp-4.3.0/itpp/base/mat.h:622

    5 0x000000000044a7b5 in __static_initialization_and_destruction_0 (

    __initialize_p=1, __priority=65535)
    at C:\Users\admin\Desktop\it++\itpp-4.3.0\gtests\itfile_test.cpp:58
    

    6 0x000000000044b202 in _GLOBALsub_IZ18list_file_contentsRN4itpp8it_ifileE

    RSo () at C:\Users\admin\Desktop\it++\itpp-4.3.0\gtests\itfile_test.cpp:299

    7 0x00000000004e8fd5 in __do_global_ctors ()

    8 0x0000000000000001 in ?? ()

    9 0x000007fefd131332 in msvcrt!malloc () from C:\Windows\system32\msvcrt.dll

    10 0x000007fe00000004 in ?? ()

    11 0x000000000000003e in ?? ()

    12 0x00000000001f001e in ?? ()

    13 0x0000000000000001 in ?? ()

    14 0x000000000000003e in ?? ()

    15 0x00000000004013ab in __tmainCRTStartup ()

    16 0x0000000000000000 in ?? ()

    (gdb)

     
  • Gert Wollny

    Gert Wollny - 2013-07-10

    Well, dcopy_ is a BLAS routine which is most likely implemented in the MKL. if you could do list in gdb you may be able to see where exactly the problem is. Since list will probably not work, you might also try disass to see the disassambly.

    A little hint: when you paste output here, you should indent it by four characters, so
    that the discussion board software formats it verbatim like this text
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks