Quarry forgets preferences

Bug #54401 reported by Bjørn Ingmar Berg
8
Affects Status Importance Assigned to Milestone
quarry (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: quarry

Adding the gnu-go engine as described in the Quarry help-text works as intended. It is possible to play games against gnu-go as well as get it to play itself.
But Quarry does not seem to store the setting anywhere, and the next time Quarry is started gnu-go has to be configured all over.

Quarry does create the file .quarry in /home/username
However the file contains nothing and the size stays zero. It looks as if Quarry deletes everything in the file upon exit.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

This certainly isn't a bug of Quarry. It stores its preferences just fine. If it happens, it's a bug of Ubuntu package.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

This certainly is a bug of Quarry in Ubuntu.

I have done a clean install of Dapper 6.06 with Quarry and GnuGo in order to verify it. This was a completely default install, and the Quarry package from the Universe respository. The error is there, and it is replicable.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

Updated from 6.06 to 6.10. No change.
Bug behaves exactly as described earlier.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

Does file `~/.quarry' exist? Is it writable by you? What happens if you delete the file (if it exists)? What user/group does Quarry run under?

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

> Does file `~/.quarry' exist?

Yes, as stated in the original bug-report.

> Is it writable by you?

Yes indeed. Both the file permissions, and testing if it can be edited manually shows that it is.

> What happens if you delete the file (if it exists)?

If I delete the file it gets deleted. It disappears from the catalog. It is no more. Gone to meet it's maker. Pushing up the daisies. It becomes an ex-file.
If I delete the file it gets recreated by quarry next time quarry runs. But just as in the original bug-report it stays zero bytes.

> What user/group does Quarry run under?

Myself, the user created as Ubuntu was installed. The user with priviledges to run sudo.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

I have done a test by installing quarry and gnugo on another computer. This computer was recently updated from 6.06 to 6.10 and has not had quarry nor gnugo installed previously.

The same bug happened here too, and behaved in exactly the same way.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

Please check CVS version if you can. It should print error messages to stderr on configuration writing error. If it saves configuration properly, this must be a bug in the package, not in Quarry itself.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

> Please check CVS version if you can.

Done. (To avoid possible "pollution" I let Synaptic completely remove the package Quarry including configuration files, and deleted the .quarry file from my home-directory before the './configure; make; make install' process.)

The CVS version did not want to compile, and as I'm not a programmer I couldn't figure out what was wrong right away. But as the latest "normal" release (Version 0.1.20) was only one day old I used that one.

When running Quarry in normal mode the .quarry file stays zero bytes. (The original error.) When running Quarry with "sudo quarry" from the command line or "gksu quarry" after pressing ALT-F2 I get the error message
<code>"Failed to execute child process "gnugo" (No such file or directory) Please make sure you typed engine’s filename correctly and that you have permission to execute it."</code>
upon trying to add the gnugo engine.

I think the version of Quarry I ended up with in this experiment is just as healthy as the one in the respository. I am able to play against gnugo using it, or let gnugo play itself. The only problem is that Quarry persists in not saving it's configuration.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

I released 0.1.20 after the proposal, so it is perfectly OK to use that.

Did you run Quarry from a terminal? It should print error messages _there_, not show a message box, etc. BTW, I'm interested in problems in CVS compilation too, could you post error messages here or, more appropriately, to Quarry mailing list?

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

Perhaps we're getting some place now. Let's hope so!

> Did you run Quarry from a terminal?

No. For some reason that didn't occur to me. But I have done so now, and I got a few messages in the console. This was a normal run where I added the gnugo engine, and had it complete a match against itself. I got no popup windows with errors etc.

me@mycomp:~$ quarry
Unmatched element: docinfo
Unmatched element: releaseinfo
quarry: buffered-writer.c:178: buffered_writer_add_character: Assertion `!(character & 0x80) && character != '\n'' failed.
Aborted (core dumped)
me@mycomp:~$

I have no idea if this conweys any useful information,
but there it is.

> BTW, I'm interested in problems in CVS compilation too,
> could you post error messages here or, more appropriately,
> to Quarry mailing list?

Sure, why not. But let me warn you: I am not very experienced in this kind of thing, so the error I had might be completely trivial. And the output it gave me was very voluminous. Still, I'll gladly paste it into a bug-report on the Quarry homepage.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

OK, then it is indeed a bug of Quarry, not of a package. If you post the full command line to run GNU Go on your machine and the used screen name for it, I will likely track the bug down.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

I believe the bug is fixed now and was caused by non-ASCII character in your name. To check, we need to sort out your problem with CVS building. I'm not sure if you have received a reply to that bug, please check the bug page at https://gna.org/bugs/?7585

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

The installed version of gnugo is the one that is current in the Ubuntu respository. It is version
3.7.9-1 (edgy)
and it resides in
/usr/games

The command I used to run it from within Quarry was copied and pasted from the Quarry help-text. To be presice:
gnugo --mode gtp --quiet
The screen name I left untouched:
%n %v

> I believe the bug is fixed now and was caused by
> non-ASCII character in your name.

This is a bit of a surprise. True, my real name contains special characters, but I've made sure my login-name and home catalog only contains letters in the a-z range.

I will look at the bug page and try a new build tomorrow.
Unfortunately I don't have time to look into it today.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

But Quarry tries to get your real name from the system. You can check in New Game Dialog.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

I've built and installed Quarry from the CVS on it's homepage. The results are documented there. ( https://gna.org/bugs/?7585 ) So far there still seems to be a problem.

When this is solved eventually, will there be released a new bugfixed version in the edgy respositories, in th same way as when security risks are discovered?

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

> [ The bug ] is fixed now and was caused by
> non-ASCII character in your name.

I have experimented to verify this.

I changed my real name in the user administration tool, and removed the special nordic character. After I did this, the bug disappeared.

Then I changed my real name back to the original. Quarry still worked fine. But I noticed my real name was still without nordic characters in the "new game" dialog in Quarry.

So I edited the .quarry file to include my real name, including the nordic characters. Now Quarry gave the "usual" error-message, and reduced the .quarry file to zero bytes.

The good thing about this is that the reason for the problem is precisely located and defined.
The bad thing is that most languages have some special characters, and users with special characters in their names will wish to keep them. Meaning this is a bug without any acceptable work-around.

Revision history for this message
Paul Pogonyshev (doublep) wrote :

I agree, but I think it is fixed. I tried adding Cyrillic character (non-ASCII!) in the name and other configuration strings and it works fine in latest CVS version.

It is expected that Quarry remembers the last entered (or set by default) name, so it should not notice if you change your real name in the system after it has stored some configuration.

Regarding Ubuntu package update, that's up to Quarry maintainer in Ubuntu. I hope he reads this.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

Sounds great! I'll get the updated CVS version and check it out.

Revision history for this message
Bjørn Ingmar Berg (bergcube) wrote :

I think I must have messed something up when trying to use the CVS snapshot.

./configure looks like it works well.

but make gives an error. s far as I can understand this is the relevant part of the output:

rm -f ru.gmo && /usr/bin/msgfmt -c --statistics -o ru.gmo ru.po
ru.po:1869: number of format specifications in 'msgid' and 'msgstr[0]' does not match
/usr/bin/msgfmt: found 1 fatal error

Any tips?

Revision history for this message
Paul Pogonyshev (doublep) wrote :

Is this still present with 0.2.0?

Changed in quarry:
assignee: nobody → rainct
importance: Undecided → Medium
status: New → Incomplete
Changed in quarry:
assignee: rainct → nobody
Revision history for this message
Siegfried Gevatter (rainct) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in quarry:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.