Skip to content

Index out of range, When selecting the EngineOpenGL #32

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

Closed
rodolfoaguiar opened this issue Nov 27, 2018 · 6 comments
Closed

Index out of range, When selecting the EngineOpenGL #32

rodolfoaguiar opened this issue Nov 27, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@rodolfoaguiar
Copy link

rodolfoaguiar commented Nov 27, 2018

Hi, I made a app to receive data from internet (on the flutter side) and persist on the SQLite (using the JSONMessageCodec and the pluginReceiver) but I'm receiving this error sometimes when the memory usage exceeds 200mb

panic: runtime error: index out of range
goroutine 17 [running, locked to thread]:
github.com/Drakirus/go-flutter-desktop-embedder/flutter.proxy_make_current(0x6812490, 0x4320870)
/go/src/github.com/Drakirus/go-flutter-desktop-embedder/flutter/flutter_proxy_glfw.go:43 +0xd2
github.com/Drakirus/go-flutter-desktop-embedder/flutter._cgoexpwrap_e5bc8fd1c1b7_proxy_make_current(0x6812490, 0x23ff7e00)
_cgo_gotypes.go:376 +0x2b

Am I doing something wrong?

Thanks.

@pchampio
Copy link
Member

pchampio commented Nov 27, 2018

No, you are not doing something wrong, it's an embedder crash.
Can you change this Line to return C.bool(flutterEngines[0].FMakeCurrent(v)), and see if the error still occurs?

Also, "when the memory usage exceeds 200mb", you are speaking of the embedder's memory usage? (or SQLite, ..?)

Thanks for the feedback!

@pchampio pchampio added the MacOS Specifically concerns MacOS label Nov 28, 2018
@rodolfoaguiar
Copy link
Author

Thanks for your help.

I changed the code but now I have the same error on the 57 line
return C.bool(flutterEngines[index].FPresent(v))

I tried to change to index 0 too but the error persist

return C.bool(flutterEngines[0].FPresent(v))

panic: runtime error: index out of range

goroutine 17 [running, locked to thread]:
github.com/Drakirus/go-flutter-desktop-embedder/flutter.proxy_present(0x6901fa0, 0x43208b0)
/Users/rodolfoaguiar/go/src/github.com/Drakirus/go-flutter-desktop-embedder/flutter/flutter_proxy_glfw.go:57 +0xd2
github.com/Drakirus/go-flutter-desktop-embedder/flutter._cgoexpwrap_a100b3ae5f80_proxy_present(0x6901fa0, 0x69169a0)
_cgo_gotypes.go:402 +0x2b

Any ideias ?

About the memory, I was speaking about the embedder's memory.

Thanks.

@pchampio pchampio changed the title Error when running on MacOs Error when the memory usage exceeds 200mb Nov 28, 2018
@pchampio pchampio changed the title Error when the memory usage exceeds 200mb Index out of range, When selecting the EngineOpenGL Nov 28, 2018
@pchampio pchampio added Windows Specifically concerns Windows Linux Specifically concerns Linux labels Nov 28, 2018
@pchampio
Copy link
Member

pchampio commented Nov 28, 2018

I managed to reproduce the error on linux, I don't thinks it's related to the size of the embedder's memory. I didn't find a setup to reproduce the errors, it's kind of random.

The EngineOpenGL is stored globally at the moment.
This error might come from the Golang Memory management.

@pchampio pchampio added the bug Something isn't working label Nov 28, 2018
@rodolfoaguiar
Copy link
Author

Thanks for your help

@GeertJohan
Copy link
Member

@rodolfoaguiar Can you please try if this problem still occurs with the most recent version of this package? Make sure to update both the go-getted package (go get -u -a github.com/Drakirus/go-flutter-desktop-embedder) and any sources you have manually cloned.

If this problem still occurs, can you share a standalone project that reproduces the issue, so I may try to debug this.

@GeertJohan GeertJohan removed Linux Specifically concerns Linux MacOS Specifically concerns MacOS Windows Specifically concerns Windows labels Feb 17, 2019
@GeertJohan
Copy link
Member

Without more information it's hard for us to reproduce the described behaviour. Also, a lot has changed in the way engine lookups work, and some bugs that may have caused this error were fixed. Please open a new issue if the problem still occurs with the latest version of go-flutter.

@GeertJohan GeertJohan unpinned this issue Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants