A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register sp_MemberList Members

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
My shop member list is broken
26 June, 2017
8:00 am
xorange
Player
Members
Forum Posts: 7
Member Since:
15 October, 2015
sp_UserOfflineSmall Offline

 I added someone to my shop member list, but it appears that I may have mistyped their name and possibly added an illegal character or something.

Now when I type "/shop members" I get an IndexOverflowException error.

Error

The member I attempted to add was not able to access my plot. Upon retyping the command, and ensuring I typed their name correctly, they were then able to access the plot. Thereby confirming that I seem to have made some kind of mistake previously, and confirming that my member list is still functional. I just can't view it, which is a bummer.

Could an admin please clear my shop member list?

Also, I'd be curious what I did to break it, so I don't do it again.

Thanks!

26 June, 2017
11:14 pm
Ben
UK
Admin
Forum Posts: 1030
Member Since:
30 August, 2013
sp_UserOfflineSmall Offline

Just to clarify, it was working before you unwittingly broke it? Just need to know for working out why it happened. Thank you for the detailed explanation, it'll help with troubleshooting!

Apologies if I don't get to this immediately, work and helping friends move is going to be keeping me busy this week. I'll try and clear your members list now, however. Into the database I go.

Edit:

That is why. The UUID doesn't exist, and somewhere I guess I'm joining that into the members table which would lead to someone that doesn't exist! Hence index 0 not existing, as it's an empty array. Thank you for finding a tasty bug!

What can the harvest hope for, if not for the care of the Reaper Man?

All great literature is one of two stories; a man goes on a journey or a stranger comes to town.

27 June, 2017
4:32 am
xorange
Player
Members
Forum Posts: 7
Member Since:
15 October, 2015
sp_UserOfflineSmall Offline

Ben said

Just to clarify, it was working before you unwittingly broke it? Just need to know for working out why it happened. Thank you for the detailed explanation, it'll help with troubleshooting!

Apologies if I don't get to this immediately, work and helping friends move is going to be keeping me busy this week. I'll try and clear your members list now, however. Into the database I go.

That is why. The UUID doesn't exist, and somewhere I guess I'm joining that into the members table which would lead to someone that doesn't exist! Hence index 0 not existing, as it's an empty array. Thank you for finding a tasty bug!  

Thank you, Ben! It's working now!

In fact, the first name I added was the one I mistyped, so I actually never got to see the list function work before I broke it. haha So I think the answer to your clarification is "IDK." However, I suspect everything was fine before I broke it.

If I mistyped the name, I wonder where it got the UUID from. I don't know much about MC UUIDs. Did it generate that based on the name I typed in? It doesn't appear to pull it from a Mojang user DB. It's odd that it can populate a UUID that doesn't correspond to a valid Mojang account. I'm just inferring behavior here, but it seems the plugin accepts an invalid MC username, which translates to an invalid UUID (somehow), then when a user lists members the plugin appears to check the UUID against the server's user list and freaks out when it doesn't match a user. If the plugin verified the UUID against the server's user list before adding it to the DB it seems like the problem might be solved. Though I could be way off.

Thanks for getting it working for me quickly. You're welcome for finding it. I'll make sure to double-check my typing. 😉

27 June, 2017
5:16 pm
Ben
UK
Admin
Forum Posts: 1030
Member Since:
30 August, 2013
sp_UserOfflineSmall Offline

It appears that if a name cannot be matched up to a valid UUID, an offline mode UUID is generated instead (which instead of being unique to an account, and independent of a name, the opposite applies and the same UUID is always generated for a particular invalid/offline mode name). I'm obviously missing a check against my main table there, so it was allowing the invalid UUID. Just need to go through and add in the extra check to deny names of those not in the database (this could be checked against the Mojang API, but it's a waste of a call when I've got them all cached in a fast list, 26747 strong and counting)!

What can the harvest hope for, if not for the care of the Reaper Man?

All great literature is one of two stories; a man goes on a journey or a stranger comes to town.

Forum Timezone: Europe/London

Most Users Ever Online: 195

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

pegasusdream: 1276

Timeflower2013: 1031

Jules1398: 780

Norwich: 678

JimJimJimmy88: 579

Blenchik: 432

Outrageous: 391

Phantom: 371

Khoa Dao: 336

Nestate: 326

Member Stats:

Guest Posters: 80

Members: 3397

Moderators: 15

Admins: 4

Forum Stats:

Groups: 3

Forums: 16

Topics: 3604

Posts: 19912

Newest Members:

Hanyoking, sofiaelena, parimatch777, Hoatzel, Evie Fig, SnaggingNickel, scarthells, PolarRhino, Turboblock, TheApeinater

Moderators: PandaPops74: 92, Brookster06: 3, Rapping Pizza Man: 6, FieryAutumn_Fox: 0, i_am_Dylan: 6, JumperSnipera: 93, Vanile: 9, Beast_MasterX: 0, GrayYoshi: 16, Luna_Lepus: 2, uni_xox: 0, FabCandy: 6, CactEyez: 1, ZombieKilla8181: 0, DiamondTrident: 3

Administrators: Hidee: 313, Ben: 1030, Wabbitface: 283, aHumbleTree: 10