cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Segmentation Fault in C SDK when getting property data from Thingworx

SS_10329829
4-Participant

Segmentation Fault in C SDK when getting property data from Thingworx

Hello community,

 

I define "data0" as number of remote property in Thingworx. In C SDK, I try to get the value in "data0" using tempPrimitive->val.number. However, there is segmentation fault in the command of "tempPrimitive->val.number"

 

twPrimitive *tempPrimitive = 0;
twApi_ReadProperty(TW_THING, thingName"data0", &tempPrimitive, 1000FALSE);
printf("%lf",tempPrimitive->val.number);
 
May I know how to solve the segementation fault issue?
 
Is it related to binary file and library mismatched? If yes, may I know how can I solve mismatched issue?
Thank you.
 
1 REPLY 1
slangley
23-Emerald II
(To:SS_10329829)

Hi @SS_10329829.

 

What version of the c-SDK are you running?  Can you send the full code so we have a better idea around the library you're using?

 

Regards.

 

--Sharon

 

Announcements


Top Tags