I'm not at my computer until tomorrow but can you post your project or the code that causes this issue? I will have a look at it then.
I did not have time to try again as I'm using the 9.8 code but now I want to enhance the app with latest version of B4J.
This is the offending code:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Midi_JianPu")
MainForm.Show
' Tamaño de la ventana
MainForm.WindowHeight=fx.PrimaryScreen.Maxy-20dip' 600
MainForm.WindowWidth=fx.PrimaryScreen.MaxX-20dip'1024
MainForm.WindowLeft=0
MainForm.WindowTop=0
Log("Antes de iniciar Midi")
' Buscamos los dispositivos que están conectados.
MidiSystemStatic.Initialize
'Dim devices As List = MidiSystemStatic.GetMidiDeviceInfo
Log("Antes de device info")
devices= MidiSystemStatic.GetMidiDeviceInfo
The problem seems to be in the
MidiSystemStatic.Initialize statement.
When it is compiled with B4J 9.8 I get the following log output:
Antes de iniciar Midi
Antes de device info
Hay 4 dispositivos
Nombre: Gervill
Nombre: Microsoft MIDI Mapper
Nombre: Microsoft GS Wavetable Synth
Nombre: Real Time Sequencer
Leido archivo INI
----------------------------------------------------------------
But compiled with B4J 10.0:
Antes de iniciar Midi
midi_gm._add (java line: 544)
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742)
at anywheresoftware.b4a.objects.collections.Map$IterableMap.Get(Map.java:186)
at b4j.example.midi_gm._add(midi_gm.java:544)
at b4j.example.midi_gm._initialize(midi_gm.java:720)
at b4j.example.midisystemstatic._initialize(midisystemstatic.java:399)
at b4j.example.main._appstart(main.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.start(main.java:37)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:186)
at java.lang.Thread.run(Thread.java:748)
Thanks