Community
cancel
Showing results for 
Search instead for 
Did you mean: 
DDavi52
New Contributor I
1,748 Views

UPM Issues Following Upgrade to MRAA 1.5.1 and UPM 1.0.0

Jump to solution

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, std::allocator >::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

Tags (1)
0 Kudos
1 Solution
idata
Community Manager
52 Views

Hello David,

 

 

Thanks for reaching out!

 

 

I understand, this is an unexpected behavior. Since you were able to compile your code successfully using mraa 1.4.0 + upm 0.8.0, I'd suggest you to go back to these versions. You can do so, by following these instructions:

 

 

opkg remove mraa --force-removal-of-dependent-packages

 

# The line above should remove both mraa and upm, in case it doesn't enter it again but with upm

 

wget http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586/mraa_1.4.0_i586.ipk

 

wget http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586/upm_0.8.0_i586.ipk

 

opkg install mraa_1.4.0_i586.ipk

 

opkg install upm_0.8.0_i586.ipk

 

 

Now you will have mraa 1.4.0 + upm 0.8.0 and you'll be able to continue working with your application. As I mentioned this behavior is not usual, so, I suggest you to report it in upm's Github ( https://github.com/intel-iot-devkit/upm/issues).

 

 

I hope this helps.

 

-Peter.

View solution in original post

3 Replies
idata
Community Manager
53 Views

Hello David,

 

 

Thanks for reaching out!

 

 

I understand, this is an unexpected behavior. Since you were able to compile your code successfully using mraa 1.4.0 + upm 0.8.0, I'd suggest you to go back to these versions. You can do so, by following these instructions:

 

 

opkg remove mraa --force-removal-of-dependent-packages

 

# The line above should remove both mraa and upm, in case it doesn't enter it again but with upm

 

wget http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586/mraa_1.4.0_i586.ipk

 

wget http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586/upm_0.8.0_i586.ipk

 

opkg install mraa_1.4.0_i586.ipk

 

opkg install upm_0.8.0_i586.ipk

 

 

Now you will have mraa 1.4.0 + upm 0.8.0 and you'll be able to continue working with your application. As I mentioned this behavior is not usual, so, I suggest you to report it in upm's Github ( https://github.com/intel-iot-devkit/upm/issues).

 

 

I hope this helps.

 

-Peter.

View solution in original post

DDavi52
New Contributor I
52 Views

Peter:

The solution definitely helped. I was able to revert to MRAA 1.4.0 and UPM 0.8.0.

And, I will log the issue with the UPM Github.

Thank you,

David

idata
Community Manager
52 Views

I'm glad to help!

 

 

Keep us updated on this and if you have any other questions, don't hesitate to come back to the community.

 

-Peter.
Reply