Adium

Opened 14 years ago

Closed 13 years ago

Last modified 9 years ago

#3941 closed defect (fixed)

receiving custom emoticons

Reported by: heksa Owned by: nobody
Milestone: Adium X 1.0.1 Component: Service/MSN
Version: Severity: normal
Keywords: 3941, 4452, 4459, 4640, 4789, 4796, 4840, 4900 Cc:
Patch Status: Accepted

Description

receiving custom emoticons is broken in latest svn.

Attachments (4)

MSNAnimsPatch.diff (725 bytes) - added by pkretek+adium@… 14 years ago.
Small fix for animated custom emoticons
custicons.diff (480 bytes) - added by pkretek 14 years ago.
see comment @ 05/14/2006 04:36:08 PM
receiving custom emoticon failing.txt (3.7 KB) - added by adium 13 years ago.
Snippet of adium debug log when receiving a custom emoticon and it failing to be displayed (timfrench at gmail dot com)
custom-emote-cut-off-1.png (23.2 KB) - added by timfrench@… 13 years ago.
Custom emote image appears at the correct real size of the image but is cut off by the bottom of the message window

Download all attachments as: .zip

Change History (82)

comment:1 Changed 14 years ago by David Smith

I've heard reports of this from someone else as well. I suspect [15836], but I can't really see anything wrong with it...

comment:2 Changed 14 years ago by iDarbert

That would be me too... so I'm not the only one out there.

comment:3 Changed 14 years ago by David Smith

Milestone: Adium X 1.0

.<

Changed 14 years ago by pkretek+adium@…

Attachment: MSNAnimsPatch.diff added

Small fix for animated custom emoticons

comment:4 Changed 14 years ago by pkretek

Custom emoticons were not animated (for me), changed jpg to gif and it works...

comment:5 Changed 14 years ago by David Smith

field_haspatch: 01

comment:6 Changed 14 years ago by iDarbert

This is weird... I did receive the emoticon and see it under Library/Caches/Adium/Default, but Adium doesn't display it in the conversation.

comment:7 Changed 14 years ago by iDarbert

Definetely a problem in displaying after downloading, if I resend an emoticon I already received it displays just fine.

comment:8 Changed 14 years ago by Colin Barrett

(In [15897]) Patch from pkretek+adium@…, provides improved support for animated custom emoticons. Refs #3941

comment:9 Changed 14 years ago by Carlos Morales

Since Changeset 15897, Animated Custom Emoticons are not being detected. Regular non-animated custom emoticons are working ok.

comment:10 Changed 14 years ago by Dj Mori

Animated emoticons disappering (http://trac.adiumx.com/ticket/3949) and some not being detected.

comment:11 Changed 14 years ago by David Smith

Adium[24660] Could not create CGImageDestinationRef for output type 'public.tiff' Adium: CGImageDestinationCreate capacity parameter is zero\n Adium[24660] Failed to write image NISHIZH

Error log someone on IRC saw

comment:12 Changed 14 years ago by David Smith

Adium[24660] Could not create CGImageDestinationRef for output type 'public.tiff' 
Adium: CGImageDestinationCreate capacity parameter is zero\n 
Adium[24660] Failed to write image NISHIZH

the same log with formatting

comment:13 Changed 14 years ago by pkretek

I think the problem is, that in Frameworks/Adium Framework/AIHTMLDecoder.m, lines starting from 1318 the copying of the emoticon fails, or at least returns a success=NULL preventing the emoticon from being displayed/updated in the chat view.

With the attached (custicons.diff) quick and dirty patch, somehow it works as advertised, ie... the message get's displayed with WebKit's missing image icon, and will be updated with the emoticon as soon as it gets received.

What i also noticed as a free feature, if the MSN contact changes his picture it also get's updated in all versions of his picture in the Chat window's message style, previously it did not.

I tried it for two days and could not find any new bugs created by the patch. It would be nice if some more people could test it and if someone with better cocoa skills could review the whole function.

Paul

Changed 14 years ago by pkretek

Attachment: custicons.diff added

see comment @ 05/14/2006 04:36:08 PM

comment:14 Changed 14 years ago by David Smith

(In [15977]) Adding some debug logging for file copying errors. If you've been having trouble receiving custom emoticons, please check the logs after one should have been received and post to the ticket with them. Refs #3941

comment:15 Changed 14 years ago by Carlos Morales

ok let's see.. a couple of them

May 14 16:40:42 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 16:40:42.495 Adium.real[299] Failed to write image wena
2006-05-14 16:43:01.892 Adium.real[299] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 16:43:01 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 16:43:02.561 Adium.real[299] Failed to write image trasero

comment:16 Changed 14 years ago by Carlos Morales

Those were old ones, but new ones (with the new debug logging) are almost the same

M2006-05-14 17:48:00.144 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:00 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:00.212 Adium.real[7959] Failed to write image tetas
2006-05-14 17:48:03.353 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
2006-05-14 17:48:03.367 Adium.real[7959] Failed to write image mono1
May 14 17:48:03 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:07.267 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:07 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:07.791 Adium.real[7959] Failed to write image trasero
2006-05-14 17:48:33.755 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:33 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:34.194 Adium.real[7959] Failed to write image tomar
2006-05-14 17:48:35.087 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:35 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:35.266 Adium.real[7959] Failed to write image chela
2006-05-14 17:48:44.588 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:44 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:45.232 Adium.real[7959] Failed to write image foto
2006-05-14 17:48:46.773 Adium.real[7959] Could not create CGImageDestinationRef for output type 'public.tiff'
May 14 17:48:46 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n
2006-05-14 17:48:47.193 Adium.real[7959] Failed to write image aweonao

comment:17 Changed 14 years ago by Carlos Morales

I noticed something that may be usefull. When buddys send me te emoticon for the second time, it usually (90%) works. I belive that after the image has been downloaded to the cache, there's no writing error. Maybe adium is trying to display the images before they're totaly downloaded?

comment:18 Changed 14 years ago by anonymous

I suspect, it is trying to copy the not yet recieved emoticon. Before [15836] the message was waiting until the emoticon was recieved, now Adium still seems to try to copy the emoticon assuming that it is already recieved. I noticed that it goes twice through line 1318ff:

if (inPath) {
	NSString *localPath = [[NSFileManager defaultManager] uniquePathForPath:[imagesPath stringByAppendingPathComponent:[inPath lastPathComponent]]];

	//Image already exists on disk; copy it to our images path
	success = [[NSFileManager defaultManager] copyPath:inPath
									toPath:localPath
									   handler:self];
			inPath = localPath;

and twice the return value in success is Null, what I wonder is why it's not "NO".

djmori, it works, because the emoticon is already in the cache and thus probably goes through the other if/else. It only fails if the emoticon is newly send.

comment:19 Changed 14 years ago by David Smith

(In [15978]) Receiving emoticons should *work* now, but it's an ugly hacky way of doing it (and may ignore real problems). I've stuck a different debug log in to try to confirm that the issue is where I think it is. Refs #3941

comment:20 Changed 14 years ago by Carlos Morales

Well, everything seems to have improved a lot.. now most of the newly send emoticons appear. Now, for some reason, now the text that trigres the emoticon its appearing twice in the chat window (one as an emoticon, and another time as text right next to it.) Some animated images are downloaded, identifyed but not showed (webkit's question mark appears instead) The console is still showing the exact same errors!

comment:21 Changed 14 years ago by David Smith

woot? I dunno if I should revert that change or not.

comment:22 Changed 14 years ago by Carlos Morales

The duplicate text only happens on newly recived emoticons btw.

comment:23 Changed 14 years ago by Carlos Morales

I say wait to a custom emoticon to be recived, before displaying it. Before [15836] everything (exept animations) use to work ok.

comment:24 Changed 14 years ago by David Smith

Before [15836] custom emoticons could break receiving messages. We're not reverting that. Fixing this is a better idea.

comment:25 Changed 14 years ago by David Smith

(In [15981]) More testing on the emoticon receiving. Refs #3941

comment:26 Changed 14 years ago by Carlos Morales

Well catfish_man, you just won a cookie. Now most of the emoticons are displayed without a problem, and text is no longer appearing twice.

The console is displaying this evetytime a new emoticon arrives

2006-05-15 14:44:52.813 Adium.real[25589] Could not create CGImageDestinationRef for output type 'public.tiff'
May 15 14:44:52 Carlos-Morales-Computer /Applications/Adium.app/Contents/MacOS/Adium.real: CGImageDestinationCreate capacity parameter is zero\n

comment:27 Changed 14 years ago by David Smith

Milestone: Adium X 1.0Adium X 1.1

I basically did the same thing as the original patch, so thank you pkretek. Pushing off 1.0 since it mostly works now.

comment:28 Changed 14 years ago by timfrench@…

I get the same error as djmori in my console. The custom emoticon appears as a webkit "?" missing image initially until it has loaded.

If it is a large image, it appears vertically cut off (it doesn't resize the vertical height of the image once it loads, instead it remains as the original vertical line height before the image loaded). I can click on it to toggle it to display the text trigger and then click the text trigger to toggle it back to displaying the image and it resizes the vertical height to the correct size.

Horizontal height seems to be ok, ie- it adjusts the horizontal height when the image loads.

comment:29 Changed 14 years ago by Evan Schoenberg

(In [15985]) Draw a question mark instead of having an empty image for initial emoticons [before we receive anything for them]... this could be replaced with a pretty image or something, but I'd like to see if it removes the console failure logs for the msn folks. Refs #3941

comment:30 Changed 14 years ago by timfrench@…

Drawing the "?" seems to have solved the console error messages. There are no error message in console now.

The custom emoticons draw at the 16x16 pixels which the "?" is drawn at though. Toggling to the text trigger and back to the emoticon causes the emoticon to draw at the correct size.

Curious... would it be better to display the text trigger until the emoticon has loaded and then toggle the display of the text trigger to the emoticon (and hopefully displaying it at the correct size)?

comment:31 Changed 14 years ago by Carlos Morales

same as timfrench here. It removed console faliure logs, and -besides the resize thing- everything seems to work fine.

comment:32 Changed 14 years ago by timfrench@…

BTW, msn messenger on windows seems to specify a custom size for emoticons (eg- the actual size of the image might be 200x200px but msn will display the emoticon in the message window at 100x100px). So a windows user might see the emoticon as 100x100px in their message window, a adium user will see it as the actual size of 200x200px. The MSN protocol must specify the display size of the emoticon image as well? Maybe if gaim recognizes this size setting it could be used when drawing the image in the message window... So it would display the image at it's intended display size and solve the problem it currently has where it displays the image at 16x16px until you toggle between text and image by clicking on it.

That's if gaim recognizes the specified display size for the emoticon image from windows msn messenger?

comment:33 Changed 14 years ago by Carlos Morales

hey.. something odd is happening to me. Every emoticon is displayed fine EXEPT those binded into question marks (?).... anyone is experiencing the same??

comment:34 Changed 14 years ago by anonymous

I noticed that all custom emoticons using special characters (/, *, ?, etc) do not get displayed.

comment:35 Changed 13 years ago by adium

Custom Emoticons broken in 1.0b1.... No idea why!

comment:36 Changed 13 years ago by adium

Checking the timeline, Changeset #16594 could be the problem....

I'm no dev, so I have no idea how this change could have broken the entire thing.

I found out something quite interesting too; in 1.0b1 some "?" appear quite big... probably with the size of the incoming emoticon (insted of the 16x16 we talked about earlier).

comment:37 Changed 13 years ago by adium

that was [16594] btw

-djmori

Changed 13 years ago by adium

Snippet of adium debug log when receiving a custom emoticon and it failing to be displayed (timfrench at gmail dot com)

comment:38 Changed 13 years ago by Peter Hosey

Looks like a race condition to me. We're trying to display it immediately, before it was received completely. Somehow the file copy acted as a delay fuse that was just long enough for the download to finish.

Seems like the right solution here would be a message queue in the WKMV that would hold messages for up to five seconds before displaying them, in order to afford time for the download to finish.

Implementation

When a message arrives with one or more outstanding downloads (e.g. custom emoticons), or when any message arrives while the queue is not empty, it is enqueued, and a timer is started (if none already exists) that polls the queue every half-second.

The timer checks the download status of the frontmost (oldest) message; if the message has one or more downloads, and five seconds have elapsed with no progress on any download, the message is displayed anyway. If all zero or more downloads have finished, the message is displayed. In either case, the message is also removed from the queue. Otherwise (if any download is still progressing), the timer rests for another half-second (by setting its fire date to a half-second in the future).

If the message is displayed, the timer looks at the next message, and the same rules are applied to it. The timer aborts when the queue is exhausted.

We should also have a separate timer that polls any unfinished downloads (from messages that were displayed anyway after five seconds) every five seconds, and either cleans them up if NSURLDownload (or whatever we're using) has given up on them, or pokes the WebView about them if they have finished downloading. As before, this timer would exit when its queue is exhausted.

comment:39 Changed 13 years ago by Evan Schoenberg

We can update images that are already visible via the DOM tree - using that ability properly might be a more straightforward solution.

comment:40 Changed 13 years ago by Colin Barrett

Or use the same magic we use when clicking emoticons to display the text equivalent until it loads, and then display the image. :)

comment:41 in reply to:  40 Changed 13 years ago by adium

Replying to cbarrett:

Or use the same magic we use when clicking emoticons to display the text equivalent until it loads, and then display the image. :)

That would be great! the "?" is not too preatty, and sometimes comfunsing (emoticon next to a sentence for example)

comment:42 Changed 13 years ago by t0rus

adium 1.0b4 has the same problem - displaying question marks instead of any custom emoticons

comment:43 Changed 13 years ago by timfrench@…

1.0b5 still displays questions marks for custom emotes.

I did manage to see 1 custom emote once using 1.0b5. It was the same one side by side (ie: "ha" is a custom emote, friend sent "haha" which appeared as 2 custom emotes together).

All other cases I have seen either show a small 16x16 "?" or a large pixelated "?" which is the size of the custom emote.

comment:44 Changed 13 years ago by Peter Hosey

Ummm. This ticket is not closed as fixed. This indicates that we are not of the opinion that it is fixed. This implies that we know that it is still not fixed. Therefore there is no reason to point this fact out.

If we close it as fixed and it's still not fixed after that, then you should reopen the ticket and tell us it's not fixed. Until that time, there's no need to belabor the point.

comment:45 Changed 13 years ago by David Smith

If you'll notice, Tim was confirming that the bug still exists in 1.0b5, not belaboring the point that it exists in b4. Since we've been testing exactly that, I'd say that the additional testing (in particular a result not shown in the testing you and I did) is useful.

comment:46 Changed 13 years ago by Peter Hosey

We actually succeeded in doing any testing? :)

You're right, and I'm sorry. The reason for the betas is continued testing and debugging. I just saw a bunch of "it's still broken" and flipped out.

comment:47 Changed 13 years ago by anonymous

less caffeine, more tv, boredzo

comment:48 Changed 13 years ago by anonymous

same in 1.0b6

comment:49 Changed 13 years ago by anonymous

how come they work fine in mercury messenger?

comment:50 Changed 13 years ago by David Smith

That would be because mercury messenger uses 100% different code from Adium. Similarly, browsing the web works in Safari but not Adium, and word processing works in MS Word, but not Adium. These things are because Adium is not those applications.

comment:51 Changed 13 years ago by Chris Forsythe

Mercury messenger is a MSN only client.

We have multiple protocols.

We do not have a full time MSN developer, we depend on Gaim development on the MSN portions of Adium. Once something new is implemented in Gaim (like Custom Emoticons), it takes a while for us to get that new feature working in Adium.

comment:52 in reply to:  27 ; Changed 13 years ago by aragost@…

Replying to catfish_man:

I basically did the same thing as the original patch, so thank you pkretek. Pushing off 1.0 since it mostly works now.

Shouldn't the milestone be set to 1.0 or after beta1, since it is already listed in the 1.0 feature/change list?

comment:53 in reply to:  52 ; Changed 13 years ago by Chris Forsythe

Replying to aragost@gmail.com:

Replying to catfish_man:

I basically did the same thing as the original patch, so thank you pkretek. Pushing off 1.0 since it mostly works now.

Shouldn't the milestone be set to 1.0 or after beta1, since it is already listed in the 1.0 feature/change list?

The posted beta changelog is not final. We are well within our rights to remove items from it if they do not work as intended.

comment:54 in reply to:  53 Changed 13 years ago by aragost@…

Replying to tick:

Replying to aragost@gmail.com:

Replying to catfish_man:

I basically did the same thing as the original patch, so thank you pkretek. Pushing off 1.0 since it mostly works now.

Shouldn't the milestone be set to 1.0 or after beta1, since it is already listed in the 1.0 feature/change list?

The posted beta changelog is not final. We are well within our rights to remove items from it if they do not work as intended.

Ok, I just thought "feature freeze" woked in both ways ;)

comment:55 in reply to:  50 Changed 13 years ago by anonymous

Replying to catfish_man:

That would be because mercury messenger uses 100% different code from Adium. Similarly, browsing the web works in Safari but not Adium, and word processing works in MS Word, but not Adium. These things are because Adium is not those applications.

really? we all thought it was because Uranus was not in phase with Earth... next time you want to give a useless rambling answer, keep it to yourself instead, tick here on the other hand is providing some useful information

comment:56 Changed 13 years ago by Evan Schoenberg

catfish_man's answer was neither useless nor rambling but rather 100% correct. Please don't bother posting on Trac or our forums if you can't maintain a positive attitude.

comment:57 Changed 13 years ago by pkretek

I have svn here with r16620, which works perfectly, the latest beta (b6) does not work at all... "?" all the time, as mentioned already.

My suggestion is to not draw a "?" at all, which looks damn like a part of text until the emoticon is there... by drawing "?" all new emoticons are at 16x16, not creating a temp image and everything is fine.

i have undone [15985] including lines 855-862 and i am quite happy with that situation - until there's a better solution, of course.

comment:58 in reply to:  57 Changed 13 years ago by aragost@…

Replying to pkretek:

I have svn here with r16620, which works perfectly, the latest beta (b6) does not work at all... "?" all the time, as mentioned already.

Still broken in b7

comment:59 in reply to:  57 ; Changed 13 years ago by anonymous

Replying to pkretek:

i have undone [15985] including lines 855-862 and i am quite happy with that situation - until there's a better solution, of course.

It works ok that way?.. maybe we could try this.

comment:60 in reply to:  59 Changed 13 years ago by Jeroen Asselman <jeroen@…>

Replying to anonymous:

Replying to pkretek:

i have undone [15985] including lines 855-862 and i am quite happy with that situation - until there's a better solution, of course.

It works ok that way?.. maybe we could try this.

--- Plugins/Gaim Service/CBGaimAccount.m (revision 17000) +++ Plugins/Gaim Service/CBGaimAccount.m (working copy) @@ -845,16 +845,6 @@

Set some path for this emoticon so our HTML decoder will insert the img tag and we can update the img later NSString *path = [self _emoticonCachePathForEmoticon:emoticonEquivalent inChat:inChat];

  • XXX Temporary image?
  • NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize(16,16)];
  • [image lockFocus];
  • [@"?" drawInRect:NSMakeRect(0, 0, 16, 16) withAttributes:nil];
  • [image unlockFocus];

-

  • [[image TIFFRepresentation] writeToFile:path
  • atomically:NO];
  • [image release];

-

[emoticon setPath:path];

}

}

Works for me as well.

comment:61 Changed 13 years ago by matt

Keywords: 3941 4452 4459 4640 4789 4796 4840 4900 added

comment:62 Changed 13 years ago by anonymous

any idea when this will be fixed?

comment:63 Changed 13 years ago by anonymous

PEP

comment:64 Changed 13 years ago by Colin Barrett

field_haspatch: 10

Unmarking the patch included field, to remove this from {12}.

comment:65 Changed 13 years ago by Peter Hosey

(In [17281]) Patch from CFM. Attempted fix for #3941. Refs #3941.

comment:66 Changed 13 years ago by timfrench@…

Build error:

/adium/Plugins/Gaim Service/CBGaimAccount.m:901: error: 'emoticonEquivalent' undeclared (first use in this function)

comment:67 in reply to:  66 Changed 13 years ago by timfrench@…

[17295] fixed the above build error.

Custom emotes still do not work. They appear as "?" images in the message window still. Below is an excerpt from the debug log when receiving a custom emote:

09:13:39: (Libgaim: msn) C: SB 007: MSG 7 D 148
09:13:39: (Libgaim: msn) C: SB 007: OUT
09:13:39: (Libgaim: msn) destroy httpconn (0x941bab0)
09:13:40: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 92
09:13:42: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 237
09:13:42: friend@.com: Added Custom Smiley oh
09:13:42: (Libgaim: msn) C: SB 006: MSG 23 D 809
09:13:42: (Libgaim: msn) S: SB 006: ACK 23
09:13:42: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 133
09:13:42: adiumGaimConvWriteIm: Received <FONT FACE="宋体"><FONT COLOR="#400080">oh</FONT></FONT> from friend@.com
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 144
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 478
09:13:43: (Libgaim: msn) C: SB 006: MSG 24 D 144
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 148
09:13:43: (Libgaim: msn) C: SB 006: MSG 25 D 144
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:43: (Libgaim: msn) S: SB 006: ACK 24
09:13:43: (Libgaim: msn) S: SB 006: ACK 25
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:43: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:44: (Libgaim: util) Writing file blist.xml to directory /Users/timf/Library/Application Support/Adium 2.0/Users/b7/libgaim
09:13:44: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:45: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1346
09:13:45: (Libgaim: msn) S: SB 006: MSG friend@.com sofi_放晴了,真不容易 1197
09:13:45: friend@.com: Write Custom Smiley oh (6079000 15477)
09:13:45: friend@.com: Close Custom Smiley oh
09:13:45: Trying to update oh<7644880> (Equivalents: (oh)) [in (null)] (oh)
09:13:45: (Libgaim: msn) C: SB 006: MSG 26 D 144
09:13:45: (Libgaim: msn) S: SB 006: ACK 26

Also while I was writing this, I changed back to the message window which I had received the custom emotes in and some of the previous "?" images which I had clicked on to toggle them to their text equiv and back to the "?" image had changed to the contacts avatar/display image (not the custom emote). This seems to only happen if I leave the message window with the custom emotes in it open in the background for a while (covered by another apps window).

Strange :(

comment:68 Changed 13 years ago by Evan Schoenberg

(In [17296]) Expanded debug logging when updating after receiving a custom emoticon. Refs #3941. Please post the debug log of attempting to receive an emoticon there.

comment:69 Changed 13 years ago by timfrench@…

More debug:

11:04:02: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 95
11:04:04: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 240
11:04:04: friend@.com: Added Custom Smiley 55~
11:04:04: (Libgaim: msn) C: SB 001: MSG 10 D 823
11:04:04: (Libgaim: msn) S: SB 001: ACK 10
11:04:04: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 129
11:04:04: adiumGaimConvWriteIm: Received <FONT FACE="宋体"><FONT COLOR="#000000">55~</FONT></FONT> from friend@.com
11:04:04: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~.gif" alt="55~" width="16" height="16">
11:04:04: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~.gif" alt="55~" width="16" height="16">
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 144
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 482
11:04:05: (Libgaim: msn) C: SB 001: MSG 11 D 147
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 148
11:04:05: (Libgaim: msn) C: SB 001: MSG 12 D 147
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: ACK 11
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: ACK 12
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:05: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
11:04:06: (Libgaim: msn) S: SB 001: MSG friend@.com xiaoming_“脱“得不错,大有前途 501
11:04:06: friend@.com: Write Custom Smiley 55~ (69cc000 20791)
11:04:06: friend@.com: Close Custom Smiley 55~
11:04:06: Trying to update 55~<74bef00> (Equivalents: ("55~")) [in (null)] [textEquivalent is 55~]
11:04:06: Not updating: className:buddyicon alt:""
11:04:06: Not updating: className:buddyicon alt:""
11:04:06: Not updating: className:buddyicon alt:""
11:04:06: Not updating: className:emoticon alt:"哈哈"
11:04:06: Not updating: className:emoticon alt:"ls"
11:04:06: AIWebKitMessageViewController: Setting <DOMHTMLImageElement [IMG]: 0x98fac00 ''>'s src to file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~.gif
11:04:06: (Libgaim: msn) C: SB 001: MSG 13 D 147
11:04:07: (Libgaim: msn) S: SB 001: ACK 13
11:04:14: (Libgaim: msn) C: NS 000: PNG
11:04:14: (Libgaim: msn) S: NS 000: QNG 49

comment:70 Changed 13 years ago by Evan Schoenberg

(In [17298]) We should use a unique file name each time a custom emoticon changes. Doing so means we don't need to uniquify the file before passing it to a webview elsewhere... the web view will cache any image file and refuse to reload it. I think this is part of why emoticons aren't updating after being written -- we were setting the src back to the same file name (as can be seen in the debug log in #3941. This may fix the problem... Refs #3941. Also, use an unsigned long long counter to uniqueify outgoing temporary user icons rather than a random 4-character string.

comment:71 Changed 13 years ago by timfrench@…

It's working now. The "?" initially appears and is quickly replaced by the real custom emote. The first time a custom emote is received, it appears as the same size as the "?" image (16x16px). If toggled between text/image by clicking it the size changes the the real size of the image. Also if the custom emote is received in later messages it appears as the real images size - not the "?" image size (16x16px).

Debug:

12:16:47: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 95
12:16:48: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 240
12:16:48: friend@.com: Added Custom Smiley 55~
12:16:48: (Libgaim: msn) C: SB 002: MSG 2 D 822
12:16:49: (Libgaim: msn) S: SB 002: ACK 2
12:16:49: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 129
12:16:49: adiumGaimConvWriteIm: Received <FONT FACE="宋体"><FONT COLOR="#000000">55~</FONT></FONT> from friend@.com
12:16:49: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~_0.gif" alt="55~" width="16" height="16">
12:16:49: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~_0.gif" alt="55~" width="16" height="16">
12:16:49: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 144
12:16:49: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 481
12:16:49: (Libgaim: msn) C: SB 002: MSG 3 D 147
12:16:49: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 148
12:16:49: (Libgaim: msn) C: SB 002: MSG 4 D 147
12:16:49: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: ACK 3
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: ACK 4
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:50: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:51: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:52: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:52: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:52: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:52: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
12:16:52: (Libgaim: msn) S: SB 002: MSG friend@.com xiaoming_“脱“得不错,大有前途 501
12:16:52: friend@.com: Write Custom Smiley 55~ (604d000 20791)
12:16:52: friend@.com: Close Custom Smiley 55~
12:16:52: Trying to update 55~<67bcd60> (Equivalents: ("55~")) [in (null)] [textEquivalent is 55~]
12:16:52: Not updating: className:buddyicon alt:""
12:16:52: Not updating: className:buddyicon alt:""
12:16:52: Not updating: className:buddyicon alt:""
12:16:52: Not updating: className:buddyicon alt:""
12:16:52: AIWebKitMessageViewController: Setting <DOMHTMLImageElement [IMG]: 0x968cc00 ''>'s src to file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_55~_1.gif
12:16:52: (Libgaim: msn) C: SB 002: MSG 5 D 147
12:16:53: (Libgaim: msn) S: SB 002: ACK 5

comment:72 Changed 13 years ago by Evan Schoenberg

(In [17299]) Attempt to fix the width/height of the emoticon when it's first received. Refs #3941. Does it work?

comment:73 Changed 13 years ago by timfrench@…

This works, in that it replaces the "?" image with the custom emote image at it's real image size but if the height of the custom emotes image extends past the bottom of the message window, it gets cut off - ie: the message window doesn't scroll the message up to show the entire image. Toggling the custom emote between image/text results in the message window scrolling up to show the entire custom emote image.

Will attach screenshot of cut off custom emote image...

Debug:

13:31:05: (Libgaim: msn) S: SB 007: IRO 1 1 1 friend@.com xiaoming_“脱“得不错,大有前途
13:31:05: (Libgaim: msn) S: SB 007: ANS 1 OK
13:31:07: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 95
13:31:08: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 95
13:31:12: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 242
13:31:12: friend@.com: Added Custom Smiley come
13:31:12: (Libgaim: msn) C: SB 007: MSG 2 D 823
13:31:12: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 130
13:31:12: adiumGaimConvWriteIm: Received <FONT FACE="宋体"><FONT COLOR="#000000">come</FONT></FONT> from friend@.com
13:31:12: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_come_4.gif" alt="come" width="16" height="16">
13:31:12: AIHTMLDecoder: appending <img class="emoticon" src="file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_come_4.gif" alt="come" width="16" height="16">
13:31:12: (Libgaim: msn) S: SB 007: ACK 2
13:31:13: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 144
13:31:13: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 482
13:31:13: (Libgaim: msn) C: SB 007: MSG 3 D 147
13:31:13: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 148
13:31:13: (Libgaim: msn) C: SB 007: MSG 4 D 147
13:31:13: (Libgaim: msn) S: SB 007: ACK 3
13:31:13: (Libgaim: msn) S: SB 007: ACK 4
13:31:14: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 1346
13:31:16: (Libgaim: msn) S: SB 007: MSG friend@.com xiaoming_“脱“得不错,大有前途 913
13:31:16: friend@.com: Write Custom Smiley come (1ba3400 1971)
13:31:16: friend@.com: Close Custom Smiley come
13:31:16: Trying to update come<15d3640> (Equivalents: (come)) [in (null)] [textEquivalent is come]
13:31:16: Not updating: className:buddyicon alt:""
13:31:16: Not updating: className:buddyicon alt:""
13:31:16: Not updating: className: alt:"ku"
13:31:16: Not updating: className: alt:"55~"
13:31:16: AIWebKitMessageViewController: Setting <DOMHTMLImageElement [IMG]: 0x9626320 ''>'s src to file://localhost/Users/timf/Library/Caches/Adium/b7/TEMP-CustomEmoticon_MSN.friend@.com_come_5.gif
13:31:16: (Libgaim: msn) C: SB 007: MSG 5 D 147
13:31:17: (Libgaim: msn) S: SB 007: ACK 5
13:31:18: (Libgaim: msn) C: NS 000: PNG
13:31:18: (Libgaim: msn) S: NS 000: QNG 41

Changed 13 years ago by timfrench@…

Attachment: custom-emote-cut-off-1.png added

Custom emote image appears at the correct real size of the image but is cut off by the bottom of the message window

comment:74 in reply to:  73 ; Changed 13 years ago by Sirius

Replying to timfrench@gmail.com:

This works, in that it replaces the "?" image with the custom emote image at it's real image size but if the height of the custom emotes image extends past the bottom of the message window, it gets cut off - ie: the message window doesn't scroll the message up to show the entire image. Toggling the custom emote between image/text results in the message window scrolling up to show the entire custom emote image.

Just wondering, could that be related to the window scrolling bug present in some message views? It looks a lot like it.

comment:75 in reply to:  74 Changed 13 years ago by timfrench@…

Replying to Sirius:

Just wondering, could that be related to the window scrolling bug present in some message views? It looks a lot like it.

I think you are right. The lack of scrolling up occurs when using the default "Stockholm" message style but it correctly scrolls up when using SmoothSeperateLines message style.

I guess that means it's the message style at fault?

comment:76 Changed 13 years ago by Chris Forsythe

Milestone: Adium X 1.1Adium X 1.2

comment:77 Changed 13 years ago by Juan Manuel Palacios

Milestone: Adium X 1.2Adium X 1.0.1
Resolution: fixed
Status: newclosed

The original issue reported in this ticket, custom emoticons failing to display at all in various situations, seems to be fixed, so I believe this ticket should be closed to reflect that fact. The pending issue, which is scrolling in a message style, is of a different nature and affects other areas of adium as well, not just custom emoticons, so a new ticket should be opened for it if one doesn't already exist (I've been searching but I can't find a relevant entry -- if anyone does, please appended it here to point users to it, thanks!). In any case, that discussion doesn't belong in here, so I'm closing this as resolved.

-jmpp

PS: I'm also moving the ticket to the 1.0.1 milestone, as the real issue was fixed for 1.0 but that milestone is no longer available.

comment:78 Changed 9 years ago by Robert

Patch Status: Accepted
Note: See TracTickets for help on using tickets.