It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
avatar
Johny.: ng-repeat error cause is having duplicate products inside of the array. Possibly when you return to the same page, or change filtering, you try to concat those arrays instead of clearing old one. I didn't dive into your code, but does that make sense?
Yeah, I see that's the issue now. I'm not sure where the problem is coming from but I assume it's when I slice the sorted array to get the pages. I thought I'd made sure they arrays were emptied first but I'll go over it again and check.

avatar
HypersomniacLive: snip
Thanks Hyper. That really helps, it's obviously just a general issue related to the pages and manual sorting rather than something to do with array sizes (which means it's most likely just a silly error I've made as opposed to needing to revamp what I'm doing, hopefully)
high rated
avatar
adaliabooks: Yeah, I see that's the issue now. I'm not sure where the problem is coming from but I assume it's when I slice the sorted array to get the pages. I thought I'd made sure they arrays were emptied first but I'll go over it again and check.

Thanks Hyper. That really helps, it's obviously just a general issue related to the pages and manual sorting rather than something to do with array sizes (which means it's most likely just a silly error I've made as opposed to needing to revamp what I'm doing, hopefully)
Fingers crossed you get it sorted without investing (too) much effort and time.
high rated
avatar
adaliabooks: Yeah, I see that's the issue now. I'm not sure where the problem is coming from but I assume it's when I slice the sorted array to get the pages. I thought I'd made sure they arrays were emptied first but I'll go over it again and check.

Thanks Hyper. That really helps, it's obviously just a general issue related to the pages and manual sorting rather than something to do with array sizes (which means it's most likely just a silly error I've made as opposed to needing to revamp what I'm doing, hopefully)
avatar
HypersomniacLive: Fingers crossed you get it sorted without investing (too) much effort and time.
Thanks Hyper. It should be simple, out of so many thousands of lines of code it's only three or four that relate to this so I'm not sure why I haven't figured it out already, but hopefully I'll spot it soon.
avatar
HypersomniacLive: I've redone the Cossacks Anthology covers:

Cossacks - European Wars --> 1207662843
I'm not sure you've included this one.
high rated
avatar
mrkgnao: I'm not sure you've included this one.
Great, it'd seem that I messed things up. What's worse, I scrapped all the versions I had done, including the final one.

*goes back to start from scratch sighing*
avatar
plagren: In my opinion, both could use new covers [...]
avatar
HypersomniacLive: Already taken care of. :-)
Ah, nice. I'd still like to get rid of the "Special Edition" text, but that's not a big issue. :-P
high rated
avatar
mrkgnao: I'm not sure you've included this one.
avatar
HypersomniacLive: Great, it'd seem that I messed things up. What's worse, I scrapped all the versions I had done, including the final one.

*goes back to start from scratch sighing*
IIRC, tinyE always says that Cossacks is a very frustrating game.
avatar
HypersomniacLive: Great, it'd seem that I messed things up. What's worse, I scrapped all the versions I had done, including the final one.

*goes back to start from scratch sighing*
avatar
mrkgnao: IIRC, tinyE always says that Cossacks is a very frustrating game.
He says that about nearly every GOG title...
high rated
avatar
HypersomniacLive: Already taken care of. :-)
avatar
plagren: Ah, nice. I'd still like to get rid of the "Special Edition" text, but that's not a big issue. :-P
Might want to wait another 24 hours. I have one I'm nearly finished with.
avatar
mrkgnao: IIRC, tinyE always says that Cossacks is a very frustrating game.
avatar
foxworks: He says that about nearly every GOG title...
Except Commandos.
high rated
avatar
mrkgnao: IIRC, tinyE always says that Cossacks is a very frustrating game.
Nah, it's karma - I thought of something rather mean while I was working on that cover.
high rated
Ok, I've tried mrkgnao's suggestion to show 10 games per page so I could have more pages, and I was able to go right up to page 12 and back no problem, no errors and all games showing as far as I could tell. Last pages was empty (but there should only have been 11 pages, so that was fine and presumably just an error in my implementation of less games per page).
Trying to use mrkgnao's output of his games list to fool GoG into thinking I had more games... kind of worked. But it (somehow, I have no idea where it checked it) knew which games I did and didn't actually own and most of the library was just blank grey boxes so it was hard to tell what was and wasn't working.

So basically (yet again) I'm completely unable to reproduce the bug myself to try and get to the bottom of it.
I do remember having this duplicate problem before, when I was first trying to implement the games per page options, but can't quite remember what the issue was then (I think it was not emptying the arrays, which I seem to be doing right this time)

As I see it there are three possible places the problem could occur:

1) The games are retrieved from GoG's server. For non-manual sort each 100 game page is saved as a separate object with it's page number, so they are sorted correctly and there is no chance of duplicates. For manual sort I have to combine all the games to one array so I can sort them and it's possible that there is some problem here that is meaning games get added twice.
But looking through foxworks and mrkgnao's raw lists neither shows duplicates, so right now that's not a likely culprit.

2) The games are sorted. I can't quite see why or how this could cause duplication... but I'm not ruling it out. It could be there is an error somewhere in the sort function (though it's quite straight forward) or that the next bit is happening mid sort (again, this really shouldn't be happening) so that a game is placed and then moved and placed again (still shouldn't cause the error, but possibly a game appearing on multiple pages...)
I don't really see how this can be the problem, but if someone wouldn't mind checking by commenting out line 2766 (document.dispatchEvent(new Event("manualSortEvent"));) and running through the pages of their library I'd be grateful. This will stop the games actually being sorted (so expect them to be in the currently selected GoG sort order), while still doing all the other behind the scenes parts which may be an issue.

3) The games are sliced from the sorted array into separate page arrays (similar to how they are originally created in non manual sort). This seems the likely cause of issues, though again I can't quite see why as the arrays are dumped and recreated before the operation occurs and as only one slice occurs per object I can't see why it would make duplicates, unless I'm missing something.

avatar
Johny.: snip
I don't suppose there's some kind of test account I could use with access to the full library (minus the ability to download obviously) so I might actually be able to find a see these errors myself?
Post edited January 05, 2016 by adaliabooks
high rated
avatar
adaliabooks:
I might have a clue.

The issues I had reported before were all seen at home. Now I'm at work, so I tried to have a look and could not reproduce the problem. So I tried to think what was different and then it hit me. At home, I did reset sort order.

So I clicked "reset sort order" and, lo and behold, the issue appeared here too...
high rated
avatar
adaliabooks:
avatar
mrkgnao: I might have a clue.

The issues I had reported before were all seen at home. Now I'm at work, so I tried to have a look and could not reproduce the problem. So I tried to think what was different and then it hit me. At home, I did reset sort order.

So I clicked "reset sort order" and, lo and behold, the issue appeared here too...
Ok. So everything worked fine and no issues with manual sort until you reset?

Hmmm. I don't see why resetting should cause a problem.. it basically just deletes the saved sort order so when the function goes to retrieve it it doesn't find it and recreates it from scratch. Which is what it does the first time you load up and put manual sort on...

Thanks, that gives me another angle to look at.

Oh, and out of curiosity. Have all the same issues appeared? The missing pages due to the duplication error and the bad sort order you'd encountered before?
high rated
avatar
plagren: Ah, nice. I'd still like to get rid of the "Special Edition" text, but that's not a big issue. :-P
I got a bit lazy with those, and just added the missing text, so looking forward to seeing what Gydion came up with.


And I think I've finally got the Cossacks Anthology covers right. Edited the attached files in my post #810.



@adaliabooks

I did not try the "reset sort order" earlier. Would you like me to do so, and report on what happens?