Skip to content
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

App scene does not appear properly in MacOs #234

Open
signalsaeed opened this issue May 27, 2021 · 15 comments
Open

App scene does not appear properly in MacOs #234

signalsaeed opened this issue May 27, 2021 · 15 comments

Comments

@signalsaeed
Copy link

The app scene window in comes into the task bar (dock), but not shown as window in mac. it happens randomly. Do you have any Idea why the app scene behaves like this? and any fix?

@danaugrs
Copy link
Member

danaugrs commented Jun 9, 2021

Can you post a screenshot? It might be an issue with go-gl/glfw. Could you run the example in their readme and check if it has the same behavior?

@signalsaeed
Copy link
Author

signalsaeed commented Jun 10, 2021

for the screenshot, I can say when the app scene appear randomly, I get following code in my terminal:
7:45:58.961403:I::OpenGL version: 4.1 INTEL-16.4.5
if the app scene does not pop out, above message does not appear on terminal and the only exec icon appear on deck.
system:mac, Darwin 20.5.0

@signalsaeed
Copy link
Author

@danaugrs I run the example in the go-gl/glfw and it works well. it is working with glfw v3.3 , however g3n is still on v3.2
is it possible to merge this PR or introduce a shortcut before its merge ;)

@danaugrs
Copy link
Member

I had updated g3n to use glfw v3.3 in 6938345 - I just closed the PR you mentioned and associated issue.
I also recently updated g3n to use the very latest go-gl/glfw in de78e3c.
Please try again with the latest version of g3n and let me know!

@signalsaeed
Copy link
Author

Thank you @danaugrs . I will try it and let you know.

@danaugrs
Copy link
Member

Any improvement @signalsaeed ?

@signalsaeed
Copy link
Author

NO Unfortunately, the problem was not related to the glfw version. During my tries and errors, I found out that if I put my code in one function it works and if I spread the code through different files in go packages, it will have the same random app scene problem. the random appearing of the app scene, may be related to threading whereas with some threads, it appears and in some threads , it does not.

@signalsaeed
Copy link
Author

I also should add that I am using a mesh file for the graphic part.

@danaugrs
Copy link
Member

Interesting - unfortunately I can't debug/reproduce this as I don't have a Mac. If you put together a minimal reproducible example, Mac folks might be able to investigate further @mat007 @SamTov

@signalsaeed
Copy link
Author

Yeah, I can manage a minimal reproducible piece of code to check what would be the problem as the issue draws my curiousness ;)

@SamTov
Copy link

SamTov commented Jul 24, 2021

Sure I can test it if you have some example code.

You're using an Intel Mac right @signalsaeed?

@signalsaeed
Copy link
Author

@SamTov, sure I can prepare an example code that reproduce the problem.

I am using Intel mac.

@signalsaeed
Copy link
Author

Dear @SamTov,

I uploaded a reproducible piece of code which randomly appear the app scene in my mac.
link:
https://drive.google.com/file/d/1wZwA5GYoBIE-3K7K-qi9E7IGF02UfVfe/view?usp=sharing
please let me know if you need further information.

@Noushed
Copy link

Noushed commented Sep 8, 2021

Hi @SamTov, did you manage to reproduce the issue?

@aymanbagabas
Copy link

I can confirm adding this to main solves the issue here.

func init() {
	// This is needed to arrange that main() runs on main thread.
	// See documentation for functions that are only allowed to be called from the main thread.
	runtime.LockOSThread()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants