-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code: Lost connection to device. #125
Comments
Hi @FluffyBunniesTasteTheBest, thanks for reporting your findings. This issue seems related to the closed #122, but seems something similar is happening here.
with this:
I think this should be fixed too. Thanks |
@alnitak Thank you very much for the fast response! The connection to the debugger stays now active. However, during the first start, the app was stuck for longer than a minute at
After about two minutes, I've uninstalled the app and retried again. At the third attempt it finished loading after 79 seconds:
Once the app went through the complete initialization, subsequent starts finished the audio setup in less than two seconds:
All this happened in debug builds running on Android 12 and 13 devices. BTW, is there a way to wipe all data from flutter_soloud? Again, thank you very much for your help. |
Even if I think the delay you are experiencing is a way a lot of time, probably is it due to loading big audio files? Would really help a lot to have a minimal example (ie just the SoLoud.init() and no third-party packages) with the OGGs files you used. I know that out there there are OGG files with non standard header files that could cause errors when loading, but anyway, my suggestion is to try loading audio with mode: LoadMode.disk parameter. Without that the whole audio is decompressed and stored into memory and this takes its time. If you don't need to use the
The only data that flutter_soloud stores, are the cached audio files. You can pass the automaticCleanup = true parameter to the Please, you are welcome to post any thoughts! |
@alnitak Again, thanks for your help. Much appreciated! The files are all rather short - the longest is about 20 seconds. I'll try to create a minimum example, but it will take a while - the app uses 50+ packages and they have to be remove one after another, as it could be that another package is related to it. Beside that, I'm on my (very much deserved) vacation this week. ;-) Please give me some time... |
Sure! Take your time. I think that if you start a new project from scratch it will be relatively faster! :)
Just to be sure it's a flutter_soloud problem and not one of the other 49! |
Thank you very much for providing flutter_soloud.
Description
When running the app on an Android (12, 13, 14) device, it occassionally happenes that VS Code loses the connection to the device while the app is starting. If the connection gets lost, debug console shows the following:
First time this got noticed was after upgrading from version 2.0.2 to 2.1.1. With the current 2.1.2 version it happens so frequently that it impacts work, hence downgrading to 2.0.2 was necessary.
Expected Behavior
The connection to VS Code's debugger shouldn't be closed.
Additional Context
Another thing, that could be related to it, is that in debug build, it sometimes takes up to half a minute until the app finishes loading the audio files. In release builds it works fine though and the same files are loaded in about a second.
Could this be related to the content of the (ogg) audio files? If the app starts, they are playing just fine though...
Sorry for not being able to provide any more details, but I thought you might be interested in knowing about it anyway.
The text was updated successfully, but these errors were encountered: