Skip to content

Commit

Permalink
cmd/vinegar: use another log entry for forced studio closure
Browse files Browse the repository at this point in the history
fixes #445
  • Loading branch information
apprehensions committed Oct 6, 2024
1 parent aa795ed commit 7ddd4e6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cmd/vinegar/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ const (
)

const (
// Works for both studio and player
ShutdownEntry = "[FLog::Output] Fmod Closed."
// Randomly chosen log entry in cases where Studios process
// continues to run. Due to a lack of bug reports, it is unknown
// specifically which entry to use for these types of cases.
StudioShutdownEntry = "[FLog::LifecycleManager] Exited ApplicationScope"
)

const (
Expand Down Expand Up @@ -358,13 +360,9 @@ func (b *Binary) Tail(name string) {
for line := range t.Lines {
fmt.Fprintln(b.Prefix.Stderr, line.Text)

// Occasionally, Roblox may not close its window and hogs up memory
// as a result.
if strings.Contains(line.Text, ShutdownEntry) {
if strings.Contains(line.Text, StudioShutdownEntry) {
go func() {
// Studio takes some time to cleanup its resources.
time.Sleep(KillWait)

syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
}()
}
Expand Down

2 comments on commit 7ddd4e6

@0x13479
Copy link

@0x13479 0x13479 commented on 7ddd4e6 Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix! I updated the flatpak though the issue persists for me, Is it because it is for 1.7.7+?
Here is the log, in case: Studio-2024-10-09T15:01:43Z.log

@apprehensions
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still infact unreleased.

Please sign in to comment.