Closed friebetill closed 2 years ago
Please run the debug binary under lldb
or gdb
and provide a stack trace for the crash.
Yeah I got the crash too when open file dialog in Ubuntu 18.04.5, here is my log when running debug app under lldb
:
(lldb) process launch
Process 20709 launched: '/projects/flutter_plugins/example/build/linux/x64/debug/bundle/example' (x86_64)
flutter: Observatory listening on http://127.0.0.1:38175/tx72RvwUwz0=/
[xcb] Unknown sequence number while processing reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
example: ../../src/xcb_io.c:639: _XReply: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Process 20709 stopped
* thread #1, name = 'example', stop reason = signal SIGABRT
frame #0: 0x00007ffff2652fb7 libc.so.6`__GI_raise(sig=2) at raise.c:51
What is the stack for that abort call?
The crash doesn't occur when I run plugins/file_selector/example/build/linux/x64/debug/bundle/example
with
lldb
, gdb
or It also doesn't crash when I start the program with
flutter run
,flutter run --debug
or flutter run --profile
.It only crashes when I start the example via VSCode.
What is the stack for that abort call?
Do you mean call stack?
I'm not able to reproduce this. Is it a regression from an earlier version of Flutter, or has this never worked for you?
@robert-ancell Any thoughts about the thread abort logging (assuming that's indeed the abort that's in the stack)?
Just in case this will helps, actually I'm running this example project app on Linux
(Ubuntu 18.04.5) but crash after select a file. But it's doing ok while running on MacOS
and Windows
.
I'm not able to reproduce this. Is it a regression from an earlier version of Flutter, or has this never worked for you?
I've been using the library for three weeks (so only with Flutter 2.2.3) and the Linux part didn't work for me from the beginning.
Hello, I am also running into problems with file_selector_linux
crashing when doing file choosing and saving operations. I've prepared reproduction sample code:
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'File Selector Bug',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
child: const Text('Upload File'),
onPressed: () async {
final bytes = await openFiles();
debugPrint('${bytes.length}');
},
),
],
),
),
);
}
}
The crash occurs every time the program is run via IDE. Interestingly, when debugging this reproduction via gdb
, the crash does not occur.
I ran my original program through gdb
to see if I could reproduce the crash, and the only error message I was able to get was
terminate called without an active exception
--Type <RET> for more, q to quit, c to continue without paging--c
Thread 1 "example" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
I hope this is helpful for solving this issue.
Thought it was worth mentioning that I figured out the problem - I was using the snap store version of Flutter. Switching to the regular version solved the issue completely.
Closing, as this plugin has moved to flutter/plugins.
If anyone can still reproduce this in a current version please file an issue in https://github.com/flutter/flutter/issues, or if (per the last comment) it's snap-only, in https://github.com/canonical/flutter-snap
Describe the bug The example app crashes as soon as I try to open a file on Ubuntu 20.04.
Unfortunately, there is no error message, see the attached video: https://user-images.githubusercontent.com/10923085/126900816-89df2ed3-0f85-4a46-a163-829d6b377ffd.mp4
Unfortunately, I don't know how to debug the C++ code either.
Doctor Output Please provide the output of
flutter doctor -v
: