Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Memory leak with inlineVolume: true #197

@cjh980402

Description

@cjh980402

Please describe the problem you are having in as much detail as possible:

Include a reproducible code sample here, if possible:

// Place your code here
let stream = await playdl.stream('https://www.youtube.com/watch?v=rn0wEJmoGdg')

let resource = createAudioResource(stream.stream, {
    inputType : stream.type,
    inlineVolume: true
})
let player = createAudioPlayer({
    behaviors: {
        noSubscriber: NoSubscriberBehavior.Stop
    }
})
player.play(resource)

connection.subscribe(player)

// wait 10 seconds

let connection = getVoiceConnection(message.guild.id)
let player = connection.state.subscription.player
player.stop()

// repeat above code about 5~10 times then we can see memory leak(memory usage is increased.)

Further details:

  • @discordjs/voice version: 0.6.0
  • Node.js version: 16.6.2
  • Operating system: ubuntu 20.04
  • Priority this issue should have – please be realistic and elaborate if possible:
  • Issue is memory usage is increased when inlineVolume: true for createAudioResource.
  • I can see my issue when play long song (like https://www.youtube.com/watch?v=rn0wEJmoGdg) and enable the volume (inlineVolume: true).

Relevant client options:

  • partials: none
  • gateway intents: none
  • other: none

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions