Open johnkenedyong opened 6 years ago
https://stackoverflow.com/questions/46241071/create-signature-area-for-mobile-app-in-dart-flutter
import 'package:flutter/material.dart';
class SignaturePainter extends CustomPainter {
SignaturePainter(this.points);
final List<Offset> points;
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()
..color = Colors.black
..strokeCap = StrokeCap.round
..strokeWidth = 5.0;
for (int i = 0; i < points.length - 1; i++) {
if (points[i] != null && points[i + 1] != null)
canvas.drawLine(points[i], points[i + 1], paint);
}
}
bool shouldRepaint(SignaturePainter other) => other.points != points;
}
class Signature extends StatefulWidget {
SignatureState createState() => new SignatureState();
}
class SignatureState extends State<Signature> {
List<Offset> _points = <Offset>[];
Widget build(BuildContext context) {
return new GestureDetector(
onPanUpdate: (DragUpdateDetails details) {
setState(() {
RenderBox referenceBox = context.findRenderObject();
Offset localPosition =
referenceBox.globalToLocal(details.globalPosition);
_points = new List.from(_points)..add(localPosition);
});
},
onPanEnd: (DragEndDetails details) => _points.add(null),
child: new CustomPaint(painter: new SignaturePainter(_points)),
);
}
}
class DemoApp extends StatelessWidget {
Widget build(BuildContext context) => new Scaffold(body: new Signature());
}
void main() => runApp(new MaterialApp(home: new DemoApp()));
It does not work, and print this:
**type=1400 audit(0.0:2500): avc: denied { read } for name="gpuclk" dev="sysfs" ino=21020 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0**
W/Adreno-ES20( 9965): **<get_gpu_clk:229>: open failed: errno 13**
Hi @zoechi , @Jierain , @johnkenedyong anyone update solve this error? same error issue when using platform channel and broadcast receiver
D/com.asriworks.pos.ekios_cashlez.EkiosCashlezPlugin(10334): success : cashlez application FOUND D/ResponseReceiver(10334): {ReturnUrl=, ReturnStatus=Success, ReturnMessage=Payment successful} W/Adreno-ES20(10334): <get_gpu_clk:229>: open failed: errno 13 I/OpenGLRenderer(10334): Initialized EGL, version 1.4 D/OpenGLRenderer(10334): Swap behavior 1 W/Adreno-ES20(10334): <get_gpu_clk:229>: open failed: errno 13
Hi @johnkenedyong @irpankusuma You code sample is incomplete, i even tried to add missing but not able to reproduce the issue Can you please provided minimal code sample?
@Jierain
Running your code sample Adreno GPU based physical device Oneplus 2 has no such error in the logs in latest (Channel stable, v1.17.1
, Adreno-ES20
probably Adreno GPU?
Can you list device you noticed this error in?
Thank you
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
I have a Moto E4 and can, at least at the moment reliably produce this error. Sample code here: https://gist.github.com/JesseRMeyer/ff69fcaf00e02dc794990f1d947121a8
It's essentially just a log in screen that leverages a few common examples and community packages.
Most important observation is that this error occurs: After launch() is called, which opens and directs Chrome to a (redacted) website. Chrome is closed and the focus is returned to the app. As the app is returning focus, the error is shown on VS Code's debug console.
[flutter] flutter doctor -v
[√] Flutter (Channel stable, v1.17.3, on Microsoft Windows [Version 10.0.18363.900], locale en-US)
• Flutter version 1.17.3 at C:\dev\flutter
• Framework revision b041144f83 (12 days ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\dev\Android
• Platform android-29, build-tools 29.0.3
• ANDROID_SDK_ROOT = C:\dev\Android
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.46.0)
• VS Code at C:\Users\Jesse Meyer\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.11.0
[√] Connected device (1 available)
• Moto E 4 • ZY2245BRZN • android-arm • Android 7.1.1 (API 25)
• No issues found!
exit code 0
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution.
The poor bot despite its best efforts appears to be erroneously closing the issue. Commenting to re-open.
Sorry, forgot to remove the label. The bot was just doing its job!
Hi @JesseRMeyer @johnkenedyong and anyone else that faced this issue, can you check if this still reproduces on the latest stable version of flutter?
Steps to Reproduce
Logs
Flutter Doctor