indrora / Atomic

Atomic: an IRC client from the ashes of yaaic
https://indrora.github.io/Atomic/
GNU General Public License v3.0
123 stars 29 forks source link

Crash when sending a command upon connect #17

Closed vext01 closed 10 years ago

vext01 commented 10 years ago

Hi,

Atomic crashes when I add the following command to the autosend upon connect option:

/msg *status jumpnetwork irc-freenode

This is asking my irc bouncer (znc) to change network. I get the standard "Unfortunately, Atomic has stopped" message. When I remove this command, the client connects fine without crashing.

I am not sure if it is the sending of the message that is directly responsible. The bouncer is doing magic when I issue the command, and it could be this magic that disagrees with atomic:

FWIW, the command "/msg *status help" works as expected, so that rules out the star in the command from being a source of issues.

Shame I can't get any useful backtrace (I am not an android developer).

indrora commented 10 years ago

Since I don't use ZNC's jumpnetwork command (instead using the username/network ident method) I have not encountered this. I will give this a test when I have the time to.

indrora commented 10 years ago

Root problem of crash was caused by a problem in ConversationActivity, not checking if the conversation we were adding was null when we tried to add it. This was mostly a race condition between ConversationActivity and the IRC Service.

I then got stuck in an infinite loop immediately after connection -- Wonderful.

Logging a note here, since it's the best place to put it:

When you connect to ZNC, it sends a "user register" response, informing you that you're allright with the server. When you hop networks, it proceeds to send the "user register" response as well.

I found this when I had an autoconnect command (/msg *status help) on a ZNC connection that used the username/ident combo. As a result, Atomic was sending autoconnect commands whenever the server sent us a "user registered" response, causing an infinite loop.

Fixed in HEAD.

vext01 commented 10 years ago

Great work! I look forward to trying it out next release.

vext01 commented 10 years ago

Although using user/network does work, you can still crash atomic by using a command like /msg *status jumpnetwork irc-freenode at connect time.

vext01 commented 10 years ago

Seems I don't have permission to re-open this bug.

indrora commented 10 years ago

Just tested using version in HEAD. Sending both causes no crash. this will be fixed in the release of 1.16