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

Supporting 2.7 and 3.2+
Post Reply
greddy
Fresh meat
Posts: 2
Joined: Sat Jul 08, 2017 7:22 am
Contact:

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

Post 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
Last edited by greddy on Sat Jul 08, 2017 10:30 am, edited 1 time in total.
greddy
Fresh meat
Posts: 2
Joined: Sat Jul 08, 2017 7:22 am
Contact:

Re: Bug Report - Seg Fault using Python Example Code

Post 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)
MAKOMO
Fresh meat
Posts: 4
Joined: Mon Jul 10, 2017 11:38 pm
Contact:

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

Post 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?
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

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

Post by Patrick »

These bugs are fixed in the latest release (Available sometime in the next hour).

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests