OMG fails to register all trophies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OMG |
High
|
Manish Sinha (मनीष सिन्हा) |
Bug Description
OMG seems to only pick up on some of my trophies, for some reason. It seems to be a bit random which ones are recognized, as this time it recognized 7 out of 9, but the last time I tried it recognized 4 out of 9 (some of which weren't recognized this time). The trophies are all generated the same way, so they should all work.
nevon@loltop:~$ ls --width=1 .local/
omgwords-Amateur blogger.trophy
omgwords-Cursed fellow.trophy
omgwords-
omgwords-Lucky bastard.trophy
omgwords-Marathon man.trophy
omgwords-Mr Meticulous.trophy
omgwords-
omgwords-rPo typits.trophy
omgwords-
omgwords-Word junkie.trophy
omgwords-
nevon@loltop:~$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require("luomg")
> t = luomg.GetTrophies()
> =#t
7
> for i,v in pairs(t) do
>> print(v.Title)
>> end
Marathon man
Mr Meticulous
World-class typist
Threesome
Cursed fellow
rPo typits
Penguin
Please let me know what other information I can provide you with. I'm using the very latest versions of both omg and luomg.
Changed in omg: | |
importance: | Undecided → High |
status: | New → Triaged |
Tommy,
When do you encounter this problem? When you copy-paste many trophies in ~/.local/
In yes, then probably it's a synchronization problem. I guess there is an issue of race condition.
Tommy Brunn (tommybrunn) wrote : | #3 |
I don't copy-paste anything in there, but my program generates these 9 achievements one after another in rapid succession, so I would assume the effect is the same as if I was copy-pasting them all in there.
Tommy,
I just wanted to know how the trophies are being registered?
BTW I am trying to fix it assuming it as a race condition
Tommy Brunn (tommybrunn) wrote : | #5 |
You mean how they're generated? Like this: http://
Then when I want to register a trophy I just do:
AwardManager:
Here's an example trophy file: http://
The trophies are all written to ~/.local/
I tried my best to re-create the problem. I tried copying 7 trophies via copy-paste, but still OMG! works without any problem and they are saved to the disk without any problem..
I then tried fetching those values via D-Feet debugger and again it still manages to work.
I had 3 trophies initially, then suddenly I dropped 7 trophies. Finally the xml file had 10 trophies.
Here is the OMG! log
manish@
Attempting to load the Trophies from the store
Successful in loading trophies from the store
DBus Registered: /org/gnome/
Found the file: /home/manish/
Found the file: /home/manish/
Found the file: /home/manish/
Found the file: /home/manish/
Found the file: /home/manish/
Found the file: /home/manish/
Found the file: /home/manish/
Data flushed to store
Data flushed to store
Data flushed to store
When I try to fetch the file via DBus, I am getting all the 10 trophies. Weird. Please try it via D-Feet instead of luomg
Tommy Brunn (tommybrunn) wrote : | #7 |
Tried it yet again, and this time on another computer. There's 13 trophy files in .local/
I just setup OMG on my laptop. I am still able to get all the trophies. Still not able to find the problem in fetching the trophies.
BTW I faced the race condition. I put all the 10 trophies at once. OMG! picked all 10 of them but saved only the first. Will fix this problem.
I will talk to people in zeitgeist team to try to replicate this problem of getting less trophies than what is actually registered.
Plus I will make the daemon output even more verbose so that you can see where the problem is.
Tommy, one more thing
>>Tried it yet again, and this time on another computer. There's 13 trophy files in .local/
Case 1:
You mean to say that even though you have 13 trophies in .local/
Case 2:
If there are 13 trophies in .local/
Can you check and tell which problem you facing? Case 1 or Case 2?
Tommy Brunn (tommybrunn) wrote : | #10 |
Sorry for not being clearer. trophies.xml only contains 9 trophies, so we're dealing with case #2 here.
I can confirm that it is a problem of synchronization (Parsing and saving of trophies should be critical section and only one thread should be allowed to access it)
Even I tried and am able to replicate Case 2.
Thanks Tommy. Will be fixed ASAP
Changed in omg: | |
assignee: | nobody → Manish Sinha (manishsinha) |
milestone: | none → 0.1 |
status: | Triaged → Confirmed |
I was able to replicate this issue both on my desktop and laptop.
NOw I fixed this issue in commit 62. Please try getting the code, cleaning the trophy folder, deleting the trophies.xml file
Now run omg daemon and register many trophies (say 10-15) and then check the daemon log. It is now even more verbose
Then check the created trophies.xml file. It should contain all the trophies.
I have tried this is on my desktop and laptop both. It fixes the problem.
Please let me know if it fixes the issue.
Changed in omg: | |
status: | Confirmed → In Progress |
Tommy Brunn (tommybrunn) wrote : | #13 |
I can confirm that this does indeed solve the problem. All trophies were registered and successfully awarded!
The issue has been fixed.
ATM, there are no show-stopper bugs for release "0.1 inception"
Changed in omg: | |
status: | In Progress → Fix Committed |
Changed in omg: | |
status: | Fix Committed → Fix Released |
assignee: | Manish Sinha (manishsinha) → braulioareis (braulioareis) |
Changed in omg: | |
assignee: | braulioareis (braulioareis) → Manish Sinha (manishsinha) |
status: | Fix Released → Fix Committed |
I will have to look into it.
This problem sounds weird, but will try to replicate.
If I need something else, I will let you know.