google-code-export / evennia

Automatically exported from code.google.com/p/evennia
Other
1 stars 0 forks source link

Occational loss of Player/Character cmdsets at initial startup #433

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A) What steps will reproduce the problem?

1. Do syncdb/migrate to build a new database (tested with sqlite3)
2. Start server (in interactive mode is what I've tested, shouldn't matter), so 
far modification of settings.py does not seem to affect it. 
3. Log in as superuser. RARELY, you will log into the game and find you have no 
commands available because Player/Character cmdset have not been added 
correctly to the superuser Player/Character.

B) What is the expected output? What do you see instead (tracebacks, error
messages)?

The Player/Character cmdsets are added at initial_startup.py , by loading the 
superuser Player (#1) and attaching the default Player typeclass to it. It also 
always creates a Character of the same name. 

When this bug occurs, 
  ev.search_player("MyName").db_cmdset_storage.all() == []. 
  ev.search_object("MyName").db_cmdset_storage.all() == []
This seems to be randomly occurring and appears non-reproducable. Resetting the 
database, rerunning syncdb/migrate will (as far as I've seen) not reproduce the 
error. 

C) Further relevant information like Evennia revision, OS and other program
versions, and/or ideas about solving. Also choose 'Type' of the issue
below.

New users have occasionally reported this error for a long time, but it has 
been impossible to verify it since every time it has been impossible for devs 
to reproduce, possibly suggesting they unknowingly setup something in a strange 
way. The answer, to simply clean out the database and restart, has always 
worked. 

I've now seen it appear twice on the dev-clone. From those other reports it's 
clear this was an issue also in the main repo.

Possible reasons to exclude:
 - a syntax error in a cmdset (if so, tracebacks are swallowed)
 - some sort of timing-related error (database not ready at time of initialization?)
 - ?

Anyone noticing this error, do reply to this issue with any details on how one 
might reproduce it. 

Original issue reported on code.google.com by griatch on 15 Nov 2013 at 2:15