#40 Bad control character error when attempting to load banks


Since April 2012, the Linux version doesn't load banks or parameter files. This renders the program completely useless. The problem is a bug in XMLwrapper.cpp

A bug report (and a patch!) has been filed in the Debian bug system (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661887):

Dear Maintainer,

Zynaddsubfx will not load instrument banks or
parameter files. Only puts out pure sine wave. It had been working fine for

Running from the command line gives the following error when trying to load any
instrument bank or parameter file:

"mxml: Bad control character 0x1f not allowed by XML standard!"

Checked unzipped parameter files with a hex editor, no 0x1f characters in file.

Removed and purged zynaddsubfx and libmxml1, re-installed, got the same error.

Having the same problem on my laptop (testing, i686pae).

-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-1-rt-amd64 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages zynaddsubfx depends on:
ii libasound2 1.0.25-2
ii libc6 2.13-26
ii libfftw3-3 3.3-1
ii libfltk1.1 1.1.10-10
ii libgcc1 1:4.6.2-12
ii libjack-jackd2-0 [libjack-0.116] 1.9.8~dfsg.1-1
ii libmxml1 2.6-2
ii libstdc++6 4.6.2-12
ii zlib1g 1:1.2.6.dfsg-1

zynaddsubfx recommends no packages.

zynaddsubfx suggests no packages.

Lawrence D’Oliveiro has come up with a patch (attached) that I have verified fixes the problem:
Here is a proposed fix for this problem.

The original code was using gzseek/gzeof/gztell to figure out the
uncompressed size of a compressed instrument bank file, to preallocate
the buffer for reading its contents, and something in zlib has broken
that. I know this is supposed to work, but it’s going to be slow anyway.
So this patch replaces that with incremental buffer allocation and
reading, in increments of 1 kiB. Looking at the existing bank files,
which seem to be only a few kiB in size, this should work OK in terms
of both speed and RAM usage.


  • David Hanson

    David Hanson - 2012-06-11

    Patch for XMLwrapper.cpp that fixes bug in Linux version that prevents banks or parameter files from loading

  • Mark McCurry

    Mark McCurry - 2012-06-11
    • assigned_to: nobody --> fundamental
  • Mark McCurry

    Mark McCurry - 2012-06-11

    I will as soon as possible (likely today) try to replicate the bug and merge in a fix as soon as I have verified if the zlib code is responsible.
    I was planning the 2.4.3 release to be quite soon and it should be out this week with the fix.

  • Mark McCurry

    Mark McCurry - 2012-06-11
    • status: open --> pending-out-of-date
  • Mark McCurry

    Mark McCurry - 2012-06-11

    As suspected, this bug report is out of date.
    While the version of zyn that debian testing ships with has this bug, this bug does not exist in the git head and thus it does not need to be patched.
    As I stated before there should be a release fairly soon, and I have tested this version on a fresh debian weezy install (32 bit if relevent).
    If you are able to replicate this bug with the current version of zyn, then feel free to reopen.

  • Mark McCurry

    Mark McCurry - 2013-08-16
    • status: pending-out-of-date --> closed-out-of-date
    • Group: --> v2.4.4

Log in to post a comment.