I’m developing Java MIDI application.
And I have stuck with debugging of exception, which dispatching at the end of song. As I’m expecting: the application is playing and each time I’m checking the sequence tick position to represent it in application playback line, like as player.
So I want to know how could I get the source or the point where this Thread start running?
Below is an exception output:
Exception in thread "Thread-23" java.lang.IllegalStateException: Sequencer is not open
at org.tritonus.share.midi.TSequencer.checkOpen(TSequencer.java:296)
at org.tritonus.share.midi.TSequencer.stop(TSequencer.java:256)
at org.tritonus.midi.device.java.JavaSequencer.run(JavaSequencer.java:291)
at java.lang.Thread.run(Unknown Source)
org/tritonus/midi/device/java/JavaSequencer.javahas the following code:So that’s one place to look for (but that answers only the specific case, not the general question how to find out where a thread is started in general).
There are also other places in the same class where
this.start()is called: insetSequence(..)andsetTickPosition(..). There could be calls tostart()outside the class however.