wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

[Windows][Linux] Can't launch the app in debug mode #125

Closed JulienDev closed 3 months ago

JulienDev commented 3 months ago

Describe the bug I added Fvp v0.22.0 on Windows and Linux and the app is not launching anymore in debug mode. On other platforms MacOS/Android/iOS the app is launching in debug mode.

In release mode this is working fine on all platforms.

Flutter version: 3.22.3

Log Windows

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
FVP_DEPS_LATEST=
√ Built build\windows\x64\runner\Debug\player.exe
Problem getting monitor brightness
Debug service listening on ws://127.0.0.1:50118/s2r1Bx8b5VQ=/ws
Syncing files to device Windows...

Linux

Launching lib/main.dart on Linux in debug mode...
Building Linux application...
FVP_DEPS_LATEST=
✓ Built build/linux/x64/debug/bundle/expert
0.29.0 (git 0a3bd27) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author) <wbsecg1 at [[gmail.com](http://gmail.com/)](http://gmail.com/)>
Build for: Linux 4KB x86_64; glibc2.24/2.39 libc++190000; Clang19.0.0 (++20240721042146+d69eb7b7ffb3-1~exp1~20240721042318.1816); 12:06:18 Jul 21 2024
Debug service listening on ws://127.0.0.1:40435/Y8fDJmQnUEQ=/ws
Syncing files to device Linux...

- * (expert:26950): WARNING **: 11:05:37.482: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:37.482: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:44.833: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:44.976: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:46.224: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:46.688: Unable to retrieve framework response: Message is not valid JSON
- * (expert:26950): WARNING **: 11:05:59.130: Unable to retrieve framework response: Message is not valid JSON
wang-bin commented 3 months ago

can you debug in gdb?

JulienDev commented 3 months ago

Sorry but I don't know how I can debug it 😔

Le ven. 2 août 2024, 17:44, WangBin @.***> a écrit :

can you debug in gdb?

— Reply to this email directly, view it on GitHub https://github.com/wang-bin/fvp/issues/125#issuecomment-2265676723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARNMK4EBKUK7CFTBASWJLZPOSODAVCNFSM6AAAAABL4YVF7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRVGY3TMNZSGM . You are receiving this because you authored the thread.Message ID: @.***>

wang-bin commented 3 months ago

gdb path_of_executable, then you will be in gdb interactive mode, type r and return, then your app will run. If app crashes, show me gdb output

JulienDev commented 3 months ago

Thanks! The problem seems only to happen with Android Studio because when I launch the app by running build/linux/x64/debug/bundle/myapp everything is working perfectly. If I launch it using "flutter run" it works too.

wang-bin commented 3 months ago

On other platforms MacOS/Android/iOS the app is launching in debug mode.

The problem seems only to happen with Android Studio because when I launch the app by running build/linux/x64/debug/bundle/myapp everything is working perfectly.

I don't understand, which target fails?

JulienDev commented 3 months ago

When I run the app in debug mode from Android Studio by pressing the "run button":

When I run the app in debug mode using "flutter run":

I don't know exactly why it's happening, maybe it's related to hotreload or something like that 🤷🏻‍♂️

wang-bin commented 3 months ago

android studio only supports android. why do you run win/linux in android studio? it's impossible.

JulienDev commented 3 months ago

No no, Android Studio supports all flutter targets: web, android, ios, windows, linux For example, this is a screenshot on my Mac, as you can see we can select the target we want to launch. Then hot reload will work fine on every target.

image

On Android Studio for Windows I can select windows target On Android Studio for Linux I can select linux target

Before adding FVP the app was launching perfectly for all targets

wang-bin commented 3 months ago

Please enable log following issue template, and paste the log

wang-bin commented 3 months ago

I can run linux in android studio without error

JulienDev commented 3 months ago

Ok, I think it's due to my project configuration because the sample is running fine. Will post a solution later if I find the reason. Thanks for your time 🙏🏻

Bonfra04 commented 3 months ago

Hi, just to add some more context: I'm experiencing the same issue with the integrated vscode debugger. Running from the CLI flutter run ... works just fine. It seems like the debugger is not able to attach until some hot reloads. The logs are virtually the same so it might be something related to the IDEs.

wang-bin commented 3 months ago

Hi, just to add some more context: I'm experiencing the same issue with the integrated vscode debugger. Running from the CLI flutter run ... works just fine. It seems like the debugger is not able to attach until some hot reloads. The logs are virtually the same so it might be something related to the IDEs.

IDE or debugger bug