XBMC profile lock: Invalid lock code
#1
When going from master user to log in screen I am getting this error message when trying to log in as other users:
XBMC profile lock
Invalid lock code

I can login after restarting XBMC, but I don't understand why the error appears as none of the users (nor master user) are password protected.

The log reads "T:4604 ERROR: CSettings::GetCurrentProfile - last profile index (4294967295) is outside the valid range (3)"
More debug log here: http://pastebin.com/5QfKVawy

Can someone point me in the direction of a solution?
Reply
#2
anyone?
Reply
#3
Try backing up you profiles.xml by renaming it to profiles.xml.bak

Restart XBMC

If that works you probably have a corrupt profile, you can look inside the profiles.xml for the lock code and delete it,

Anyway if you just rename the file you can always restore it.

uNi

Reply
#4
Thanks for answering. I did as suggested. The new profiles.xml is identical to the original.

<lockmode>0</lockmode>
<lockcode>-</lockcode>

And the profile lock error still comes up after a couple of login screens and logins of different users...
(did you really post 900 times since October 2012?)
/Stefan
Reply
#5
Backup the file rename the profiles.xml to profiles.xml.bak in other words if this file is currupt create a new one..

Yes apparently I have posted 910 times >> trying to help others mostly <50 to 1 ratio in favour of helping...

http://wiki.xbmc.org/index.php?title=Med...es#Locking <<that shows the values <lockcode> should have "-" is not a valid entry unless its the lockcode?

uNi





Reply
#6
That is a lot of helping, it is greatly appreciated! I guess my ratio of Q&A is still in favor of Q.
Now, according to the wiki LockMode 0 is unlock, regardless of the value of the LockCode.

I tried to delete the line <lockcode>-</lockcode> before running XBMC. The profile lock-invalid lock code comes up again.
After trying this the line in profiles.xml changes to <lockcode></lockcode> (no value at all) but that doesn't change anything either.

For what it's worth, here is my complete profiles.xml: http://pastebin.com/KsyuBmzr
I don't know if it looks corrupt...
Reply
#7
what about if you rename/remove it it does a new one get created?

Does the problems still continue?

uNi
Reply
#8
Hmm, I tried to remove the profiles.xml, which removed my second user, but kept the master profile.
After creating a new second profile and enabling the loginscreen I once again tried to change user a couple of times. And the problem reappears...

In the new profiles.xml the new profile has the same values as before:
<lockmode>0</lockmode>
<lockcode>-</lockcode>

I could try to delete my master profile, but it is so customized, that I don't want to take the risk. Then I'd rather have to exit xbmc now and then. Can you reproduce the issue?
Reply
#9
I dont have an issue to reproduce with this. Nor am I able to reproduce it.

Back it up and remove it (rename it), you can always restore the profile if you back-it-up first

I have said a few times now (maybe I should be clearer) we want to remove all profiles to try and determine if there is any profile corruption going on.

If there is corruption re-customizing the master profile is a small price to pay, if indeed you want to fix this and it happens to be corruption.

thank you.

uNi
Reply
#10
You are right of course. I am ready to recustomize!
But what I did before was actually to remove both the files in the profiles folder and to remove the profiles.xml.

This however does not change the settings of the master profile. There is no userdata/masterprofile folder. So how do I delete more of the master profile?

Thank you for your patience,
Reply
#11
If all the files inside userdata/profiles are renamed then rename the guisettings.xml as that's where all the remainder xbmc settings are... Restarting xbmc after you rename all files. So your basically starting fresh (?)

If this works (the error is gone) you can then try to restore a file at a time inside the /userdata/profiles at a time, restarting xbmc in between until the problem presents itself, the you know which file is causing problems as you rename then back.

The last file guisettings.xml you will need to rename/remove the newer file to something else and rename the original (main) back, again presuming you didn't have a problem so far you are looking for the point where the problem presents itself. Then you know which file is borked by this triage method.

The information on profiles.xml is not present in wiki so its hard to know exactly what to do when there's no information to go on and for instance like me never had problems like this.

uNi
Reply
#12
I deleted guisettings.xml and profiles.xml.
Started up a new set of users and reproduced the error. And then it hit me!!!

I don't use the command logoff to go to the loginscreen. I jump directly to the loginscreen with this keyboard.xml command:
<l mod="ctrl,alt">ActivateWindow(LOGINSCREEN)</l>

I tried using the shutdown menu to log off, and this of course is working fine. So I will reinstall my guisettings and profiles and start to look for the real logoff command...
voila <l mod="ctrl,alt">System.LogOff</l>

The command is a little slower because of the log off proces, but no more invalid lock codes Smile

I am glad to have worked this out - I still wonder why the profile lock turned up though, should it be considered a bug, or does it make sense from a programming point of view.
Reply
#13
Yey, well the process either finds a bug or finds a error with the user. But seriously. Big Grin

Idk depends on the xbmc version you have because there was a commit to frodo https://github.com/xbmc/xbmc/commit/3c16...affa9556ce

Perhaps that's related or not., but at least you knows what causes it, now you know you can ask, maybe in IRC to some developer who can help you more than I can.

I'm glad that this whole process yielded positive results and perhaps now I can start to compile information on this mystical profiles.xml and documented on the wiki.

Glad your sorted.

uNi

Reply

Logout Mark Read Team Forum Stats Members Help
XBMC profile lock: Invalid lock code0