Comments (9)
@mossmaurice @elBoberido
Got it,thanks
from iceoryx.
Do you have more information for us, e.g.
- which iceoryx version
- which OS
- where does the crash happen, on the publisher or subscriber
- do you have a backtrace
- can you share the content of the struct (the data which can be transferred with shared memory underlies some restrictions)
from iceoryx.
Do you have more information for us, e.g.
- which iceoryx version
- which OS
- where does the crash happen, on the publisher or subscriber
- do you have a backtrace
- can you share the content of the struct (the data which can be transferred with shared memory underlies some restrictions)
Yes,the iceoryx version is 2.0.4, and under Ubuntu 18.04.
just when using publishCopyOf to publish the structures, like as:
void xxx::publishData(const MyStruct &data) { publisher.publishCopyOf(data); }
then run application, crash...... BUT, If the structure is defined simply, for example:
struct A {
int a;
}
the fucniton works right.
from iceoryx.
backtrace
*** Segmentation fault
Register dump:
PC(Program-Counter): 0000007f7fcc7ef4
LR(Link-Register): 000000000041ade8
FP(Frame-Pointer): 0000007f7f9225a0
SP(Stack-Pointer): 0000007f7f9225a0
CPSR(Process-State): 0000000060001000
Fault Addr: 0000000000000000
X0: 0000000000000000 X1: 0000007f70001128 X2: 0000000000000000 X3: 0000000000000000
X4: 0000000000423ba4 X5: 0000007f7fe4b180 X6: 0000007f63114000 X7: 0000007f7fe4ad90
X8: 0000007f7f922540 X9: 7878787878787878 X10: 0000000000000000 X11: 0000000000000018
X12: 7878787878787878 X13: 0000007f7fc031a8 X14: 0000007f7fbe2898 X15: 0000007f70003663
X16: 0000007f7fcc7e74 X17: 000000000043d0a0 X18: 0000007f7faa8008 X19: 0000007f63114048
X20: 0000000000000000 X21: 0000007f70001128 X22: 0000007f70000f30 X23: 0000007f7f922730
X24: 0000000000423449 X25: 0000007f70001090 X26: 0000007f70000f30 X27: 0000007f7f9227d8
X28: 0000007f70000ff0
Backtrace:
/usr/lib64/libstdc++.so.6(ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4+0x80)[0x7f7fcc7ef4]
./mcuengine(ZZN3iox3cxx12function_refIFvRNS_4popo6SampleI10ice_ObjectNS_5mepoo12NoUserHeaderEEEEEC4IZNS2_13PublisherImplIS4_S6_NS2_13BasePublisherINS2_17PublisherPortUserEEEE13publishCopyOfERKS4_EUlRT_E_vEEOSJ_ENUlPvS8_E_4_FUNESN_S8+0x60)[0x41ade8]
./mcuengine(ZN3iox4popo13PublisherImplI10ice_ObjectNS_5mepoo12NoUserHeaderENS0_13BasePublisherINS0_17PublisherPortUserEEEE13publishCopyOfERKS2+0x70)[0x41abd8]
./mcuengine(_ZN16IceoryxPublisher17publishStructDataERK10ice_Object+0x44)[0x41a678]
./mcuengine(_ZN9DataWrite19write_0x174_ppsDataERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS6_ESaISt4pairIKS6_iEEEh+0x3c4)[0x41c024]
./mcuengine(_ZN11CANAnalysis16parse_0x174_DataB5cxx11EPKhhh+0x1b4)[0x4179e0]
./mcuengine(_ZN11CANAnalysis12parseCanDataB5cxx11EjRKSt6vectorIhSaIhEEhh+0xfc)[0x4192a0]
./mcuengine(_ZN10CanManager14processMessageERKSt10unique_ptrI7MessageSt14default_deleteIS1_EE+0x180)[0x41ed3c]
./mcuengine(_ZN10McuManager15dispatchMessageEv+0x17c)[0x414320]
from iceoryx.
@lhxsm can you share the data structure you want to publish or at least create one which also triggers the crash based on your custom type?
I'm not quite sure but may it be that a std::string
is part of your custom type?
from iceoryx.
@lhxsm can you share the data structure you want to publish or at least create one which also triggers the crash based on your custom type? I'm not quite sure but may it be that a
std::string
is part of your custom type?
@elBoberido
yes, there is a std::string
field in!!!!, I commented out this field and it works fine.
what should I do if I need to use std::string
? use a char array instead?
from iceoryx.
Unfortunately sending a std::string
won't work (unless you serialize it yourself) as it's using the process local heap. There are a few more restrictions on the types that can be sent through iceoryx. They are documented here.
what should I do if I need to use std::string? use a char array instead?
As a replacement for std::string
you can, for example, use the fixed-size iox::string
.
from iceoryx.
Closing the issue. As @mossmaurice already mentioned, there are restrictions on what can be published with shared memory. For alternatives to STL container and vocabulary types please have a look at iceoryx_hoofs
from iceoryx.
@lhxsm btw, i'm now shamelessly advertising my upcoming startup ;) Mainly because it will be the only one which is providing commercial support for eclipse-iceoryx. It will be added to the README once it is official and of course every company offering iceoryx support has the right to be added to the README. But back to the off-topic. If you are working for a company and need a deep dive into iceoryx or training or other support, you can reach me via my github profile.
from iceoryx.
Related Issues (20)
- Gateway: Support Client/Server in GatewayGeneric HOT 4
- Race condition in 'PoshRuntime' during shutdown
- mutex owner died -> POPO__CHUNK_LOCKING_ERROR HOT 17
- RouDi-GTest Multithread Integration Test HOT 1
- Wrong memory order in MpmcLoFFLi fence synchronization
- Iceoryx support fast-dds HOT 1
- 'NamedPipe' should be more robust
- Listener addEvent deadlock HOT 1
- ChunkHeader should expose the size of the entire user payload section, including padding HOT 6
- Explore cmake object libs for modules iceoryx hoofs HOT 1
- Problems with multiple "persistent" publishers on the same topic at subscriber startup HOT 3
- ssize_t: redefinition; different basic types HOT 3
- Generated files cause recompilation even without any changes HOT 2
- IPC channel still there, doing an unlink of instanceName HOT 5
- Declared but undefined copy assignment operator for iox::expected HOT 1
- Add aliases that conform with other STL container types HOT 2
- Linear search when releasing a sample scales very poorly HOT 38
- Can't directly assign `const` underlying value to `iox::optional` HOT 2
- Question: Multiple Thread Multiple Publisher HOT 2
- Segmentation fault when building with different value for IOX_MAX_CHUNKS_ALLOCATED_PER_PUBLISHER_SIMULTANEOUSLY HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iceoryx.