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 Freezes When Stopping Play Mode During WarmUp() #280

Open
YsmanKhamidullin opened this issue Nov 30, 2024 · 2 comments
Open

Editor Freezes When Stopping Play Mode During WarmUp() #280

YsmanKhamidullin opened this issue Nov 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@YsmanKhamidullin
Copy link

Describe the bug

I am experiencing an issue in the Unity editor where the editor freezes if I stop Play Mode before the WarmUp() method completes.
Expected Behavior:
The editor should stop Play Mode without freezing, regardless of whether the warm-up process is complete.

Actual Behavior:
The editor freezes until the warm-up process is complete, making it unresponsive.

What I Tried:
I attempted to cancel the LLM generation using the following code:

private void OnApplicationQuit()
{
    StopAll();
}

private void StopAll()
{
   _llmCharacter.CancelRequests();
}

public void WarmUp(Action onCompleteWarmUp)
{
    _ = _llmCharacter.Warmup(() => { onCompleteWarmUp?.Invoke(); });
}

However, this did not resolve the freezing issue.

Additional Information:

Unity Version: 6000.0.27f1

Steps to reproduce

  1. Call WarmUp() at the start of the game.
  2. In the Unity editor:
    - Start Play Mode.
    - Do not wait for the warm-up to complete.
    - Stop Play Mode.

LLMUnity version

2.3.0

Operating System

Windows

@YsmanKhamidullin YsmanKhamidullin added the bug Something isn't working label Nov 30, 2024
@YsmanKhamidullin
Copy link
Author

YsmanKhamidullin commented Nov 30, 2024

By editor profiler freeze happens here:
image
image
image

@ShutovKS
Copy link
Contributor

ShutovKS commented Dec 2, 2024

I faced the same problem.

For me, it happens when I pause the launch of a project in the editor if the use of a video card is enabled. I can assume that it freezes due to the fact that I stop the project before the model was initialized using the video card.

But the problem also lies in the fact that, in principle, my model does not initialize if I turn on the use of a video card and the function does not work on different devices, tested on:

  • laptop with a video card - Nvidia Geforce 3060
  • desktop with video card - Nvidia Geforce 3070 Ti

Perhaps this is a problem in the editor of the 6000-LTS version, since on lower versions I did not try to run the model using a video card

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