This site requires JavaScript, please enable it in your browser!
Greenfoot back
qnanqing
qnanqing wrote ...

2011/8/4

Why GreenfootSound cannot play midi files?

qnanqing qnanqing

2011/8/4

#
neither play MidiPlayer class First i use the MidiPlayer class from this scenario: http://greenfootgallery.org/scenarios/1202 (it cant be played now) From my tetris game: http://greenfootgallery.org/scenarios/2296 Then after sometime my tetris game cannot be played. Then i check, decided to remove the MidiPlayer and change it to GreenfootSound. It still cant. It is work when i change the midi in the GreenfootSound instance to mp3 Ah, this is the error(s): # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b7c07, pid=5904, tid=5804 # # JRE version: 6.0_16-b01 # Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 ) # Problematic frame: # C # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x0c2fd400): JavaThread "SimulationThread" siginfo: ExceptionCode=0xc0000005, reading address 0x00000000 Registers: EAX=0x00000000, EBX=0x075e7568, ECX=0x10158440, EDX=0x00000000 ESP=0x0ccaeb4c, EBP=0x00000001, ESI=0x030e9894, EDI=0x00000013 EIP=0x100b7c07, EFLAGS=0x00210246 Top of Stack: (sp=0x0ccaeb4c) 0x0ccaeb4c: 0ccaeb68 10158440 0ccaeb68 030e9894 0x0ccaeb5c: 00000013 0ccaf3c8 0ccaf3b8 006f0073 0x0ccaeb6c: 006e0075 00620064 006e0061 002d006b 0x0ccaeb7c: 00650064 0075006c 00650078 0067002e 0x0ccaeb8c: 0000006d 00000000 00000000 00000000 0x0ccaeb9c: 00000000 00000000 00000000 00000000 0x0ccaebac: 00000000 00000000 00000000 00000000 0x0ccaebbc: 00000000 00000000 00000000 00000000 Instructions: (pc=0x100b7c07) 0x100b7bf7: 84 15 10 52 66 c7 44 7c 1c 00 00 e8 ba 39 04 00 0x100b7c07: 0f b7 10 83 c4 14 33 c9 66 85 d2 74 52 0f b7 d2 Stack: , sp=0x0ccaeb4c, free space=314k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j com.sun.media.sound.HeadspaceSoundbank.nOpenResource(Ljava/lang/String;)J+0 j com.sun.media.sound.HeadspaceSoundbank.initialize(Ljava/lang/String;)V+7 j com.sun.media.sound.HeadspaceSoundbank.<init>(Ljava/net/URL;)V+89 j com.sun.media.sound.AbstractPlayer.loadDefaultSoundbank()Ljavax/sound/midi/Soundbank;+56 j com.sun.media.sound.AbstractPlayer.openInternalSynth()V+15 j com.sun.media.sound.MixerSynth.implOpen()V+51 j com.sun.media.sound.AbstractMidiDevice.doOpen()V+12 j com.sun.media.sound.AbstractMidiDevice.openInternal(Ljava/lang/Object;)V+34 j com.sun.media.sound.AbstractMidiDevice.getReceiverReferenceCounting()Ljavax/sound/midi/Receiver;+14 j javax.sound.midi.MidiSystem.getSequencer(Z)Ljavax/sound/midi/Sequencer;+36 j javax.sound.midi.MidiSystem.getSequencer()Ljavax/sound/midi/Sequencer;+1 j MidiPlayer.<init>(I)V+4 j TetrisWorld.<init>()V+90 v ~StubRoutines::call_stub j sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor; 0x0c479800 JavaThread "Java Sound Event Dispatcher" daemon 0x0c478c00 JavaThread "Java Sound Event Dispatcher" daemon 0x0c41e400 JavaThread "main" 0x0c40c400 JavaThread "D3D Screen Updater" daemon 0x0c321000 JavaThread "Image Fetcher 1" daemon =>0x0c2fd400 JavaThread "SimulationThread" 0x0c2dd400 JavaThread "Image Fetcher 0" daemon 0x0c2b9000 JavaThread "AWT-EventQueue-0" 0x0c2a1000 JavaThread "RMI TCP Connection(1)-127.0.0.1" daemon 0x0bcfe800 JavaThread "RMI Reaper" 0x0bcd4400 JavaThread "RMI TCP Accept-0" daemon 0x0bccfc00 JavaThread "GC Daemon" daemon 0x0bcd1400 JavaThread "RMI RenewClean-" daemon 0x0bce4400 JavaThread "RMI Scheduler(0)" daemon 0x00897000 JavaThread "DestroyJavaVM" 0x0bb85800 JavaThread "BlueJ worker thread" 0x0bb83000 JavaThread "AWT-Windows" daemon 0x0bb81400 JavaThread "AWT-Shutdown" 0x0bb80000 JavaThread "Java2D Disposer" daemon 0x0abda400 JavaThread "Low Memory Detector" daemon 0x0abd7400 JavaThread "CompilerThread0" daemon 0x0abcbc00 JavaThread "JDWP Command Reader" daemon 0x0abca000 JavaThread "JDWP Event Helper Thread" daemon 0x0abc6800 JavaThread "JDWP Transport Listener: dt_shmem" daemon 0x0abbb400 JavaThread "Attach Listener" daemon 0x0abba000 JavaThread "Signal Dispatcher" daemon 0x0abb8800 JavaThread "Surrogate Locker Thread (CMS)" daemon 0x0aba9800 JavaThread "Finalizer" daemon 0x0aba4c00 JavaThread "Reference Handler" daemon Other Threads: 0x0aba0c00 VMThread 0x0abdbc00 WatcherThread
mjrb4 mjrb4

2011/8/4

#
Are you using the latest Greenfoot version? Does it do this with all MIDI files or just a particular one?
Herman Herman

2011/8/4

#
I wrote my scenario SmileyInSpace with an earlier Greenfoot version and Windows Vista. I wrote the music in MIDI. It sounded fine and it still does sound fine using the latest Greenfoot version and using Windows 7.
mjrb4 mjrb4

2011/8/4

#
I wrote my scenario SmileyInSpace with an earlier Greenfoot version and Windows Vista. I wrote the music in MIDI. It sounded fine and it still does sound fine using the latest Greenfoot version and using Windows 7.
Same here - though I'd be surprised if it was the change in Windows version that caused the problem! @qnanqing What windows version are you running? Have you tried with other MIDI files? Are you using the latest Greenfoot version?
davmac davmac

2011/8/4

#
More importantly - upgrade your Java version! That log you posted shows the JRE crashing, which shouldn't happen (even if there are bugs in Greenfoot). It also shows you are running Java 6 update 16 which is a bit old now.
qnanqing qnanqing

2011/8/5

#
@mjrb4 All midi's! Yes im using the latest Greenfoot version now version 2.1.0 (Java version 1.6.1_16) Oh, then maybe because of the JDK I check on java.com the JRE is the latest version. @davmac Ah in the oracle site the latest is JDK 7! Is Greenfoot okay with that? For now im still downloading the JDK 7, i'll inform again later! thanks!
Herman Herman

2011/8/5

#
The JDk and the JRE both include the JVM. JRE also contains other Java classes (AWT, SWING), but does not contain any development tools such as a compiler or a debugger. You can do Greenfoot without the JDK. The download/install of the JRE should do the trick.
mjrb4 mjrb4

2011/8/5

#
You can do Greenfoot without the JDK. The download/install of the JRE should do the trick.
Nope, you *need* the JDK to run Greenfoot. If you're talking about just merging an old JRE with a new JDK or something like that, I wouldn't personally... I've never tried it but it's much better to just grab the newest JDK in one go and then tell Greenfoot to use that!
Ah in the oracle site the latest is JDK 7! Is Greenfoot okay with that?
That should be fine, you may get an error on startup relating to msvcr100.dll but if so you can safely ignore it and Greenfoot should work as usual (this will disappear with the next Greenfoot version.)
qnanqing qnanqing

2011/8/6

#
mjrb4 wrote...
That should be fine, you may get an error on startup relating to msvcr100.dll but if so you can safely ignore it and Greenfoot should work as usual (this will disappear with the next Greenfoot version.)
I installed the JDK 7 and now the problems is solved! Thank you all so much!
You need to login to post a reply.