Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: MultiformeIngegno on January 28th, 2014, 12:13 AM

Title: follow_me() bug, shows up from time to time.
Post by: MultiformeIngegno on January 28th, 2014, 12:13 AM
Just for the records it happened again now (Firefox 26.0)
Title: Re : follow_me() bug, shows up from time to time.
Post by: Nao on January 28th, 2014, 01:25 PM
Does it happen when you come back to a tab, or when you first load it?

In the past, I found that very rarely, when coming back to a tab (in Chrome), my div size math was returning a zero and I was stuck with zero-width divs in the user box. Sometimes I would also get much larger sizes than expected. I fixed that by being more careful about tab switching, but maybe Firefox doesn't play along.

Is the text out of bounds only when it's in follow_me mode, or even outside of it? (e.g. you're viewing the post before it.)
Title: Re : follow_me() bug, shows up from time to time.
Post by: MultiformeIngegno on January 28th, 2014, 01:29 PM
Mmm I think it happens when I add a reply.. not 100% sure about though though :(
Title: Re : follow_me() bug, shows up from time to time.
Post by: Nao on January 28th, 2014, 01:31 PM
I'm definitely not experiencing these. :-/ (And I'm in Firefox 27. Which uses the same codepath.)
Title: Re : follow_me() bug, shows up from time to time.
Post by: Nao on January 29th, 2014, 03:58 PM
Okay, I can (finally!) reproduce this all the time... Under Opera 20 Developer, with web platform disabled.
Take a topic that only has me in it (hello!), such as Plugin Revs or New Revs.
From the homepage, open it in a new tab by middle-clicking it.
*Wait for it to load*. This is important!
Then switch to it. Problem reproduced.
If you switch to the new tab as soon as you launch it, then the script will apply proper dimensions to the user box. If you don't, then it will screw up.
Which is really, really odd because topic.js has pagevisibility events that are specifically there to avoid this problem... :-/

Can anyone confirm, maybe..? With Chrome, or Firefox, or anything?
Title: Re: follow_me() bug, shows up from time to time.
Post by: Pandos on January 29th, 2014, 04:38 PM
Can confirm with Chrome Version 33.0.1750.46 beta-m
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on January 29th, 2014, 06:54 PM
Hmm, okay then...
Perhaps it's due to my latest 'fix', I don't know. I only inverted two things, and I don't even think it had an influence.
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on March 27th, 2014, 07:43 PM
Can anyone reproduce this again?

Personally, not.
Title: Re: follow_me() bug, shows up from time to time.
Post by: Farjo on March 29th, 2014, 09:01 PM
Nor me.
Title: Re: follow_me() bug, shows up from time to time.
Post by: Farjo on April 10th, 2014, 02:11 PM
So I guess this if fixed then and can be marked as solved and moved?
Title: Re: follow_me() bug, shows up from time to time.
Post by: Pandos on April 10th, 2014, 02:24 PM
Seems to be fixed :)
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on April 10th, 2014, 02:55 PM
I still rarely get the bug where I get a 10000px+ height on every post when loading the tab in the background. So it's not fully fixed.
I dunno if I should wait for Google to enable position sticky outside of the web platform flag. Not sure why they've been waiting so long for that... Something like 2 years! Even Firefox has yet to unprefix it... Why? Works so well for me...
Title: Re: follow_me() bug, shows up from time to time.
Post by: Farjo on April 10th, 2014, 03:19 PM
"unprefix" is a nice word :)

So if it's rare then if Google enable it then it can be changed, and if they don't then, well, it is a rare problem. If I saw it I'd probably think 'bloody internet' and hit F5, which presumably fixes it.
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on April 16th, 2014, 12:32 AM
My setup when I reproduced the bug nearly every time:
- Opera Next 21.0, Web Platform flag disabled (i.e. the default, with no sticky positioning)
- Using Sidewise add-on, but I doubt it's related to this. It's just a cool Chrome add-on.
- On the homepage, middle-click a topic with at least one unread reply.
- Wait a bit, switch to that tab, bug present.

I spent my afternoon on this. It's very hard to debug something that only happens when someone posts a new message... ;) Still, it also happened from time to time on read topics.
From what I could gather, when this happens, .poster > div returns a width of 12px. Which is the horizontal padding surrounding it (don't ask me, I'm not sure why this happens.) Anyway, I 'simply' added a fallback at the start, saying basically, "if the width is less than 20px, then it's probably going to screw up, so try again in half a second". And it works. Half a second later, it always gives me the proper width.
I added a second failsafe in the form of a limitation on the number of retries. If after 10 seconds it's still buggy, then it's not worth waiting more. Just execute the-damn-thing™. (I could probably get away with 5 seconds...)

Please test new topics for you in here (if you already were able to reproduce before), and tell me if it's okay to commit!

Bed time! Okay, that was 30 minutes ago... But at least I fixed the-damn-thing™! I hope I did, at least. :P
Title: Re: follow_me() bug, shows up from time to time.
Post by: Sara on May 5th, 2014, 11:04 AM
Just FYI, this bug has not been fixed.  I just saw the same error just now, here.
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on May 23rd, 2014, 01:40 AM
After a full day of work on this, I may have fixed the bug for good..... Please everyone, test all you can on this site!
Title: Re: follow_me() bug, shows up from time to time.
Post by: Leftie on May 23rd, 2014, 09:22 AM
(click to show/hide)
Quote from Nao on January 29th, 2014, 03:58 PM
Okay, I can (finally!) reproduce this all the time... Under Opera 20 Developer, with web platform disabled.
Take a topic that only has me in it (hello!), such as Plugin Revs or New Revs.
From the homepage, open it in a new tab by middle-clicking it.
*Wait for it to load*. This is important!
Then switch to it. Problem reproduced.
If you switch to the new tab as soon as you launch it, then the script will apply proper dimensions to the user box. If you don't, then it will screw up.
Which is really, really odd because topic.js has pagevisibility events that are specifically there to avoid this problem... :-/

Can anyone confirm, maybe..? With Chrome, or Firefox, or anything?

I too have noticed this bug from time to time, but never saw the steps to reproduce it consistently. Thus all I can confirm right now is that the above steps do not cause it to manifest. At least not anymore. At least not on Firefox 29.0.1. At least not on my computer.

I'm sure that was incredibly helpful ::)
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on May 23rd, 2014, 11:35 PM
I THINK I've fixed it (again), with the removal of my min-height restraints.

It still doesn't guarantee that a wrong width will be calculated, which might influence paddingTop when scrolling down and thus re-create the infamous infinite height divs, BUT at least there's one less thing to calculate, and this makes it all faster.

Please keep me posted, guys...
Title: Re: follow_me() bug, shows up from time to time.
Post by: Sara on May 29th, 2014, 09:44 PM
I will keep you posted!  Thank you for the effort in fixing this!
Title: Re: follow_me() bug, shows up from time to time.
Post by: Nao on May 29th, 2014, 10:20 PM
It was turning me crazy ;)

Current browser implementations of flexbox just aren't fault-free, and I need them to work yesterday!