- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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:
120lcd = 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:
- Upgrade PC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page