[ 
https://issues.apache.org/jira/browse/FELIX-729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Barend Garvelink reopened FELIX-729:
------------------------------------


Using org.apache.felix.shell.tui-1.1.0-20080923.140259-2.jar, the problem is 
still present on Vista. I haven't checked at work, but I assume it's the same 
thing. I wrote a quick little Java class that dumps the vm properties to a text 
file then pokes at System.in a bit and logs those results as well. Ran it with 
both launchers. 

The system properties are identical with both launchers, but I found that 
invoking `System.in.available()` returns 0 using the java launcher but throws 
an IOException using the javaw launcher, so the two launchers can be 
distinguished:

java.io.IOException: The handle is invalid
        at java.io.FileInputStream.available(Native Method)
        at java.io.BufferedInputStream.available(BufferedInputStream.java:381)
        at foo.StdinTest.main(StdinTest.java:47)

Aside from this, invoking System.console() returns non-null for the `java` 
launcher and null for the `javaw` launcher. That'd be cleaner, but since that's 
a Java 1.6 feature, it's of no use here.

> Shell-TUI causes 100% CPU load when using javaw launcher
> --------------------------------------------------------
>
>                 Key: FELIX-729
>                 URL: https://issues.apache.org/jira/browse/FELIX-729
>             Project: Felix
>          Issue Type: Bug
>          Components: Shell
>    Affects Versions: felix-1.0.4, felix-1.2.0
>         Environment: Windows 2000 SP4, Windows Vista Enterprise, JDK 1.6
>            Reporter: Barend Garvelink
>            Assignee: Richard S. Hall
>
> I ran into this issue at work with Felix 1.0.4 on Win2k SP4 and reproduced it 
> at home with Felix 1.2.1 on Vista Enterprise, both on JDK 1.6. I only 
> discovered it by accident, as I normally use the console during development. 
> I suspect the people reading this do, too :-).
> When using the javaw.exe launcher rather than the java.exe launcher, 
> Felix-shell-TUI permanently draws 100% CPU (divide by the number of cores, 
> home PC reports 50%). After removing shell-TUI from the autostart list, Felix 
> can be run with the javaw launcher without issue, demonstrating that the 
> problem originates from that bundle.
> Steps to reproduce:
> 1)  unzip a fresh copy of Felix-1.2.1.zip
> 2)  in the install dir, create two batch files: felix-console.bat and 
> felix-noconsole.bat, one executes `java -Dfelix.cache.profile=consoletest 
> -jar bin\felix.jar`, the other executes `javaw 
> -Dfelix.cache.profile=consoletest -jar bin\felix.jar`
> 3) double-click either from Windows Explorer, note that when you run the 
> "javaw" one, CPU shoots to 100% and stays there.
> Running them from within Windows Explorer isn't strictly necessary to 
> reproduce the issue, the problem will also show when you start the batch file 
> from the command line.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to