GPIO crash

Jen Dority jen.dority at oracle.com
Mon Jul 14 21:58:02 UTC 2014


Hi Tristan,

I have entered a bug for this issue. It may be tracked at 
https://bugs.openjdk.java.net/browse/JDK-8050397.

Thanks,
Jen

On 7/14/2014 10:45 AM, Tristan Linnell wrote:
> Hi guys,
>
>
> I am adding a simple PinListener to a GPIO pin on a RaspberryPi board and
> the latest DeviceIO (Revision 12), cross-compiled from source.
>
>
> I am seeing a NullPointerException being thrown from the DeviceIO
> EventQueue.
>
>
> The same problem exists when running on both Arch Linux and Raspbian.
>
>
> I am using the same pin configuration as GPIOInputSample.java:
>
>
> GPIOPinConfig pinConfig = new GPIOPinConfig(0,
>
>                      22,
>
>                      GPIOPinConfig.DIR_INPUT_ONLY,
>
>                      GPIOPinConfig.DEFAULT,
>
>                      GPIOPinConfig.TRIGGER_RISING_EDGE |
> GPIOPinConfig.TRIGGER_FALLING_EDGE,
>
>                      true);
>
>
> GpioPin toRead = (GPIOPin)DeviceManager.open(GPIOPin.class, pinConfig);
>
>
> toRead.setInputListener((PinEvent e) -> System.out.println(e.getValue()));
>
>
>
> I have physically attached the pin to a rotary encoder. After around 50 or
> so events which are correctly logged to the console as expected, I receive
> the following NullPointerException:
>
>
> Exception in thread "Thread-1"
>
> true
>
> java.lang.NullPointerException
>
> at com.oracle.dio.impl.EventQueue$NativeMethodThread.run(EventQueue.java:91)
>
> at java.lang.Thread.run(Thread.java:744)
>
>
>
> Thank You,
>
> Tristan Linnell



More information about the dio-dev mailing list