Why a method main.replay() is not getting executed in Java? But exactly the same code works in Fedora not in Archlinux

StackOverflow https://stackoverflow.com/questions/7809759

Question

I have a simple player i am using third party libraries. Exactly the same code is working in my Fedora desktop. But when i am using exactly the same code in Archlinux it does not work to do main.replay();

What is causing it?

public static void play(String gsttest)
{
    try {
        gst.play();
        gst.getBus().connect(new Bus.EOS() 
        {
            public void endOfStream(GObject source) 
            {
              //_7-------------_7
               main.replay(); //<< never getting executed in Archlinux 
              //_7------------_7      but Fedora it runs without any problem.                    
            } 
        });  

    } catch (Exception ex) {
    }               
}

My Java where its not working is:

$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (ArchLinux-6.b22_1.10.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

My Java where its working is:


$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-i386)
OpenJDK Server VM (build 20.0-b11, mixed mode)
Was it helpful?

Solution

Have you tried catching a Throwable?

try{ ...
} catch(Throwable t){ t.printStackTrace(); }

If not, does it print anything?

If you declare that Bus class before hand and use it later in connect, does the behavior change?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top