Jda: There was some unexpected exception in the combinedAudioExecutor!

Created on 2 Sep 2018  Â·  18Comments  Â·  Source: DV8FromTheWorld/JDA

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • [x] I have checked for similar issues.
  • [x] I have updated to the latest JDA version.
  • [ ] I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • [x] Bug Report
  • [ ] Feature Request

For questions join the official JDA discord server: https://discord.gg/0hMr4ce0tIl3SLv5

Description

I'm doing some stuff in the handleCombinedAudio(CombinedAudio audio) method however it is never ran because this exceptions happens first, I can't really give you anymore except than that stacktrace

[JDA AudioConnection Guild: 331023253785280512 Combined Thread] ERROR net.dv8tion.jda.core.audio.AudioConnection - There was some unexpected exception in the combinedAudioExecutor!
java.lang.ArrayIndexOutOfBoundsException: 960
    at net.dv8tion.jda.core.audio.AudioConnection.lambda$setupCombinedExecutor$7(AudioConnection.java:509)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
bug completed

All 18 comments

Either not using latest version (not possible since you checked it in your troubleshooting checkmark list) or java.lang.ArrayIndexOutOfBoundsException: 960. So you have to give us the code snippet for using handleCombinedAudio.

Either way, the github issue tracker is reserved for feature requests and bug reports. Your issue is neither and should be sorted out inside of our discord server. Go to discord.gg/0hMr4ce0tIl3SLv5 to receive the needed help.

Even when I comment out my code, so leave the handleCombinedAudio() empty proof: http://prntscr.com/kps2f3

I get this error (the one above) now I think i'd be smart enough to see any of my own methods in the stacktrace. There isn't. This is not "neither" it's a bug report, since this is clearly a bug if it's not working natively.

I am unable to reproduce this behavior, could you provide some more details?

Running version JDA: 3.7.1_411
Lavaplayer: 1.3.7
Java version: 8_171
Whenever the bot joins the Guild Voicechannel I make sure the receiveinghandler is set. and right now all the methods are defaulted/not doing anything:

    public boolean canReceiveCombined() {
        return true;
    }

    public boolean canReceiveUser() {
        return false;
    }

    public void handleCombinedAudio(CombinedAudio combinedAudio) {
    }

    public void handleUserAudio(UserAudio userAudio) {}

Note that the overrides were removed so I'm not marking someone.

This is being run straight out of the IntelliJ Idea Environment, built with maven.
the only code relating to the ReceivingHandler is`when I set it as receiver:
It is ran, I debugged it, also it wouldn't give us the errors at all if it didn't have something to output to.

    @Override
    public void onGuildVoiceJoin(GuildVoiceJoinEvent event) {
        if (event.getMember().getUser().isBot() && event.getMember().getUser().equals(DiscordBotHandler.jda.getSelfUser())) {
            event.getGuild().getAudioManager().setReceivingHandler(new AudioPlayerReceiveHandler());
        }
    }

Also Windows 10

Can you try just testing setting the Receiving handler before joining the channel rather than in the voicejoin handler?

I have tried that @kantenkugel same output, I've decided to use UserAudio for now since all I really want to do is record the audio, that's not so bad rn.

@Articdive I also noticed this issue but since the stuff that I'm doing in handleCombinedAudio shrugged the exception, I figured it was just a blip in the machine. I tracked it down to this thread, but since the Exception is just ArrayIndexOutOfBounds, I can't pin point which array got messed up.

You're saying that you can get around this by directly using UserAudio and performing your own mixing?

I think the exception is caused here.

@Sanduhr32 have you been able to reproduce this? I only see it when I've deployed the bot. If I could reproduce this 100% of the time I could probably create a PR to fix it.

I am already aware of the origin of this exception, however I'm just curious why this now happens all of a sudden when this code has not changed in months.

I used to see it in my logs every now and then, but recently it started happening a lot more, like enough where I had to turn off logs because it was writing too much to disk.

Discord also started appending some kind of header to the audio packets, I don't know if related or not.

Is the issue fixed on 4f33b81? Build 414

I’ll try the build shortly.

https://github.com/DV8FromTheWorld/JDA/issues/755#issuecomment-418165036

From looking at the logs, it seems like the problem went away! @Articdive can you confirm?

I'm on my commute to work as of now. I can confirm later today in tge next
16 hours

On Mon, 3 Sep 2018, 21:40 Jose V. Trigueros, notifications@github.com
wrote:

755 (comment)

https://github.com/DV8FromTheWorld/JDA/issues/755#issuecomment-418165036

From looking at the logs, it seems like the problem went away! @Articdive
https://github.com/Articdive can you confirm?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/DV8FromTheWorld/JDA/issues/755#issuecomment-418183012,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AM6KjdKeTXhEaKgEY5kWrOD3VbIuahxjks5uXYW1gaJpZM4WWtyN
.

This has been fixed, just to confirm

Closing the issue then

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bungeefan picture Bungeefan  Â·  6Comments

M4itreG picture M4itreG  Â·  5Comments

AutismSpeaks picture AutismSpeaks  Â·  4Comments

YukioKeno picture YukioKeno  Â·  6Comments

sachinhasaphatass picture sachinhasaphatass  Â·  3Comments