logo

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Roberto Dias  
#1 Posted : Thursday, June 11, 2015 7:17:11 AM(UTC)
Roberto Dias

Rank: Member

Joined: 4/15/2015(UTC)
Posts: 12
Location: Florianópolis

Was thanked: 5 time(s) in 5 post(s)
Dear colleagues,

Do you report some incompatibility in the use of UA_SDK and Posix Threads (Pthreads)?
I need a simple timer thread in my application to pooling my OPC-UA server and my code crash when execute Browse Method (adapted by Lesson 6), with "Segmentation fault (core dumped)" error.

Best Regards!
thanks 1 user thanked Roberto Dias for this useful post.
Offline Patrick Griffiths  
#2 Posted : Thursday, June 11, 2015 7:36:16 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
No. We actually use pthreads in the implementation. But you're not giving me much to go on.

What version of Linux are you using? Can you provide a stack trace of the segfault'ing thread? Your best bet to get us to look at it would be to post a minimal sample (e.g. one file) that reproduces the bug.

Cheers,
Patrick
thanks 1 user thanked Patrick Griffiths for this useful post.
Offline Roberto Dias  
#3 Posted : Thursday, June 11, 2015 10:10:10 AM(UTC)
Roberto Dias

Rank: Member

Joined: 4/15/2015(UTC)
Posts: 12
Location: Florianópolis

Was thanked: 5 time(s) in 5 post(s)
Dear Patrick,

Thanks for your quickly reply.

I use a overloaded version of Browse() Method of UaCLient Class im my application based in SampleUaConsole example provided by UA_SDK.
Please download my modified file SampleUaCOnsole.cpp and my Main.cpp file in the link (Google Drive share - .rar file) below:

https://drive.google.com...V205ek0/view?usp=sharing

See below the output of my program

adminuser@adminuser-VirtualBox:~/MatrikonOPC/Client/GMG/SampleUaConsole/Debug$ ./SampleUaConsole

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]

Directory = [/home/adminuser/MatrikonOPC/Client/GMG/SampleUaConsole/Debug/PKI]
Allways ok before loop
x
Segmentation fault (core dumped)
adminuser@adminuser-VirtualBox:~/MatrikonOPC/Client/GMG/SampleUaConsole/Debug$ ^C

I use a virtual Machine (VirtualBox) with:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

My gcc version is 4.8.

Best Regards!!!

thanks 1 user thanked Roberto Dias for this useful post.
Offline Patrick Griffiths  
#4 Posted : Friday, June 12, 2015 8:16:33 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Time is in short supply, but we'll try to have a look in the next few days.

Patrick
thanks 1 user thanked Patrick Griffiths for this useful post.
Offline Patrick Griffiths  
#5 Posted : Thursday, June 18, 2015 9:15:31 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Hi Roberto, sorry for the delay getting back to you.

I had a look at the archive you provided. It doesn't contain a self contained example, and unfortunately I don't have the time to spend making it build. If you can provide a complete sample that reproduces the bug, I'd be happy to look at it, but it really needs to be either a single cpp file, or there must be a makefile or VS solution. I don't mind changing include and lib paths to pick-up the SDK, but anything more than that is really beyond the scope of the support I can offer.

Cheers,
Patrick

Edited by user Thursday, June 18, 2015 9:16:28 AM(UTC)  | Reason: Typo

Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Matrikon Subscribe  |   Matrikon Unsubscribe  |   Global Unsubscribe  |   Privacy Statement  |   Your Privacy Choices   |   Cookie Notice