×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Weird segmentation fault when calling IUFillNumber

  • Posts: 49
  • Thank you received: 12
Ive been struggling several nights now with getting by raspi camera driver working with gain settings. It works if I don't add the properties for gain, but when I add it, i get SIGSEGV inside a strncpy. Has anyone seen something like this. Ive debugged down to assembler code and its just one write to memory that is otherwise fine.
This happends when I add this line:

IUFillNumber(&mGainN[0], "GAIN", "Gain", "%.f", 1, 16.0, 1, 1);

Ive run it with electric fence memory checking and it is quite clear it is in the strncpy of the field name that is failing...

Any ideas? My hair is getting thinner and thinner.

Regards, Lars
3 years 10 months ago #54986

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 12
Ok, I think I have found it. Forgetting an external declaration of your drivers std::unique_ptr<YourDriverClass> global pointer can have really weird effects. I don't know why, but any member outside the INDI::CCD part of your class was write-protected.
3 years 10 months ago #54994

Please Log in or Create an account to join the conversation.

Time to create page: 0.161 seconds