3 Replies Latest reply on Nov 15, 2016 1:08 PM by Intel Corporation

    UPM Issues Following Upgrade to MRAA 1.5.1 and UPM 1.0.0

    David.H

      Hi:

      I upgraded to MRAA 1.5.1 and UPM 1.0.0. Following the upgrade calls to the C++ UPM device class Lcm1602 failed with a Segmentation fault.  Prior to the upgrade the application performed without error.

       

      Running the application under GDB I discovered the fault took place on the following call:

       

      120   

      lcd = new upm::Lcm1602(6, 0x27, true, 20, 4);

       

      Note:  Arg1 = bus, Arg2 = Address

       

      The diagnostic message was:

       

      Program received signal SIGSEGV, Segmentation fault.

      0xb7fa18d7 in mraa_i2c_address () from /usr/lib/libmraa.so.1

       

      Running the application under VALGRIND yielded further diagnostic information of the fault:

       

      ==5640== Invalid write of size 4

      ==5640== at 0x433DEB3A: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string() (in /usr/lib/libstdc++.so.6.0.20)

      ==5640== by 0x407A28C: upm::LCD::LCD() (in /usr/lib/libupm-i2clcd.so.1.0.0)

      ==5640== by 0x407A4BB: upm::Lcm1602::Lcm1602(int, int, bool, unsigned char, unsigned char) (in /usr/lib/libupm-i2clcd.so.1.0.0)

      ==5640== by 0x804964F: main (distance.cpp:120)

      ==5640== Address 0x4282e1c is 0 bytes after a block of size 4 alloc'd

      ==5640== at 0x40272EC: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)

      ==5640== by 0x8049637: main (distance.cpp:120)

      ==5640==

      ==5640== Invalid read of size 4

      ==5640== at 0x433E05BD: std::string::assign(char const*, unsigned int) (in /usr/lib/libstdc++.so.6.0.20)

      ==5640== by 0x433E0798: std::string::operator=(char const*) (in /usr/lib/libstdc++.so.6.0.20)

      ==5640== by 0x407A2A5: upm::LCD::LCD() (in /usr/lib/libupm-i2clcd.so.1.0.0)

      ==5640== by 0x407A4BB: upm::Lcm1602::Lcm1602(int, int, bool, unsigned char, unsigned char) (in /usr/lib/libupm-i2clcd.so.1.0.0)

      ==5640== by 0x804964F: main (distance.cpp:120)

      ==5640== Address 0x4282e1c is 0 bytes after a block of size 4 alloc'd

      ==5640== at 0x40272EC: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)

      ==5640== by 0x8049637: main (distance.cpp:120)

      ==5640==

       

      Plus many more messages.

       

      Additional Information which may be useful:

      • Upgraded from MRAA 1.4.0 and UPM 0.8.0
      • Application was fully recompiled following the MRAA and UPM upgrade
      • Current Firmware Release: 3.5

      root@edison:~# cat /etc/version

      201606061707

       

      Any assistance would be appreciated.

       

      Thank you,

      David