Problem with 2.0.2 on OS X

6 views
Skip to first unread message

Garth

unread,
Jan 16, 2008, 9:41:52 PM1/16/08
to bluecove-users
Hi,
I'm trying to port my code (which works fine with bluecove on Windows)
to OS X, and have run into a problem. The problem is that the call to:

LocalDevice device = LocalDevice.getLocalDevice();

never returns. This is basically the first thing bluetooth related
that my code does, and as I say worked fine on Windows, so I'm
wondering if I have some sort of configuration problem on OS X. My
understanding is that the built-in OS X bluetooth stack works fine, so
I'm not sure what the problem would be.

I am running OS X 10.5.1 with a Linksys BT100 dongle. Java 1.5.0_13

Thanks,
Garth

Vlad Skarzhevskyy

unread,
Jan 16, 2008, 10:06:11 PM1/16/08
to bluecov...@googlegroups.com
Hi Garth
This is the first version of BlueCove on OS X. So far many users
conformed that it is working fine.
First verify that native OS X Bluetooth applications e.g. Bluetooth
file transfer works fine.
Then I would suggest to start from my test application.
Use Web Start AWT from this page:
http://www.bluecove.org/bluecove-examples/bluecove-tester/

If it is not working then enable debug and send me the output. As
well as thread dump.
Vlad

Garth

unread,
Jan 17, 2008, 5:46:05 PM1/17/08
to bluecove-users
Hi Vlad,
The bluecove-tester example works fine. I did a thread-dump of my app
and it gets stuck here... it seems as if it is having trouble either
detecting the stack or loading some libs?:

Thread[main,5,main]
java.lang.ClassLoader$NativeLibrary.load(Native Method)
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1702)
java.lang.Runtime.load0(Runtime.java:769)
java.lang.System.load(System.java:968)
com.intel.bluetooth.NativeLibLoader.loadAsSystemResource(NativeLibLoader.java:
278)
com.intel.bluetooth.NativeLibLoader.isAvailable(NativeLibLoader.java:
171)
com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:290)
com.intel.bluetooth.BlueCoveImpl.access$100(BlueCoveImpl.java:64)
com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:502)
java.security.AccessController.doPrivileged(Native Method)
com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:
500)
com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:
489)
javax.bluetooth.LocalDevice.<init>(LocalDevice.java:64)
javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:
71)
javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:86)
edu.ubc.cs.wiimote.WiimoteDiscoverer.<init>(WiimoteDiscoverer.java:25)
edu.ubc.cs.universalinput.WiimoteInput.launchWiimote(WiimoteInput.java:
88)
edu.ubc.cs.textcircle.ControlManager.<init>(ControlManager.java:24)
edu.ubc.cs.textcircle.TextCircle.<init>(TextCircle.java:34)
edu.ubc.cs.experiment.ExperimentPanel.<init>(ExperimentPanel.java:41)
edu.ubc.cs.experiment.Experiment.<init>(Experiment.java:12)
edu.ubc.cs.experiment.Experiment.main(Experiment.java:24)

Thanks,
Garth

On Jan 16, 7:06 pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>
wrote:

Vlad Skarzhevskyy

unread,
Jan 17, 2008, 8:17:13 PM1/17/08
to bluecov...@googlegroups.com
Can you try to run bluecove-tester in the same environment as you run
your application?
Something wrong with your environment!
Do you run it in some debug mode?
Do you run it from simple command line if not try?
Also try different java version the same as in your webstart configuration....

> On Jan 16, 7:06pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>


> wrote:
> > Hi Garth
> > This is the first version of BlueCove on OS X. So far many users
> > conformed that it is working fine.
> > First verify that native OS X Bluetooth applications e.g. Bluetooth
> > file transfer works fine.
> > Then I would suggest to start from my test application.
> > Use Web Start AWT from this page:http://www.bluecove.org/bluecove-examples/bluecove-tester/
> >
> > If it is not working then enable debug and send me the output. As
> > well as thread dump.
> > Vlad
> >
>


--
Vlad

Garth

unread,
Jan 21, 2008, 9:02:01 PM1/21/08
to bluecove-users
Hi Vlad,
I have tried running bluecove-tester from the command line, and
discovered that it works maybe 1/3 of the the time.

When it _doesn't_ work I get output like this, and then it hangs. (I
run the app, it opens, and I select bluetooth->server start)

Macintosh:Desktop garths$ java -Dbluecove.debug=true -jar bluecove-
tester-app.jar
17:50:09.352 Stating app
17:50:10.186 Stated app
17:50:10.191 OS:Mac OS X|10.5.1|ppc
17:50:10.195 Java:Apple Inc. 1.5.0_13
17:50:15.753 Java 1.4+ detected
com.intel.bluetooth.UtilsJavaSE.getLocation(UtilsJavaSE.java:79)
(... app is hung at this point)

When it _does_ work it looks like this:

Macintosh:Desktop garths$ java -Dbluecove.debug=true -jar bluecove-
tester-app.jar
17:41:08.764 Stating app
17:41:09.618 Stated app
17:41:09.624 OS:Mac OS X|10.5.1|ppc
17:41:09.626 Java:Apple Inc. 1.5.0_13
BlueCove version 2.0.2 on mac
17:41:12.766 address:000D930E54BF
17:41:12.793 name:firefly
17:41:12.831 class:Computer/Laptop/(Limited Discovery,Object
Transfer,Audio)
(... output keeps going)

I wonder if there could be some sort of threading issue, since the
problem is so unpredictable? It at least seems like some kind of
initialization problem, since in the non-working example the "Bluecove
version 2.0.2 on mac" never shows up.

Thanks,
Garth


On Jan 17, 5:17 pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>
wrote:
> Can you try to run bluecove-tester  in the same environment as you run
> your application?
> Something wrong with your environment!
> Do you run it in some debug mode?
> Do you run it from simple command line if not try?
> Also try different java version the same as in your webstart configuration....
>

Vlad Skarzhevskyy

unread,
Jan 21, 2008, 11:12:14 PM1/21/08
to bluecov...@googlegroups.com
Hi Garth
I see your point.
During library load we are creating a RunLoop in native code. I
copied this from original Eric Wagner without much thinking. I think
the code is wrong...
I will try to reproduce the problem, and will let you know.
Unfortunately my OS X HDD crashed today so I will need to spend more
time on this.
Vlad

Lionel

unread,
Jan 27, 2008, 10:58:00 PM1/27/08
to bluecove-users
Hi;

I do have the same issue with my own application, it was working fine
on OSX 10.4 and since I move to 10.5, I've got the issue very often.
The application was able to start only once. If I enable bluecode bug
trace, the last line is:

Jan 27 19:49:59 leobook [0x0-0x9d09d].jmri.MyJMRI[847]: 19:49:59.653
Java 1.4+ detected
Jan 27 19:49:59 leobook [0x0-0x9d09d].jmri.MyJMRI[847]:
com.intel.bluetooth.UtilsJavaSE.getLocation(UtilsJavaSE.java:79)

Regards;
Lionel

eggsy

unread,
Jan 28, 2008, 4:19:49 AM1/28/08
to bluecove-users
Hi there

I have the same issue with the getLocalDevice not performing. Should
we organise some kind of collaboration in attempt to solve the issue?

Lionel

unread,
Jan 30, 2008, 1:43:15 AM1/30/08
to bluecove-users
Hi all;

there was effectivelly a race condition issue in the JNI native init
code, under "heavy" load this issue can happen. A fix has been
proposed, hopefully it will be integarted to main branch soon.

Regards;
Lionel

Vlad Skarzhevskyy

unread,
Jan 30, 2008, 1:53:47 AM1/30/08
to bluecov...@googlegroups.com
Thank you Lionel
This was very helpful! I just reinstalled my OS X system today so I
would be able to make a new build and test it.
Vlad

Lionel

unread,
Jan 30, 2008, 2:21:58 AM1/30/08
to bluecove-users
Hi;

I just noticed that the issue where I posted my file, is not the good
one, I'll create a new one.

I can do the svn commit if you like, I'll then need to have a
developper access.

Regards;
Lionel

Vlad Skarzhevskyy

unread,
Jan 30, 2008, 2:41:28 AM1/30/08
to bluecov...@googlegroups.com
Hi Lionel
If you will do more development and testing in BlueCove then
certainly I will give you developer access.
See another group for this http://groups.google.com/group/bluecove-developers
The project most definitely require experienced developers!
You may find all the other issues we are facing while developing
Linux support in BlueCove.
Regarding OS X the main outstanding feature we are missing to pass
the TCK tests are implementation of
ServiceRecord.setDeviceServiceClasses and implementations of
RemoteDevice authenticate, authorize and encrypt .

Regarding the issue with initialization on OS X I will definitely
apply your changes tomorrow and will commit them after running the
tests.

Regards,
Vlad

skarzh...@gmail.com

unread,
Jan 30, 2008, 1:19:21 PM1/30/08
to bluecove-users
Bug reproduced, fixed and tested on OS X Leopard 10.5.1
The fixed version is bluecove-2.0.3 build 22 and later.
Regards,
Vlad

Garth

unread,
Feb 4, 2008, 9:16:29 PM2/4/08
to bluecove-users
Thanks Vlad,
I have confirmed that this problem is fixed (at least for me!).

Garth

On Jan 30, 10:19 am, "skarzhevs...@gmail.com" <skarzhevs...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages