Bug 526338 - Bots don't load due to bad file names
Bots don't load due to bad file names
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: quake3 (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Xavier Lamien
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-29 16:36 EDT by Kevin DeKorte
Modified: 2009-11-04 16:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-04 06:24:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Replace wrong strcpy by memmove (499 bytes, patch)
2009-11-02 16:33 EST, Andreas Bierfert
no flags Details | Diff

  None (edit)
Description Kevin DeKorte 2009-09-29 16:36:50 EDT
Description of problem:
Using Quake3 or OpenArena, the bots don't seem to load. I believe this is due to a filename parsing issue. For example the error

^1Error: file match.c, line 2: file matchh" not found

Seems there should be a "." in match.h. Also I found that the bots don't load with a similar message (with a little research I found the file name in default_c.c is "chars.h" so again the period seems to be being dropped.

^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't find skill 1 in bots/default_c.c
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't load any skill from bots/default_c.c
^1Error: file bots/kyonshi_c.c, line 2: file charsh" not found
^3Warning: couldn't find skill 1 in bots/kyonshi_c.c
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/kyonshi_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't load any skill from bots/kyonshi_c.c
^1Fatal: couldn't load skill 1.000000 from bots/kyonshi_c.c
^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't find skill 1 in bots/default_c.c
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't load any skill from bots/default_c.c
^1Error: file bots/ayumi_c.c, line 2: file charsh" not found
^3Warning: couldn't find skill 1 in bots/ayumi_c.c
^1Error: file bots/default_c.c, line 2: file charsh" not found
^1Error: file bots/ayumi_c.c, line 2: file charsh" not found
^1Error: file bots/default_c.c, line 2: file charsh" not found
^3Warning: couldn't load any skill from bots/ayumi_c.c
^1Fatal: couldn't load skill 1.000000 from bots/ayumi_c.c


Version-Release number of selected component (if applicable):

quake3.x86_64 0:1.36-3.fc12

How reproducible:
100%

Steps to Reproduce:
1. Start open arena or quake3-demo
2. select single play game with bots
3. bots don't load
  
Actual results:
no bots in single player mode

Expected results:
bots should be there.

Additional info:

I even downgraded to the known working version of quake on from Fedora 11, so might be a system lib issue.
Comment 1 Kevin DeKorte 2009-10-26 13:19:05 EDT
Hans, can you verify if bots work in your rawhide install?
Comment 2 Hans de Goede 2009-10-26 14:47:53 EDT
(In reply to comment #1)
> Hans, can you verify if bots work in your rawhide install?  

I just tried, and playing against the major works fine for me, if that is not what you mean, I will need some more detailed instructions on how to reproduce this.
Comment 3 Kevin DeKorte 2009-10-26 15:02:10 EDT
Hans,

I'm on a 64bit install and I just used yum install quake3 and for some reason the bots don't work. See the debug info above as to the problem I am having.
Comment 4 Kevin DeKorte 2009-10-26 15:09:56 EDT
yes it is a 64bit issue. I manually removed quake3.x86_64 and installed quake3.i686 from koji and when I ran the 32bit version the bots worked. I then removed the 32bit version and installed the 64bit one and the bots did not work.
Comment 5 Hans de Goede 2009-10-26 15:11:51 EDT
I'm on a 64 bit install too, using rawhide with everything up2date and for me they are working fine, or atleast the "major" is working fine.

I'm not such a fanatic quake3 player, so what would help is if you could tell me if that the major (so standard single player mode) does work for you too, and
you are having some other problem (and ifso please tell me how to reproduce),
or if the major is not working for you (iow bots not working == major not working).
Comment 6 Kevin DeKorte 2009-10-26 15:26:56 EDT
I'm choosing Single Player, first map with Major with 64bit that bot doesn't load but with 32bit it does.
Comment 7 Kevin DeKorte 2009-10-26 15:29:24 EDT
BTW, with the 64bit binary none of the bots load in any of the quake3 games, openarena etc..
Comment 8 Hans de Goede 2009-10-27 04:32:14 EDT
Hmm, weird it really does work fine for me.

Maybe some of the data quake3 saves in your home dir is arch dependent, can you try:
mv ~/.q3a ~/.q3a.bak

And then start quake3 demo through the wrapper script:
quake3-demo

And let it re-download the data (circa 70 MB download) and then start it,
hopefully that will fix things.
Comment 9 Kevin DeKorte 2009-10-27 09:02:26 EDT
Nope... reloaded it all in a clean .q3a folder... still have the issue. Switching back to the i686 binary makes it work.
Comment 10 Andreas Bierfert 2009-10-27 13:26:10 EDT
I have the same problem on latest rawhide with the x86_64 binaries.
Comment 11 Hans de Goede 2009-10-27 14:25:26 EDT
Hi Andreas,

Any chance you could dig a little bit deeper? As said before I cannot reproduce this on my own x86_64 box.

Thanks,

Hans
Comment 12 Andreas Bierfert 2009-11-02 16:30:53 EST
I did a little bit of digging. The quake3 botlib uses strcpy in a wrong way:

strcpy(string, string+1);

where the strcpy manpage clearly states:

"The strings may not overlap[...]"

Attached is a patch which fixes this for the two quoting functions involved in botlib, however there might be other places which are affected.
Comment 13 Andreas Bierfert 2009-11-02 16:33:00 EST
Created attachment 367215 [details]
Replace wrong strcpy by memmove
Comment 14 Hans de Goede 2009-11-04 06:24:42 EST
Andreas,

Many thanks, I did a full audit of strcpy use in ioquake3 and I found one more case. I've also managed to reproduce this now (only happens on 64 bit Intel CPU's not on 64 bit AMD ones).

I've filed a patch with the 3th case also fixed upstream:
https://bugzilla.icculus.org/show_bug.cgi?id=4331

This is fixed in quake3-1.36-4, which I will try to get tagged into F-12 final,
and otherwise I'll make an update for this.
Comment 15 Hans de Goede 2009-11-04 07:34:56 EST
rel-eng ticket for including into F-12 final:
https://fedorahosted.org/rel-eng/ticket/3083
Comment 16 Kevin DeKorte 2009-11-04 16:50:22 EST
Confirmed that quake3-1.36-4 fixes it on my machine.

Note You need to log in before you can comment on or make changes to this bug.