[kaffe] kaffe + (application from)JOrbisPlayer

Dalibor Topic robilad at yahoo.com
Fri Jan 17 06:31:02 PST 2003

Hi Silvano,

--- Silvano Galliani <silvano.galliani at milug.org>
> Compiling and runnning JOrbisPlayer(and my apps
> derived called dncj
> https://savannah.nongnu.org/projects/dnc/ ) is
> something
> problematic:
> 1) although jogg and jorbis( ogg and vorbis java
> packages derived from
> libvorbis) are in CLASSPATH, javac can't find it so
> I have to do
> manually

Is that kaffe's javac? Could you post the command line
call and the error message from kjc? Where do I get
the sources for jogg & jvorbis?

> 2) after that the app runs(with sun's 1.1 swing
> libs) and doesn't work.
> I've noticed that if I compile jogg and jorbis
> packages with sun's javac
> it works perfectly.

> Differently if I compile it (all the app) with jikes
> it is so slooow
> the sound works but the threads and the swing gui is
> blocked.
> Can U explain me why ?

No. But I can teach how to find out yourself ;)

Step 1: Who you gonna call?

If the bug occurs when you run kjc on kaffe and it
also occurs when you run kjc on some other Java
runtime, then it's probably a bug in kjc, and I bet
the developers of kjc would like to hear about it,

Otherwise, it's probably a bug in kaffe.

Step 2: The Usual Suspects

Run kaffe -verbose with the buggy set of compiled
classes. Log the loaded classes. That shall reduce
your search space to only those classes that matter to
expose the bug.

Step 3: Chasing Amy

Do a binary search to find the buggy class. Use a
mix-and-match approach to find the class that matters,
starting with a set of classes whose set of "suspects"
consists to one half of "known good" classes, and to
the half of "maybe bad" classes. I don't have to
explain binary search to this audience ;)

Step 4: The Matrix

Disassemble the "bad" and the "known good" version of
the buggy class. Diff the output. Locate the
differences and find the methods they are in.

Step 5: Minimalist Art

Create a test class with only the offending methods.
Keep stripping lines of code away until you get at the
simplest program that still exposes the bug.

Simple means 5-10 lines of up to 80 characters each.
The smaller and simpler you can make it, the better
the chance is someone will be able to fix it.

For the sake of those who will try to figure out where
the bug is, run the resulting code through an 'indent'
program. Check that the bug still occurs.

Step 6: Eureka!

Well, now that you've got it all set up, you might as
well try to fix it yourself, if it's a bug in kaffe's
libraries, for example. Sometimes the authors have
forgotten to do some obvious things, and you might be
able to spot it instantly, as by now you should have a
deeper understanding of the problem.

Step 7: Ask for professional help

Well, O.K., you've tried, and couldn't find it. Now
that you've got the bug trimmed down to something that
can be understood by others, post it to the
appropriate mailing lists. Include all relevant
command line calls, environment variable settings,
program versions, in essence try to make it dead easy
for others to experience that bug for themselves. Of
course, don't forget to say what you've done already,
what you've tried and what failed. In general, try to
make it as easy as you can for others to help you with
your problem.

It's a psychological thing. When I see a bug report
that goes like "I've tried to run this big app with
that big app and it kind of crashed", then that's the
equivalent of telling me that "I've found a typo in
Dostoyevsky's 'Crime and Punishment'[1] in my home
library. Could you check it and fix it ? I think a
word is missing an 'e' somewhere" ;)

Chances are that I won't do much with respect to that
bug report. Maybe one day, when I'm really, really,
throughly bored, and there is nothing else to do,
maybe then. Chances are, other developers will do the
same, unless they get crisp & clear "I typed this and
then it printed that as this five line test program
demonstrates" bug reports. ;)

> Best Regards
> Silvano Galliani aka kysucix

I think I've met you on IRC in #kaffe before, right?
You're working on a teleconferencing app(let). I've
got to check it out one day.

> P.S. Beautiful work with kaffe, still young but it
> beautiful :))

Thanks! It's not that young, actually. The first
recorded ChangeLog.1 entry is from 1996-01-13 (at the
bottom of the file).

> P.S.S.  I used bleeding edge technology kaffe from
> cvs

Cool. I appreciate people who have the courage to live
on the edge ;)

[1] Great book, btw. I could have used Dante Aligheri
for a more localized version, though ;)

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the kaffe mailing list