Closed apiraino closed 2 years ago
what distro are you using?
can you do ldd /bin/true
(if it works for you) and give me the output?
thanks for the quick reply!
I am compiling with debian testing (bookworm):
$ ldd /bin/true
linux-vdso.so.1 (0x00007fff6a1d3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe02577a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe025960000)
and on the ODROID with their Android 9 distro (ldd
not present there):
I think the error happens on the device. After some hacking with your Android patches from September 2020 (basically replacing s/libc.so.6/libc.so/g
in lib/src/gpiod.dart
I could make it start on the ODROID. But then I am blocked with an error when polling the GPIO ports:
I/flutter ( 5597): GpiodChip(index: 0, name: 'gpiochip0', label: 'aobus-banks', numLines: 16)
...
I/flutter ( 5597): GpiodChip(index: 1, name: 'gpiochip1', label: 'periphs-banks', numLines: 86)
...
E/flutter ( 5597): [ERROR:flutter/runtime/dart_isolate.cc(1138)] Unhandled exception:
E/flutter ( 5597): Could not wait for GPIO events., epoll_wait: Interrupted system call
E/flutter ( 5597): #0 _eventIsolateEntry (package:flutter_gpiod/src/gpiod.dart:150:7)
E/flutter ( 5597): #1 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:286:17)
E/flutter ( 5597): #2 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
I'm not 100% sure but it looks like I can read the GPIO lines but fail to poll them, makes sense?
I think the error happens on the device. After some hacking with your Android patches from September 2020 (basically replacing
s/libc.so.6/libc.so/g
inlib/src/gpiod.dart
I could make it start on the ODROID.
Ah, yeah that makes sense. I should probably add some tests to make sure this doesn't regress again (it was working fine on android once)
But then I am blocked with an error when polling the GPIO ports:
I/flutter ( 5597): GpiodChip(index: 0, name: 'gpiochip0', label: 'aobus-banks', numLines: 16) ... I/flutter ( 5597): GpiodChip(index: 1, name: 'gpiochip1', label: 'periphs-banks', numLines: 86) ... E/flutter ( 5597): [ERROR:flutter/runtime/dart_isolate.cc(1138)] Unhandled exception: E/flutter ( 5597): Could not wait for GPIO events., epoll_wait: Interrupted system call E/flutter ( 5597): #0 _eventIsolateEntry (package:flutter_gpiod/src/gpiod.dart:150:7) E/flutter ( 5597): #1 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:286:17) E/flutter ( 5597): #2 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
I'm not 100% sure but it looks like I can read the GPIO lines but fail to poll them, makes sense?
That's most likely a bug inside flutter_gpiod. Interrupted system call
is the description for the EINTR
errno, which is an indication that a signal was handled (i.e. things like SIGTERM
) and the system call should just be restarted. Seems like it's just bad luck you get a lot of signals in your case, on raspberry pi I never had that error.
What flutter_gpiod should be doing is running every syscall, including epoll_wait
, in a loop until either it executed successfully or failed with an error != EINTR
I think this is working now.
confirmed (and sorry for getting back to you)
thank you @ardera so much for your help :)
hello!
I'm trying to compile and deploy a sample application ODROID C4 but when I run the app it crashes:
Do I need to install anything on my development machine (like, the Android NDK?). Is the ODROID C4 supported?
thanks!