Page 1 of 1

Bug Report - Seg Fault using C & Python Example Code - VoltageOutput (Phidget_1002 DAC)

Posted: Sat Jul 08, 2017 8:49 am
by greddy
hardware: Phidget_1002: (4-channel DAC Voltage Output)
platforms: Ubuntu 16.04 NUC and MBPro (OS X 10.12.5 Sierra)
software: HelloWorld.py, VoltageOutput.py
language: python3 (3.6.1), python (2.7.13)

We installed the Phidget software on the above platforms, and tested that the Phidget_1002 is recognized (attach/detach) using the Phidget Control Panel and HelloWorld.c programs.
However, when running the Python programs:

Code: Select all

sudo python3 HelloWorld.py
We receive a "Segmentation fault: 11" on the MBPro and "Segmentation fault (core dumped)" on the Ubuntu NUC.

These errors appear to occur when trying to access the properties of a phidget (e.g. phidget.getDeviceSerialNumber() or getDeviceClassName(), etc..)

Also, the VoltageOutput.py program does not recognize the attachment/detachment of the Phidget_1002, which may/may not be related.

Any insight into resolving these issues would be greatly appreciated.
Thank You,
Goutam Reddy

Re: Bug Report - Seg Fault using Python Example Code

Posted: Sat Jul 08, 2017 10:29 am
by greddy
When running the C example VoltageOutput_Example

Code: Select all

sudo ./VoltageOutput_Example
, these were the following errors. (Ubuntu 16.04 NUC)

Code: Select all

... (repeated)... 
INFO [phidget22][2017-07-08T11:24:29 usb.c+458 PhidgetUSBReadThreadFunction()]: PhidgetAnalog 4-Output(1002) (493917): ReadThread exiting normally (Phidget detached)
INFO [_phidget22usb][2017-07-08T11:24:29]:Using Control Endpoint for Host->Device communication.
INFO [phidget22][2017-07-08T11:24:29 usb.c+391 PhidgetUSBReadThreadFunction()]: PhidgetAnalog 4-Output(1002) (493917): ReadThread starting
ERR [phidget22][2017-07-08T11:24:29 voltageoutput.gen.c+83 _bridgeInput()]: PhidgetVoltageOutput: DEVBRIDGEINPUT() failed: 57
ERR [phidget22][2017-07-08T11:24:29 voltageoutput.gen.c+184 _setDefaults()]: PhidgetVoltageOutput: failed to set [enabled] default: 57
ERR [phidget22][2017-07-08T11:24:29 phidget.c+694 attachLocalChannel()]: failed to set defaults for PhidgetVoltageOutput: 0x39
INFO [_phidget22usb][2017-07-08T11:24:29]:
INFO [phidget22][2017-07-08T11:24:29 usb.c+458 PhidgetUSBReadThreadFunction()]: PhidgetAnalog 4-Output(1002) (493917): ReadThread exiting normally (Phidget detached)
INFO [_phidget22usb][2017-07-08T11:24:29]:Using Control Endpoint for Host->Device communication.
INFO [phidget22][2017-07-08T11:24:29 usb.c+391 PhidgetUSBReadThreadFunction()]: PhidgetAnalog 4-Output(1002) (493917): ReadThread starting
ERR [phidget22][2017-07-08T11:24:29 voltageoutput.gen.c+83 _bridgeInput()]: PhidgetVoltageOutput: DEVBRIDGEINPUT() failed: 57
ERR [phidget22][2017-07-08T11:24:29 voltageoutput.gen.c+184 _setDefaults()]: PhidgetVoltageOutput: failed to set [enabled] default: 57
ERR [phidget22][2017-07-08T11:24:29 phidget.c+694 attachLocalChannel()]: failed to set defaults for PhidgetVoltageOutput: 0x39
INFO [_phidget22usb][2017-07-08T11:24:29]:
Channel did not attach after 5 seconds: please check that the device is attached
Segmentation fault (core dumped)

Re: Bug Report - Seg Fault using C & Python Example Code - VoltageOutput (Phidget_1002 DAC)

Posted: Mon Jul 10, 2017 11:43 pm
by MAKOMO
On running HelloWorld.py on the driver/lib v22 I receive the same

Code: Select all

Segmentation fault: 11
on my MB12" running on OS X 10.12.5 Sierra. Seems to be caused by the getDeviceSerialNumber() called on the manager object that might not be fully initialised. Any update on this?

Re: Bug Report - Seg Fault using C & Python Example Code - VoltageOutput (Phidget_1002 DAC)

Posted: Wed Jul 12, 2017 3:58 pm
by Patrick
These bugs are fixed in the latest release (Available sometime in the next hour).

-Patrick