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

Editor hangs when playing more than one time #523

Closed
nospoone opened this issue Jan 24, 2024 · 5 comments
Closed

Editor hangs when playing more than one time #523

nospoone opened this issue Jan 24, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@nospoone
Copy link

nospoone commented Jan 24, 2024

Describe the bug
Hello! It seems that I can't play the game more than once in the editor. The editor will simply hang on subsequent plays, with either the indeterminate progress bar (Hold on...) or without any indications whatsoever.

To Reproduce
I've attached a minimal reproduction case, without my config:

  • Open project
  • Fill dev portal configuration (although invalid config will also trigger this)
  • Open Scenes/SampleScene.unity
  • Hit Play in the editor;
  • Check console for initResult = Success;
  • Stop, and hit Play again in the editor;
  • Unity should be either stuck without a progress dialog, or showing the Hold on dialog with the indeterminate progress bar;

Expected behavior
Being able to hit Play more than once 😁

Desktop:

  • OS: Windows 11 x64
  • Editor only (works correctly in builds)
  • 2022.3 (tried a couple of minor versions, the repro case uses 2022.3.11)
  • 3.0.3, installed from the tarball (but using git also reproduces the issue)

Additional context
The plugin reports that it connects correctly the first time. While it doesn't show anything in the console for the subsequent times (since the editor never switches to actually playing,) the last line of Editor.log shows initResult = AlreadyConfigured.

For now, I'll install the package locally and try to step through Init to see what's going on, but still wanted to report in case I'm just doing something dumb!

@nospoone
Copy link
Author

Here's my finding from spending a little bit of time on this:
It seems that execution stops here... I haven't worked with any of the Win32 APIs or even C in a long time, but it seems that FreeLibrary is somehow (as per Rider's debugger) never returning—which I'm not even sure how that works.

I ran out of time to dig further, unfortunately!

@paulhazen paulhazen self-assigned this Jan 25, 2024
@paulhazen
Copy link
Collaborator

paulhazen commented Jan 25, 2024

I'm installing that version of Unity in order to try and reproduce this bug. A few thoughts while that does its thing though:

  1. It's possible that the issue is using a version of Unity that the plugin does not currently officially support.
  2. The EOS SDK (and Unity) use both threading and the loading of libraries in ways that are not conducive to pause / play. I suspect that some of the threading that happens in the EOS SDK is unhappy with being paused.
  3. Admittedly, I am less familiar with Rider than I would like to be, but there might be a complication with using Rider. While I'm uncertain if we have this documented, we primarily use Visual Studio. I would be curious to know if you experience the same issue using Visual Studio.

I'll get back to you once I have tested it myself.

@paulhazen paulhazen added the bug Something isn't working label Jan 25, 2024
@paulhazen
Copy link
Collaborator

Okay - I got to the bottom of it. The issue was that the plugin was not completely set up to function properly in your project. Specifically, the following steps do not appear to have been taken in your minimal example eos-hang:

image

The full document on configuring the plugin can be seen here.

Once I followed those steps, I was able to play, pause, play, pause to my heart's content :)

If, after following those steps, you're still running into issues, please feel free to re-open this issue. Having your minimal example was super helpful, thank you for that. If you have another issue, providing something like that again would definitely be awesome.

@nospoone
Copy link
Author

Adding the prefab indeed fixes my issue! Thanks for taking the time to look into it, and sorry it was something as simple as not reading the instructions.

in case I'm just doing something dumb!

It was indeed the case ☝️

Having your minimal example was super helpful, thank you for that.

Least I could do!

@paulhazen
Copy link
Collaborator

Adding the prefab indeed fixes my issue! Thanks for taking the time to look into it, and sorry it was something as simple as not reading the instructions.

in case I'm just doing something dumb!

It was indeed the case ☝️

haha no problem. I tend to be of the opinion if instructions are not being read, they can probably be written better, so this helps us improve things :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants