Bug 442022 - Review Request: wordwarvi - Side-scrolling shoot 'em up '80s style arcade game
Review Request: wordwarvi - Side-scrolling shoot 'em up '80s style arcade game
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Dieter
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-11 07:17 EDT by Hans de Goede
Modified: 2008-05-05 16:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-05 16:54:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jdieter: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)
Output for six sound cards (4.25 KB, text/plain)
2008-05-02 04:27 EDT, Jonathan Dieter
no flags Details

  None (edit)
Description Hans de Goede 2008-04-11 07:17:29 EDT
Spec URL: http://people.atrpms.net/~hdegoede/wordwarvi.spec
SRPM URL: http://people.atrpms.net/~hdegoede/wordwarvi-0.05-1.fc9.src.rpm
Description:
Word War vi is your basic side-scrolling shoot 'em up '80s style arcade game.
You pilot your "vi"per craft through core memory, rescuing lost .swp files,
avoiding OS defenses, and wiping out those memory hogging emacs processes.
When all the lost .swp files are rescued, head for the socket which will take
you to the next node in the cluster.

Note: Obviously, emacs is a fine editor and this is all very tongue in cheek, 
so don't be getting all bent out of shape because you like emacs better than
vi, mmm-kay?
Comment 1 Hans de Goede 2008-04-14 07:01:58 EDT
New upstream release:
Spec URL: http://people.atrpms.net/~hdegoede/wordwarvi.spec
SRPM URL: http://people.atrpms.net/~hdegoede/wordwarvi-0.06-1.fc9.src.rpm
Comment 2 Hans de Goede 2008-05-01 05:47:39 EDT
New upstream release:
Spec URL: http://people.atrpms.net/~hdegoede/wordwarvi.spec
SRPM URL: http://people.atrpms.net/~hdegoede/wordwarvi-0.07-1.fc10.src.rpm
Comment 3 Jonathan Dieter 2008-05-01 07:16:53 EDT
I'm getting a segmentation fault when I try to run 0.07 under F8.  The full
output  under the command line is:

No joystick...
JACK tmpdir identified as [/dev/shm]
Portaudio reports 6 sound devices.
Portaudio says the default device is: -1
Segmentation fault

gdb (after installing wordwarvi's debuginfo) says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208801600 (LWP 23723)]
initialize_portaudio () at wordwarvi.c:8593
8593            outparams.suggestedLatency = 

(and then complains about a bunch of missing debuginfo's that I don't have the
bandwidth to install).

I'm assuming this is a blocker, but maybe that's a poor assumption.
Comment 4 Hans de Goede 2008-05-01 08:12:43 EDT
(In reply to comment #3)
> I'm getting a segmentation fault when I try to run 0.07 under F8.  The full
> output  under the command line is:
> 
> No joystick...
> JACK tmpdir identified as [/dev/shm]
> Portaudio reports 6 sound devices.
> Portaudio says the default device is: -1
> Segmentation fault
> 
> gdb (after installing wordwarvi's debuginfo) says:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1208801600 (LWP 23723)]
> initialize_portaudio () at wordwarvi.c:8593
> 8593            outparams.suggestedLatency = 
> 
> (and then complains about a bunch of missing debuginfo's that I don't have the
> bandwidth to install).
> 
> I'm assuming this is a blocker, but maybe that's a poor assumption.

Well, there this funny thing with the review guidelines where you don't have to
actually run a program in order to review it, but yes this is a blocker and I
think I know whats going on, can you reproduce and then do a
"p outparams.device" in gdb after the crash?
Comment 5 Jonathan Dieter 2008-05-01 08:48:52 EDT
Yeah, I was looking through ReviewGuidlines and didn't see "working program"
listed as one of the requirements.  Here's the gdb output.  I ran p outparams,
so you'll get the whole struct:

(gdb) p outparams
$1 = {device = -1, channelCount = 1, sampleFormat = 1, 
  suggestedLatency = 2.9707941080430731e-313, hostApiSpecificStreamInfo = 0x0}
Comment 6 Stephen M. Cameron 2008-05-01 11:03:20 EDT
> Portaudio reports 6 sound devices.
> Portaudio says the default device is: -

This is unexpected, didn't know that could happen.

I have chacked in what I think is a fix into CVS.

http://wordwarvi.cvs.sourceforge.net/wordwarvi/wordwarvi/wordwarvi.c?r1=1.157&r2=1.158

You might also try the "--sounddevice" option and see if that helps.

e.g.:

wordwarvi --sounddevice 0

(or try numbers 0-5 to select between your 6 sound devices.

-- steve
 
Comment 7 Stephen M. Cameron 2008-05-01 13:48:04 EDT
Er, well there are at least a couple problems with the above fix, but I think I
have fixed those up in CVS.  Will try to put out another release this weekend.

BTW, I suspect portaudio can't get to your sound cards because JACK has got
them. (That's how it was when I tried this on ubuntu -- though on my system,
JACK only grabs one of my sound cards, and so when JACK is running portaudio can
get the other one, so I didn't precisely duplicate the problem.

If you stop JACK, does it start working?

-- steve
Comment 8 Hans de Goede 2008-05-01 14:15:19 EDT
Stephen, thanks for helping out, I will spin a new package once you've done a
new release then, perhaps it would be an idea to first drop an unofficial tarbal
somewhere outside of sourceforge.net, then Jonathan can test it to make sure
this problem is really gone?
Comment 9 Jonathan Dieter 2008-05-01 14:15:56 EDT
(In reply to comment #7)
> Er, well there are at least a couple problems with the above fix, but I think I
> have fixed those up in CVS.  Will try to put out another release this weekend.

I've run it with your *latest* patch, and everything works fine (with no sound).
 I've also run it by specifying the sound card (using --sounddevice 0-5) and I
still don't get any sound, but at least it works.

> BTW, I suspect portaudio can't get to your sound cards because JACK has got
> them. (That's how it was when I tried this on ubuntu -- though on my system,
> JACK only grabs one of my sound cards, and so when JACK is running portaudio can
> get the other one, so I didn't precisely duplicate the problem.
> 
> If you stop JACK, does it start working?

I'm actually running pulseaudio, not jack (ps ax | grep jack returns nothing). 
I'm not sure why it's reporting 6 sound cards as I have only one (though a local
machine on my network is sharing its two soundcards through pulseaudio).

FWIW, I'm also able to get a segfault by using pretty much any argument that
isn't valid (I couldn't figure out why I was getting segfaults with
--sound-device until I realized it was the wrong argument).

Hans, I'll see about doing a proper review for this tomorrow.
Comment 10 Stephen M. Cameron 2008-05-01 14:51:01 EDT
> FWIW, I'm also able to get a segfault by using pretty much any argument that
> isn't valid (I couldn't figure out why I was getting segfaults with
> --sound-device until I realized it was the wrong argument).

Interesting.  I can duplicate that, but if I compile without optimization, that
goes away (but getupt_long_only returns unexpected value 63.

without optimization:
$ ./wordwarvi --xxx
./wordwarvi: unrecognized option `--xxx'
Unexpected return value 63 from getopt_long_only()


With optimizatino:
$ ./wordwarvi --xxx
Segmentation faul
Seems to be crashing here:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 140289894610656 (LWP 6449)]
0x00000035acd70b11 in strncmp () from /lib64/tls/libc.so.6
(gdb) bt
#0  0x00000035acd70b11 in strncmp () from /lib64/tls/libc.so.6
#1  0x00000035acdae9f1 in _getopt_internal_r () from /lib64/tls/libc.so.6
#2  0x00000035acdafa35 in _getopt_internal () from /lib64/tls/libc.so.6
#3  0x000000000041c404 in main ()


Weird.  I'll have to look into that tonight.

-- steve
Comment 11 Stephen M. Cameron 2008-05-01 15:06:54 EDT
Oh, duh.  I see the problems.  1) the option list to getopt_long_only is not
terminated (the man page doesn't mention doing so that I can see, but, duh, of
course you must do it.) 2) 63 is ascii for '?' which is what getopt_long_only()
returns for an unrecognized option.  

Will fix tonight.

-- steve
Comment 12 Stephen M. Cameron 2008-05-01 19:41:04 EDT
Ok, I committed a fix for the bad command line option segfault into CVS, in case
you want to try it.

As for this:

> I'm actually running pulseaudio, not jack (ps ax | grep jack returns nothing). 
> I'm not sure why it's reporting 6 sound cards as I have only one (though a local
> machine on my network is sharing its two soundcards through pulseaudio).

Ahh, pulseaudio.  I've had some trouble with that -- although, on my Fedora core
8 system, the game works ok for me.  When I had 3 soundcards in that system
though, pulseaudio only found 1 of them, (missed the RME hammerfall and Creative
audigy2 for some reason, finding only the motherboard VIA ac97)  Also,
youtube/flash stuff would always play through one sound card (motherboard VIA
ac97), and the game (and audacity, and anything that uses portaudio) always
through the other (Creative Audity2, which pulseaudio didn't see), and I never
figured that out.)

Have also tried (with ubuntu) with an nvidia (cheapo motherboard) soundcard, and
also with the RME hammerfall, and those work ok (the nvidia kind of sucks though.)

Just tried on my Fedora 8 box with Audacity running (also portaudio user, I
think) after taking out all but the VIA ac97 motherboard soundcard.  In this
case, pulseaudio seems able to mix the sounds of audacity and the game (though
not very nicely or smoothly -- though to be fair, I was running the game scaled
to 1250x920 size, so X was taxing the system pretty heavily.)

I am not sure pulseaudio and portaudio get along very well, except perhaps in
the simple case in which only one soundcard is present.

-- steve
Comment 13 Hans de Goede 2008-05-02 02:03:52 EDT
Ok,

About portaudio versus pulse I've tested this on 2 different machines (both with
only onboard sound) and it both works fine there. Jonathan you may be having
troubles as you're using pa in F-7 where it wasn't officially supported.
Comment 14 Jonathan Dieter 2008-05-02 04:27:56 EDT
Created attachment 304365 [details]
Output for six sound cards

Um, I'm actually running F8 with what should be a standard pulseaudio setup. 
I've attached the output from wordwarvi --sounddevice [0-5].  Honestly, though,
this is a separate (non-blocking) bug and should probably be listed as such.

On that note, the review will follow in an hour or two.
Comment 15 Jonathan Dieter 2008-05-02 06:38:26 EDT
Okay, here's the official review:

MD5SUM:
63c65ef135d69f8248af97f6250fca37  wordwarvi-0.07.tar.gz

Good:
* The package is named according to the Package Naming Guidelines.
* The spec file name matches the base package.
* The package meets the Packaging Guidelines.
* The package is licensed with a Fedora approved license (GPLv2+ for code, CC-BY
and CC-BY-SA for sounds)
* The License field in the package spec file matches the actual license.
* COPYING is included in %doc.
* The spec file is written in American English.
* The spec file for the package is legible.
* The sources used to build the package matches the upstream source.
* The package successfully compiles and builds into binary rpms on i386.
* All build dependencies are listed in BuildRequires.
* The package owns all directories that it creates.
* The package doesn't contain any duplicate files in the %files listing.
* Permissions on files are set properly.
* The package has a %clean section, which contains rm -rf $RPM_BUILD_ROOT.
* The package consistently uses macros.
* The package contains code and permissable content.
* All %doc files do not affect the runtime of the application.
* The package includes a desktop-file-installed %{name}.desktop file.
* At the beginning of %install, the package runs rm -rf $RPM_BUILD_ROOT).
* All filenames in rpm packages are valid UTF-8.
* Source URL is canonical
* Buildroot has all required elements
* All paths begin with macros
* All necessary BuildRequires listed
* All desired features are enabled
* Desktop file has the vendor set to 'fedora'
* Group Tag is from the official list
* Package builds in mock with no errors and one odd warning that has no effect:
  make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
  rule.

Bad:
Nothing that I could find

rpmlint output:
SRPM: None
RPM:  None

Once a version gets pushed that fixes the segfaults, I'll be happy to approve this.



Comment 16 Stephen M. Cameron 2008-05-02 19:37:15 EDT
Ok, I put v. 0.08 on sourceforge.

http://wordwarvi.sourceforge.net

-- steve
Comment 17 Hans de Goede 2008-05-03 07:45:50 EDT
Thanks for the review. Here is a new release based on the latest upstream which
should fix the crashes you've been seeing:

Spec URL: http://people.atrpms.net/~hdegoede/wordwarvi.spec
SRPM URL: http://people.atrpms.net/~hdegoede/wordwarvi-0.08-1.fc9.src.rpm
Comment 18 Jonathan Dieter 2008-05-03 11:01:44 EDT
Okay, the segfaults are gone now, and everything else looks good.  I'm going to
change the fedora-review flag to +.

One concern I just noticed is that the rpm is 48M in size (vs 5M for the SRPM,
because of the sound conversion from ogg to wav in building).  It's not a review
blocker at all, but I do think it would be better for the game to play the ogg
files directly.
Comment 19 Hans de Goede 2008-05-03 11:13:44 EDT
(In reply to comment #18)
> One concern I just noticed is that the rpm is 48M in size (vs 5M for the SRPM,
> because of the sound conversion from ogg to wav in building).  It's not a review
> blocker at all, but I do think it would be better for the game to play the ogg
> files directly.

Agreed, Stephen any chance you could do this for one of the next releases? Maybe
switch to SDL_mixer for the sound, that supports ogg out of the box.

Comment 20 Hans de Goede 2008-05-03 11:17:12 EDT
New Package CVS Request
=======================
Package Name:      wordwarvi
Short Description: Side-scrolling shoot 'em up '80s style arcade game
Owners:            jwrdegoede
Branches:          F-8 F-9
InitialCC:     
Cvsextras Commits: Yes


Comment 21 Stephen M. Cameron 2008-05-03 15:09:50 EDT
I'll look into it, but so far as I can tell, libsndfile doesn't do ogg yet.
http://www.mega-nerd.com/libsndfile/#Features


Though, there is this:
http://www.metadecks.org/software/libsndfile/
Comment 22 Hans de Goede 2008-05-03 15:29:58 EDT
(In reply to comment #21)
> I'll look into it, but so far as I can tell, libsndfile doesn't do ogg yet.
> http://www.mega-nerd.com/libsndfile/#Features
> 
> 
> Though, there is this:
> http://www.metadecks.org/software/libsndfile/

Well, judging from its last release date (Aug 31 2006) libsndfile is somewhat
dead. So perhaps using SDL_mixer (which will replace both portaudio and
libsndfile in one go) is a better idea? You can use SDL to manage just the
sound, or just the sound and joystick, gaining joystick support in one go.
Comment 23 Stephen M. Cameron 2008-05-03 16:04:07 EDT
Hmm, sounds like a non-trivial change.  

And I kind of actually *like* that I can (in fact, must) write my own mixer code
with portaudio.  (for instance, I suspect you'd have a hard time writing a game
like this: http://bethewumpus.sourceforge.net with SDL_mixer.)

BTW, there's already joystick support (in fact, to play the game, a joystick is
practically mandatory. Unless you're doing cross platform stuff, the linux
joystick driver is easy enough to program against that a library is not really
necessary.

I don't think libsndfile is dead, ardour and audacity both use it, for instance. 

Hmm, come to think of it, audacity supports ogg as well, maybe that's a place I
should look.

What I need is a snippet of code that can read ogg files and give me an array of
mono, 16-bit, 44.1khz PCM data.







Comment 24 Stephen M. Cameron 2008-05-03 16:25:02 EDT
Ahh, the oggdec code from vorbistools is probably what I need to look at.
Comment 25 Stephen M. Cameron 2008-05-03 20:00:45 EDT
Ok, I've made the necessary changes to get it to decode ogg files to memory, and
this is in CVS now.

For whatever reason, sourceforge isn't letting me create a new file release
right now (the tarball I uploaded via ftp isn't showing up when I try to create
the file release.)

-- steve
Comment 26 Stephen M. Cameron 2008-05-03 20:04:01 EDT
Oh, and Hans, about packaging dependencies, now libsndfile isn't needed, but
libvorbisfile is needed.
Comment 27 Kevin Fenzi 2008-05-03 23:31:09 EDT
cvs done.
Comment 28 Hans de Goede 2008-05-04 03:59:27 EDT
(In reply to comment #25)
> Ok, I've made the necessary changes to get it to decode ogg files to memory, and
> this is in CVS now.
> 

Ok, thanks!

> For whatever reason, sourceforge isn't letting me create a new file release
> right now (the tarball I uploaded via ftp isn't showing up when I try to create
> the file release.)
> 

Ok, things are ready on our side to add wordwarvi to the Fedora package
collection, I'll wait for you to spin a 0.09 tarbal (assuming that will work
today) and then I'll import it into our CVS, build it and push it to the
repositories.
Comment 29 Stephen M. Cameron 2008-05-04 07:11:28 EDT
Ok, it's up on sourceforge now.

Let me know if you find any problems with it, of course.

I'm going to continue hacking on it of course, like many things in linux-land,
it's a moving target.

-- steve
Comment 30 Hans de Goede 2008-05-05 16:54:03 EDT
Stephen, thanks.

Imported and build for F-8, F-9 and F-10(devel/rawhide) , closing.

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