Bug 526338 - Bots don't load due to bad file names
Summary: Bots don't load due to bad file names
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: quake3
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Xavier Lamien
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-29 20:36 UTC by Kevin DeKorte
Modified: 2009-11-04 21:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-04 11:24:42 UTC
Type: ---
Embargoed:


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

Description Kevin DeKorte 2009-09-29 20:36:50 UTC
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 17:19:05 UTC
Hans, can you verify if bots work in your rawhide install?

Comment 2 Hans de Goede 2009-10-26 18:47:53 UTC
(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 19:02:10 UTC
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 19:09:56 UTC
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 19:11:51 UTC
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 19:26:56 UTC
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 19:29:24 UTC
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 08:32:14 UTC
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 13:02:26 UTC
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 17:26:10 UTC
I have the same problem on latest rawhide with the x86_64 binaries.

Comment 11 Hans de Goede 2009-10-27 18:25:26 UTC
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 21:30:53 UTC
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 21:33:00 UTC
Created attachment 367215 [details]
Replace wrong strcpy by memmove

Comment 14 Hans de Goede 2009-11-04 11:24:42 UTC
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 12:34:56 UTC
rel-eng ticket for including into F-12 final:
https://fedorahosted.org/rel-eng/ticket/3083

Comment 16 Kevin DeKorte 2009-11-04 21:50:22 UTC
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.