thorwe / CrossTalk

A Teamspeak 3 plugin that enhances the general audio experience and provides advanced features for commanders.
https://www.myteamspeak.com/addons/9ddfa0b2-25c2-4302-8a43-07f8819af9a9
MIT License
47 stars 12 forks source link

Teamspeak crashes on TS3_SWITCH_TAB_AND_TALK_START #3

Closed remcoros closed 11 years ago

remcoros commented 11 years ago

Trying to setup TS3_SWITCH_TAB_AND_TALK_START

Whenever I press the ptt button, teamspeak closes (crashes) without an error or any warning.

Tried this on 1.2.1 and 1.2.2

The command i'm using is (on press): /ct TS3_SWITCH_TAB_AND_TALK_START My Server Name (on release): Snt Stop

thorwe commented 11 years ago

Looking into it. So far it seems to occur when the target server tab was once open, closed, and then the hotkey is used. Thanks for the report.

thorwe commented 11 years ago

Correction. Occurs everytime the target server is not found. While I'm fixing this to do nothing rather than crash in this scenario, it might be that your server name is either incorrect or has some unhandled circumstance in it. Does it contain any special characters or spaces?

remcoros commented 11 years ago

Yeah, I found out that having spaces in the server name doesn't work.

Can you fix this that a server can contain spaces?

I looked at the source a bit, and in snt.cpp you use 'args.at(0)' to get the server name from the command line. This results in a broken server name when it contains spaces.

It's not uncommon for server names to contain spaces.

Here's an example fix you can use: http://www.qtcentre.org/threads/37304-Split-strings-using-QStringList-split()-but-ignore-quotes.?s=fd88b7c4e59f4487a5457db551f3df2c

It splits the string first on quotes, when inside quotes, it adds the whole string including spaces.

I don't have Qt / c++ installed on my machine, else I would have sent a pull request. But can't compile and test this.

Hope this helps!

thorwe commented 11 years ago

Yeah, I was a bit lazy with that wasn't I ;) Thanks for the link, I was just going to commit another variant to fix this, but will change it to this one which I like better. Update to 1.2.3 should hit live during the day.

remcoros commented 11 years ago

Great, thanks for the quick response.

thorwe commented 11 years ago

The update notification module should kick in the next time you start team speak notifying of v1.2.3 which should fix crashing in any case, support spaces using quotes (and silently forgetting quotes).

Will leave the ticket open for a couple of days for confirmation.

I hope I didn't rush another bug in ;)

remcoros commented 11 years ago

Tested and so for looks good! thanks again.

I updated the wiki with a note on spaces in server name and an example.

thorwe commented 11 years ago

Thanks, also for the wiki addition. I totally would've forgotten. Closing.