Problem loading Dexed snapshot on Vangelis

Today I was testing some Oram snapshots in Vangelis. Most work fine, but a snapshot of 8 chains with a Dexed engine in each gave problems.
The snapshot is an attempt to emulate a Yamaha TX816 (8 DX7 synths in one rack), just like a MiniDexed.
All chains share the same midi channel and sound together. I added 4 ZS3 subsnapshots, to select different instruments.

When I load the snapshot on Oram it takes less than 6 seconds. The same snapshot on Vangelis takes more than 50 seconds to load.

To rule out the possibility of porting Oram problems to Vangelis, I created a new Vangelis image without any adaptations or tweaks.
On this setup I started a new simpler snapshot from scratch with 8 Dexed engines and factory presets, but no ZS3’s. Loading of this snapshot (see below) takes more than 30 seconds.

Loading of the snapshot gives journal warnings:

Aug 07 18:44:25 zynthian startx[1348]: WARNING:zynthian_gui.busy_thread_task: Clients have been busy for longer than 30s: {'set_chain_state', 'add_processor', 'load snapshot'}
Aug 07 18:44:27 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 17, delay: 94.0us
Aug 07 18:44:28 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 18, delay: 233.0us
Aug 07 18:44:28 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 19, delay: 227.0us
Aug 07 18:44:28 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 20, delay: 87.0us
Aug 07 18:44:28 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 21, delay: 118.0us
Aug 07 18:44:28 zynthian systemd[1]: Stopping qmidinet.service - QMidiNet Service...
Aug 07 18:44:28 zynthian systemd[1]: qmidinet.service: Deactivated successfully.
Aug 07 18:44:28 zynthian systemd[1]: Stopped qmidinet.service - QMidiNet Service.
Aug 07 18:44:28 zynthian startx[1348]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 22, delay: 102029.0us

This is on a custom V5 clone with a fresh install and updated today. As mentioned, snapshots with other engines work fine.

I hope this can be reproduced by others.

030-Dexed x 8.zss (101.3 KB)

EDIT:
When I load the original (4 ZS3) snapshot, Zynthian can’t shutdown. It stops with

Aug 08 09:32:35 zynthian startx[1293]: ERROR:zynthian_chain_manager.remove_processor: Chain None doesn't exist!
Aug 08 09:32:35 zynthian startx[1293]: zynmixer ended
Aug 08 09:32:36 zynthian startx[1293]: free(): invalid pointer
Aug 08 09:32:36 zynthian startx[1261]: ./zynthian.sh: line 373:  1293 Aborted                 ./zynthian_main.py
Aug 08 09:32:36 zynthian startx[1261]: *******************
Aug 08 09:32:36 zynthian startx[1261]: EXIT STATUS => 134
Aug 08 09:32:36 zynthian startx[1261]: *******************

and then the Zynthian UI is started again. Only if I load another snapshot it can shutdown.
In my eyes, it looks like memory corruption.

Kind regards,
Hans.

2 Likes

Sorry, i can’t reproduce. The snapshot loads fast with no errors in my V5 Pi5.

Also, the snapshot you already included has been created with Vangelis, right?
Could you send the original snapshot with 4xZS3, created with Oram?

Regards,

I’ve sent it via PM. It is heavily influenced (as in reverse-engineered) from an original MiniDexed performance by Banana77 and Peter’s copyright notice explicitly forbids distribution.

1 Like

I just fixed a bug related with the slow reload issue. Could you test again?

Regards,

Update does not work.

Following log:

Updating zynthian-sys (vangelis)...
Updated 0 paths from the index
From https://github.com/zynthian/zynthian-sys
ec30f7b..7adf810 vangelis -> origin/vangelis
Updating ec30f7b..7adf810
Fast-forward
sbin/regenerate_engines_db.sh | 4 ++++
scripts/update_zynthian.sh | 10 ++++++++++
scripts/update_zynthian_recipes.sh | 24 +++++++++++++++++++++++-
3 files changed, 37 insertions(+), 1 deletion(-)
Updating System configuration...
Alsa Mixer already configured for HifiBerry DAC+ ADC PRO...
SOUNDCARD_MIXER is OK
BOOT LOG ENABLED
OVERCLOCKING => None
RBPI AUDIO ENABLED
OTG ENABLED
SOUNDCARD CONFIG => dtoverlay=hifiberry-dacplusadcpro\nforce_eeprom_read=0
DISPLAY CONFIG => dtoverlay=vc4-kms-v3d
CUSTOM CONFIG =>
Executing update recipes...
Current patch level: 20260802.1
Applying patch 20260808.1 ...
Applying patch 20260808.2 ...

And then message Exiting and Zynthian service stops.

Ups!! It’s being harder than expected!! :blush:
Try now, please!!

Sorry, no difference

Aug 11 18:30:19 zynthian startx[13226]: WARNING:zynthian_legacy_snapshot.version_3: 'scenes'
Aug 11 18:30:49 zynthian startx[13226]: WARNING:zynthian_gui.busy_thread_task: Clients have been busy for longer than 30s: {'load snapshot', 'add_processor', 'set_chain_state'}
Aug 11 18:31:01 zynthian startx[13226]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 4, delay: 134.0us
Aug 11 18:31:01 zynthian startx[13226]: WARNING:zynthian_autoconnect.midi_autoconnect: Port 'sfizz-01:input' not available
Aug 11 18:31:02 zynthian startx[13226]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 5, delay: 1687.0us
Aug 11 18:31:02 zynthian startx[13226]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 6, delay: 55.0us

Also shutdown still ends in error 134. But the MIMALLOC works.

Aug 11 18:33:10 zynthian startx[13226]: ====================== ZYNSEQ MIMALLOC STATS ====================
Aug 11 18:33:10 zynthian startx[13226]: heap stats:     peak       total       freed     current        unit       count
Aug 11 18:33:10 zynthian startx[13226]:   reserved:     1.0 GiB     1.0 GiB    64.2 KiB     1.0 GiB
Aug 11 18:33:10 zynthian startx[13226]:  committed:     3.3 MiB     3.6 MiB   578.2 KiB     3.0 MiB
Aug 11 18:33:10 zynthian startx[13226]:      reset:     0
Aug 11 18:33:10 zynthian startx[13226]:     purged:   514.0 KiB
Aug 11 18:33:10 zynthian startx[13226]:    touched:     0           0           0           0                                ok
Aug 11 18:33:10 zynthian startx[13226]:      pages:   243         243           0         243
Aug 11 18:33:10 zynthian startx[13226]: -abandoned:     9         366         362           4                                not all freed
Aug 11 18:33:10 zynthian startx[13226]:  -reclaima:     5
Aug 11 18:33:10 zynthian startx[13226]:  -reclaimf:     0
Aug 11 18:33:10 zynthian startx[13226]: -reabandon:     0
Aug 11 18:33:10 zynthian startx[13226]:     -waits:     0
Aug 11 18:33:10 zynthian startx[13226]:  -extended:     0
Aug 11 18:33:10 zynthian startx[13226]:  -noretire:     0
Aug 11 18:33:10 zynthian startx[13226]:     arenas:     1
Aug 11 18:33:10 zynthian startx[13226]:    -purges:     2
Aug 11 18:33:10 zynthian startx[13226]: mmap calls:     2
Aug 11 18:33:10 zynthian startx[13226]:    -commit:     0
Aug 11 18:33:10 zynthian startx[13226]:     -reset:     0
Aug 11 18:33:10 zynthian startx[13226]:     -purge:     8
Aug 11 18:33:10 zynthian startx[13226]:    guarded:     0
Aug 11 18:33:10 zynthian startx[13226]:    threads:     1           2           1           1                                not all freed
Aug 11 18:33:10 zynthian startx[13226]:   searches:     0.0 avg
Aug 11 18:33:10 zynthian startx[13226]: numa nodes:     8
Aug 11 18:33:10 zynthian startx[13226]:    elapsed:   440.799 s
Aug 11 18:33:10 zynthian startx[13226]:    process: user: 28.460 s, system: 19.640 s, faults: 0, rss: 261.1 MiB, commit: 3.3 MiB
Aug 11 18:33:13 zynthian startx[13226]: zynmixer ended
Aug 11 18:33:14 zynthian startx[13226]: free(): invalid pointer
Aug 11 18:33:14 zynthian startx[13194]: ./zynthian.sh: line 373: 13226 Aborted                 ./zynthian_main.py
Aug 11 18:33:14 zynthian startx[13194]: *******************
Aug 11 18:33:14 zynthian startx[13194]: EXIT STATUS => 134
Aug 11 18:33:14 zynthian startx[13194]: *******************
Aug 11 18:33:14 zynthian startx[13673]: /zynthian/config/img/fb_zynthian_message.jpg is a 800x480 JPEG image, color space YCbCr, 3 comps, Huffman coding.
Aug 11 18:33:14 zynthian startx[13673]:   Zooming image by 100%...done
Aug 11 18:33:14 zynthian startx[13673]:   Merging...done
Aug 11 18:33:14 zynthian startx[13673]:   Building XImage...done

I just tried both snapshots and they load quite fast without any error, except the normal XRUNs when loading snapshots and starting engines:

Aug 11 18:52:36 zynthian startx[41545]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 9, delay: 41715.0us
Aug 11 18:52:41 zynthian startx[41545]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 10, delay: 87.0us
Aug 11 18:52:41 zynthian startx[41545]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 11, delay: 62.0us
Aug 11 18:52:41 zynthian startx[41545]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 12, delay: 29.0us
Aug 11 18:52:42 zynthian startx[41545]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! =>count: 13, delay: 137.0us

But no slow loading. No errors like:

ERROR:zynthian_chain_manager.remove_processor: Chain None doesn't exist!

Because this bug has been already fixed :wink:

or

free(): invalid pointer

This looks like a segfault, but i can’t reproduce this.

Your journal is totally normal except for the first line:

Aug 07 18:44:25 zynthian startx[1348]: WARNING:zynthian_gui.busy_thread_task: Clients have been busy for longer than 30s: {'set_chain_state', 'add_processor', 'load snapshot'}

There was an error that was causing slow loading, but it’s now fixed.
Please, reboot and try again to be sure.

Regards,

I have rebooted multiple times, all the same result.

Here is the complete journal. The system is started with an empty snapshot (last-state) and after startup I loaded the Dexed snapshot from Oram. Nothing else.

I hope this helps

journal.txt (157.4 KB)

Could you try disabling VNC and any MIDi network services, if any?

Thanks

Most peculiar, I turned off VNC and now the Dexed snapshot loads quickly. Vangelis is full of surprises…

Thanks @jofemodo . I became discouraged, but now there is hope again.

And have a nice eclipse tonight :smiling_face_with_sunglasses:

EDIT:
When I enable VNC it’s slow again. Disabling it and the problems are gone. Good catch! However, the message ErrCode 134 upon shutdown remains.

1 Like

Hi @HansR !
VNC shouldn’t be enabled “by default”. It should only be enabled when needed and then disabled again. And of course, it’s not recommended to use VNC on stage or rehearsal. And when reporting any issue, it’s important you say “VNC is enabled” :wink:

Anyway, it’s curious VNC affects the load of this snapshot, because our version of Dexed has no native GUI.

Regards,

Absolutely, In Oram it has no such effect.
I have VNC almost always enabled, it has never before caused any trouble or performance issues (RPi5).
Vangelis is still a bit oversensitive…

1 Like

Could this be a contributing issue?

Yep! Good point, @riban !

Opening the native GUi takes always some time. Opening 8 times, takes 8x.
I could disable this again … but regarding Dexed, this is going to change very soon if, as planned, we move to the mainstream version.

Regards,

2 Likes