Adium

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#16114 closed defect (fixed)

Accepting group chat invite on Sametime 8.5.1 crashes Adium

Reported by: jhkrischel Owned by:
Milestone: Adium 1.5.4 Component: Service/Sametime
Version: 1.5.3 Severity: normal
Keywords: Cc:
Patch Status: Accepted

Description

Summary

Accepting group chat invite on Sametime 8.5.1 crashes Adium, if the inviter is using the standard Sametime client.

Steps to reproduce

  1. User A opens official Lotus Sametime Connect Client
  2. User B opens Adium
  3. User A invites User B to group chat
  4. User B accepts invitation

Expected results

User B should successfully join the group chat.

Actual results

Adium crashes.

Notes

Patch to Meanwhile library fixes this:

https://gist.github.com/b71c4d570832d9a2dda0

Tested patch on 1.5.3 successfully.

Attachments (2)

Adium 1.5.4b3 Accepting Sametime group chat crash.rtf (60.0 KB) - added by schwaggy 4 years ago.
Debug Log.rtf (2.8 KB) - added by schwaggy 4 years ago.

Download all attachments as: .zip

Change History (70)

comment:1 Changed 5 years ago by jhkrischel

To do a basic 1.5.3 build on Mountain Lion 10.8/Xcode 4.4.1, I followed these instructions:

https://gist.github.com/abfe3b29db77f93ca818

From a clean checkout of the adium-1.5.3 branch, the following patch set allows for the building of the application with the Meanwhile patch included:

https://gist.github.com/e169ff220eb17f23ddf3

comment:3 Changed 5 years ago by sphynx

The proper way to do it would be to submit your patch to the upstream project, but that hasn't seen an update in over 6 years, and I believe nobody develops it anymore. So a diff in Dependencies/patches is probably the best we can do.

As I don't have a Sametime server to test against, I want to ask you this: does it still work against versions of Sametime before 8.5.1?

Secondly, shouldn't p->extraname be freed too in member_free?

comment:4 Changed 5 years ago by sphynx

  • Patch Status set to Needs Changes by Author
  • Status changed from new to pending

comment:5 Changed 5 years ago by jhkrischel

Updated patch file to include free:

https://gist.github.com/b71c4d570832d9a2dda0

Thanks for the tip sphynx!

In the meantime, I'll be doing more testing, but don't have earlier sametime servers to test against. However, the old adium client used to be able to accept invites from other adium clients, and still does after the patch, so I'm assuming that it works on the old and new versions.

comment:6 Changed 5 years ago by mathuaerknedam

  • Patch Status changed from Needs Changes by Author to Needs Dev Review

comment:7 Changed 5 years ago by jhkrischel

Some testing results:

SUCCESS:
Original client invites adium user
Adium user joins chat
Original client invites other users
Other users join chat
Adium user drops
Original client reinvites adium user
Adium user joins chat

SUCCESS:
Older adium user invites new adium user
New adium user joins chat

SUCCESS:
Adium user A invites adium user B
Adium user B joins chat

FAIL:
Adium user invites older client: 
	Meeting has already ended

FAIL:
Adium user invites older adium user
Older adium user attempts to join:
	crash

FAIL:
Older adium user invites older adium user
Older adium user attempts to join:
	crash

FAIL:
Adium user A invites adium user B
Adium user B joins chat
Adium user B invites original client:
	no invite observed

FAIL:
Adium user A invites adium user B
Adium user B joins chat
Adium user A leaves chat
Adium user B invites adium user A
Adium user A accepts chat:
	no join occurs for adium user A

FAIL:
Adium user A invites adium user B
Adium user B joins chat
Adium user A invites original client:
	meeting already ended

comment:8 Changed 5 years ago by sphynx

  • Patch Status changed from Needs Dev Review to OK; Needs Check-In

Looks good to me now. What is your full name, to credit you for this patch? (If you want us to, of course.)

comment:9 Changed 5 years ago by jhkrischel

Jere Krischel and Jonathan Rice - Jonathan figured out the patch for meanwhile, and I built and tested it with Adium.

comment:10 Changed 5 years ago by Thijs Alkemade <thijsalkemade@…>

  • Resolution set to fixed
  • Status changed from pending to closed

(In 6157383640c2) Added a patch for meanwhile fixing group chat invites from the official Sametime client.

Fixes #16114.

comment:11 Changed 5 years ago by Thijs Alkemade <thijsalkemade@…>

(In a5d36b70de96) Rebuilt meanwhile using the patch from http://hg.adium.im/adium/rev/6157383640c2.

Refs #16114.

comment:12 Changed 5 years ago by Robby

  • Milestone set to Adium 1.5.4

comment:13 Changed 5 years ago by Robby

  • Patch Status changed from OK; Needs Check-In to Accepted

comment:14 Changed 5 years ago by jricesterenator

FWIW, I'm not confident the current patch will work with old Sametime servers. (i.e. breaks functionality)

My impression of the chat invite process:

  • Client --(create-chat request)--> Sametime Server
  • Sametime Server --(server-created invite message)--> Invitees

Some tests in comments above might work because

  1. The same New Sametime Server creates the invite messages, despite the client.
  2. Maybe Adium has a special way of inviting itself? That'd explain why it sounds like #2 and #5 below are actually working.

However, I don't believe scenarios #7 and #10 have been addressed.

Scenarios I imagine with the current patch:

#Requesting ClientInvited ClientSametime ServerExpected Result As-IsSolution
1.Fixed AdiumFixed AdiumNewWorks. Fixed client handles new msg
2.Fixed AdiumOld AdiumNewFails. Old client dies on new msgUpgrade to Fixed client
3.Fixed AdiumOfficial SametimeNewWorks. It's their client
4.Old AdiumFixed AdiumNewWorks. Fixed client handles new msg
5.Old AdiumOld AdiumNewFails. Old client dies on new msgUpgrade to Fixed client
6.Old AdiumOfficial SametimeNewWorks. It's their client
7.Fixed AdiumFixed AdiumOldFails. Patch dies on old-style msgFix patch
8.Fixed AdiumOld AdiumOldWorks. Old client likes old msg
9.Fixed AdiumOfficial SametimeOldWorks. It's their client
10.Old AdiumFixed AdiumOldFails. Patch dies on old-style msgFix patch
11.Old AdiumOld AdiumOldWorks. Old client likes old msg
12.Old AdiumOfficial SametimeOldWorks. It's their client.
Last edited 5 years ago by jricesterenator (previous) (diff)

comment:15 Changed 5 years ago by jricesterenator

I've an update to the patch so it won't break group chat when using a pre-8.5 Sametime server. Trying to find someone on the Meanwhile boards with an old server to help test.

jhkrischel, there's some last stuff I'd like you to test out too.

Last edited 5 years ago by jricesterenator (previous) (diff)

comment:16 Changed 5 years ago by jhkrischel

Here's jricesterenator's updated patch that supports the new message format only for 8.5.1 servers and above:

https://gist.github.com/b71c4d570832d9a2dda0

Can we have someone review the patch, and if it looks okay? I've tested it already on a local build against an 8.5.1 server -> if someone has an older server (6.5 maybe?) they should be able to verify it works for them as well.

I'm not sure exactly when the message type changed (maybe 8.5? 7.5?), but if we can figure that out, we can set the server variable right in the patch.

comment:17 Changed 5 years ago by jricesterenator

And so it doesn't get lost in the shuffle, here's a patch to session.c that will log the server version on connect. This'll make it easier to identify a user's version if we need to tweak the patch in the future.

https://gist.github.com/c67dfbdd0887f7ecc26a

comment:18 Changed 5 years ago by paulwilde

  • Patch Status changed from Accepted to Needs Dev Review

comment:19 follow-up: Changed 5 years ago by mathuaerknedam

Could the first patch be responsible for #16135?

comment:20 in reply to: ↑ 19 Changed 5 years ago by jhkrischel

Replying to mathuaerknedam:

Could the first patch be responsible for #16135?

Possible...we should find out what server version #16135 is talking about - that would narrow things down a bit.

UPDATE: #16135 asserts it was v8.0.1 - I've pasted the patch information (differentiating between server versions) in *that* ticket, since it's still open.

Last edited 5 years ago by jhkrischel (previous) (diff)

comment:21 follow-up: Changed 4 years ago by fraenkel

With this fix, when I accept a group chat, Adium now crashes in 1.5.4b1.

comment:22 in reply to: ↑ 21 Changed 4 years ago by jhkrischel

Replying to fraenkel:

With this fix, when I accept a group chat, Adium now crashes in 1.5.4b1.

What is your sametime server version?

I'm assuming you're talking about the first patch, not the second which is server version specific.

comment:23 Changed 4 years ago by fraenkel

Not sure which patch did it. Before 1.5.4b1, group chats were working fine for me. But once I upgraded group chats now consistently crash. I am not sure of the exact version but I believe its 8.5.1

comment:24 follow-up: Changed 4 years ago by jricesterenator

According to the changelogs, 1.5.4b1 includes a meanwhile built with the original patch on 8/15.

I'm really hoping fraenkel doesn't have 8.5.1 or it'll mean the same Sametime server version can talk in different protocol versions..

We really need to get a patch rebuild with
https://gist.github.com/b71c4d570832d9a2dda0 (the version-specific patch)
and
https://gist.github.com/c67dfbdd0887f7ecc26a (to include the Sametime server version in the logs)

What needs to happen for that to happen? Can sometime mark the ticket as Open? Might be being ignored since it's closed:fixed.

Last edited 4 years ago by jricesterenator (previous) (diff)

comment:25 in reply to: ↑ 24 Changed 4 years ago by jhkrischel

Replying to jricesterenator:

According to the changelogs, 1.5.4b1 includes a meanwhile built with the original patch on 8/15.

I'm really hoping fraenkel doesn't have 8.5.1 or it'll mean the same Sametime server version can talk in different protocol versions..

We really need to get a patch rebuild with
https://gist.github.com/b71c4d570832d9a2dda0 (the version-specific patch)
and
https://gist.github.com/c67dfbdd0887f7ecc26a (to include the Sametime server version in the logs)

What needs to happen for that to happen? Can sometime mark the ticket as Open? Might be being ignored since it's closed:fixed.

Let me see if I an do an ad hoc build. I'll publish a location maybe later tomorrow.

comment:26 Changed 4 years ago by mathuaerknedam

  • Resolution fixed deleted
  • Status changed from closed to new

comment:27 Changed 4 years ago by jhkrischel

Just to be clear, the following needs to be fixed:

1) The Dependencies/Meanwhile-srvc_place.c.diff file should be replaced with the contents of https://gist.github.com/b71c4d570832d9a2dda0

2) A new file Dependencies/Meanwhile-session.c.diff should be created with the contents of
https://gist.github.com/c67dfbdd0887f7ecc26a

3) The Dependencies/build_dependencies.sh needs to be updated to include the Meanwhile-session.c.diff patch.

after:

fwdpatch "$ROOTDIR/patches/Meanwhile-srvc_place.c.diff" -p0 || true

add:

fwdpatch "$ROOTDIR/patches/Meanwhile-session.c.diff" -p0 || true

after:

revpatch "$ROOTDIR/patches/Meanwhile-srvc_place.c.diff" -p0

add:

revpatch "$ROOTDIR/patches/Meanwhile-session.c.diff" -p0

comment:28 Changed 4 years ago by jhkrischel

I've got a test build built on Xcode 3.2.6 on Snow Leopard 10.6.8 - http://krischel.org/adium.test.dmg

It starts with the adium-1.5.4 branch and includes both the patch that is server version sensitive, as well as containing the server version info in the log.

@fraenkel - could you try this build and report back both your experience as well as the server version in the log?

Thanks!

Last edited 4 years ago by jhkrischel (previous) (diff)

comment:29 Changed 4 years ago by fraenkel

Here is my sametime version
05:43:44: (Libpurple: meanwhile) Sametime server version (major/minor): 0x1e / 0x1f4b

I will let you know about group chat later.

comment:30 Changed 4 years ago by jricesterenator

Good good. Looks like you're probably v7 something.

8.5.1 is minor 0x213f

8.5.2 is minor 0x2149

I'm interested to hear back, but I'm pretty sure group chat will work again for you.

Last edited 4 years ago by jricesterenator (previous) (diff)

comment:31 Changed 4 years ago by mathuaerknedam

Ticket #16135 has been marked as a duplicate of this ticket.

comment:32 Changed 4 years ago by fraenkel

Group chat now works for me. Thanks for the temporary fix.

comment:33 Changed 4 years ago by Thijs Alkemade <thijsalkemade@…>

(In b2d9af334529) Added the second meanwhile groupchat fix patch.

Refs #16114

comment:34 Changed 4 years ago by Thijs Alkemade <thijsalkemade@…>

  • Resolution set to fixed
  • Status changed from new to closed

(In 4f86300f2555) Rebuilt all the dependencies using homebrew, including the sametime groupchat fix.

Fixes #16114

comment:35 Changed 4 years ago by Robby

  • Patch Status changed from Needs Dev Review to Accepted

comment:36 follow-ups: Changed 4 years ago by schwaggy

This crash is back in 1.5.4b3

comment:37 in reply to: ↑ 36 Changed 4 years ago by Robby

Replying to schwaggy:

This crash is back in 1.5.4b3

When was it fixed for you?

comment:38 Changed 4 years ago by schwaggy

I *think* it was resolved in 1.5.4b1

comment:39 in reply to: ↑ 36 Changed 4 years ago by sphynx

Replying to schwaggy:

This crash is back in 1.5.4b3

Can you attach a new crash log, just to be sure it's the same crash?

comment:40 Changed 4 years ago by jricesterenator

The trace looks like the same crash.

schwaggy, can you also post your debug logs as you start your client? I'm looking for the sametime server version. For ex,

05:43:44: (Libpurple: meanwhile) Sametime server version (major/minor): 0x1e / 0x1f4b

Changed 4 years ago by schwaggy

comment:41 Changed 4 years ago by schwaggy

I don't see exactly what you're looking for, but there's the main info from the log when accepting the chat.

comment:42 Changed 4 years ago by jricesterenator

I'd like to see the logs from when Adium is first starting up and initially connecting to the Sametime server. That's where I added the version logging. You'll have to restart Adium.

If the server version isn't logged anywhere, it sounds like the patch wasn't applied to this version.

comment:43 Changed 4 years ago by schwaggy

I applied the 1.5.4b3 update and restarted in debug mode. There is no Sametime version information in the logs. Please let me know if you'd like me to try anything else. I'm happy to get you any info to help fix this issue.

comment:44 Changed 4 years ago by jricesterenator

Does it crash when you're running 1.5.4b2? 1.5.4b1?

If not, can you check the startup debug logs for those versions to see if the server version is listed?

Last edited 4 years ago by jricesterenator (previous) (diff)

comment:45 Changed 4 years ago by schwaggy

Not crashing with 1.5.4b1 but the Sametime server info is not in the log either.

comment:46 Changed 4 years ago by jricesterenator

Ok, looking back, 1.5.4b1 includes the original patch. That patch applied the 'fix' to everybody and caused issues with earlier sametime servers. That version did NOT have server logging.

The 2nd version of the patch included version logging and restricted the fix for >= sametime v8.5.1. It should be in there starting b2.

Could you try b2 and check its logs for me? Maybe b3 was built incorrectly.
http://download.adium.im/Adium_1.5.4b2.dmg

If the patch IS applied correctly, and it worked for you in b1 but not in b3, I'd guess that you might have sametime 8.5.0 or something, and we'd have to tweak the version cutoff in the patch. But...I'd need to see your server version log statement to proceed.

I can download/setup Adium myself to test, but it might be a few days.

comment:47 Changed 4 years ago by sphynx

Okay, I'm an idiot. Sorry for this.

I'm in the process of replacing the dependency build scripts with a system based on Homebrew. The version of meanwhile in b1 was built with the old scripts, where I addded the old version of the first patch. The dependencies for b3 were build with Homebrew, yet while I did add the second patch, I forgot to add the updated first patch here.

I'll try to get a b4 out soon.

comment:48 Changed 4 years ago by jricesterenator

Thanks, glad it's something simple.

comment:49 Changed 4 years ago by schwaggy

Awesome. So, jricesterenator, I'm assuming you don't need me to check with b2?

comment:50 Changed 4 years ago by jricesterenator

Right. You can test again when b4 is out. If you could post back if you see the server version log then, that'd be nice.

comment:51 Changed 4 years ago by Thijs Alkemade <thijsalkemade@…>

(In ee8971c4e803) Fix the second libmeanwhile patch, I'm not sure why it was what it was.

Refs #16114

comment:52 Changed 4 years ago by Thijs Alkemade <thijsalkemade@…>

(In e9d9494e6d4d) Now the fix for #16114 should actually be included.

Fixes #16114

comment:53 Changed 4 years ago by sphynx

You can try with http://nightly.adium.im/adium-adium-1.5.4/Adium_1.5.4b3r5113.dmg for now, b4 will follow later.

comment:54 Changed 4 years ago by schwaggy

Working again in 1.5.4b3r5113 - thanks everybody! Really helpful.

comment:55 Changed 4 years ago by jricesterenator

I'm glad life still makes sense.

schwaggy, can you still post up your server version? I've only checked it for a few people, and I'm interested to get some more data points.

comment:56 Changed 4 years ago by schwaggy

I'm still not seeing the server version in the debug log. I have asked the people in charge of Lotus in my environment, but have never received a response.

comment:57 Changed 4 years ago by jricesterenator

Ok, thanks for checking again. I'll dl the nightly this weekend and try myself to make sure that code made it in.

comment:58 Changed 4 years ago by jricesterenator

Checked and the server version logs ok. You gotta open the debug window, disconnect from sametime, and reconnect. Then search for "version".

comment:59 follow-up: Changed 4 years ago by schwaggy

(Libpurple: meanwhile) Sametime server version (major/minor): 0x1e / 0x2149

comment:60 in reply to: ↑ 59 Changed 4 years ago by jricesterenator

Replying to schwaggy:

(Libpurple: meanwhile) Sametime server version (major/minor): 0x1e / 0x2149

Thanks.

comment:61 follow-up: Changed 4 years ago by Robby

A user running Adium 1.5.4 is still seeing a crash: http://forums.cocoaforge.com/viewtopic.php?f=13&t=26074.

The Sametime clients in use are 8.5.2.

comment:62 in reply to: ↑ 61 ; follow-up: Changed 4 years ago by jricesterenator

Replying to Robby:

A user running Adium 1.5.4 is still seeing a crash: http://forums.cocoaforge.com/viewtopic.php?f=13&t=26074.

The Sametime clients in use are 8.5.2.

Can you have them provide the Sametime server (major/minor) version from the logs? You gotta open the debug window, disconnect from sametime, and reconnect. Then search for "version".

comment:63 in reply to: ↑ 62 Changed 4 years ago by Robby

Done, thanks. :)

Replying to jricesterenator:

[...]You gotta open the debug window, disconnect from sametime, and reconnect.[...]

I hope it also works they way I suggested in the forum thread.

comment:64 Changed 4 years ago by Robby

Version:

(Libpurple: meanwhile) Sametime server version (major/minor): 0x1e / 0x2148.

Full debug log is in the ticket: http://forums.cocoaforge.com/viewtopic.php?f=13&t=26074&p=136429#p136430.

comment:65 Changed 4 years ago by jricesterenator

The patch applies to minor version 0x213f and up, so it's active for 0x2148.

  1. Can you get the debug logs/crash report from when the crash happens?
  1. If they revert to an older version of Adium without the patch (1.5.3), does it start working again?

comment:66 Changed 4 years ago by Robby

Thanks, I've forwarded this.

You might have noticed that Sametime seems be broken for many (all?) users in 1.5.6. We could perhaps use some help with that (https://trac.adium.im/ticket/16345#comment:8).

comment:67 Changed 4 years ago by Robby

Here are the logs for the 1.5.4 crash and some infor on how 1.5.3 works for the user: http://forums.cocoaforge.com/viewtopic.php?f=13&t=26074&p=136615#p136615.

comment:68 Changed 4 years ago by jricesterenator

Honestly, I'm not sure what to say.

The crash seems a little later than I'm expecting, but it's still after calling mw_place_opened, which is where the problem was before.

I can imagine it working before and not working now, or it not working before and working now. This person was not working (but not crashing) before, now it's crashing. Perhaps there's another message structure that we don't know about.

Unfortunately, since I only have my sametime server to test with, there's nothing I can think to do. Plus, I don't have my sametime dev environment set up anymore.

Note: See TracTickets for help on using tickets.