Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicating pattern yields "unknown" as name in Song Editor #1827

Closed
PatDyn opened this issue Jul 29, 2023 · 16 comments
Closed

Duplicating pattern yields "unknown" as name in Song Editor #1827

PatDyn opened this issue Jul 29, 2023 · 16 comments
Labels

Comments

@PatDyn
Copy link

PatDyn commented Jul 29, 2023

Hydrogen version * : 1.2.1-1, installed via pamac
Operating system + version : Manjaro and Linux Mint 21 Vanessa
Audio driver + version : Jack, 1.9.22


How to reproduce:

  • Right click on a pattern
  • Select Duplicate
  • Enter a name in the properties window/ or leave as is
  • Click OK
  • The duplicated pattern will pop up, labeled "unknown"

Edit: Confirmed also on Linux Mint 21

@theGreatWhiteShark
Copy link
Contributor

Hmm.. That's strange. I can't reproduce it.

Those anything show up in the log when opening Hydrogen from the command line using hydrogen -VDebug? Does this happen with all pattern names you enter or only with a specific set (maybe some non-ASCII UTF-8 characters)?

Is by any chance your hard disk completely full or your /tmp folder not writable by your user account? From taking a quick look at the code it seems that there might be issues in case Hydrogen fails to write new pattern to the temporary folder.

@PatDyn
Copy link
Author

PatDyn commented Aug 11, 2023

My HDD is not full and the /tmp folder is writeable. :)

@PatDyn
Copy link
Author

PatDyn commented Aug 11, 2023

But i found some info in the logs:

(W) XMLDoc::read XML document [/tmp/hydrogen/HouseSet01.EddSly] is not valid with respect to schema [/usr/local/share/hydrogen/data/xsd/drumkit_pattern.xsd], loading may fail
(W) Pattern::loadDoc Pattern [/tmp/hydrogen/HouseSet01.EddSly] does not validate the current pattern schema. Loading might fail.
(W) Legacy::load_drumkit_pattern this code should not be used anymore, it belongs to 0.9.6
(W) XMLNode::read_child_node XML node pattern->pattern_name should exists.
(W) XMLNode::read_child_node XML node pattern->pattern_name should exists.
(W) XMLNode::read_string Using default value unknown for pattern_name

Edit:
I could reproduce this also in Linux Mint 21 on another machine where i built from source (build date is 2023-08-07).

@theGreatWhiteShark
Copy link
Contributor

But i found some info in the logs:

Nice. Could you upload one of the bricked patterns from /tmp?

@theGreatWhiteShark
Copy link
Contributor

I could reproduce this also in Linux Mint 21 on another machine where i built from source (build date is 2023-08-07).

I tried on both Devuan Chimaera and a clean Fedora 38 and couldn't reproduce it yet.

@PatDyn
Copy link
Author

PatDyn commented Aug 15, 2023

But i found some info in the logs:

Nice. Could you upload one of the bricked patterns from /tmp?

Here you go :)
TechnoSet01.mfSUIP.tar.gz

Funny thing i noticed: The name shows up correctly in the file.

@AVLinux
Copy link

AVLinux commented Aug 15, 2023

This also happens to me on AV Linux 21.3 (based on Debian 11 Bullseye). It only happens sometimes though, as you've noted no guaranteed recipe..

@theGreatWhiteShark
Copy link
Contributor

Here you go :)
TechnoSet01.mfSUIP.tar.gz

That's really weird. This pattern looks just fine, validates the corresponding XSD file, and I'm even able to open it.

Could you append .h2pattern to one of the patterns corresponding to a failed duplication and try to open them using Project > Open Pattern?

This also happens to me on AV Linux 21.3 (based on Debian 11 Bullseye). It only happens sometimes though, as you've noted no guaranteed recipe..

Okay. I'll try again on one of those systems (just duplicated the pattern you posted 40 times without an issue).

@theGreatWhiteShark
Copy link
Contributor

I'm afraid I need some more details in order to reproduce this issue.

I run several live Linux OSs and installed AVLinux, compiled the 1.2.1 version of Hydrogen and duplicated various patterns. But I didn't encounter the problem at all.

Do you experience it on fresh installs using new songs too? Does it maybe occur after using Hydrogen quite a lot or just for large song in terms of patterns? What's the frequency of failing duplication?

@AVLinux
Copy link

AVLinux commented Aug 21, 2023

Hi,

This has happened to me working on a new song a couple of weeks ago, I don't have time for beat making this week but next time I do I will screencapture the session and see if this issue pops up while I'm working and perhaps that will give a clue if it's a sequence of operations thing..

@PatDyn
Copy link
Author

PatDyn commented Aug 22, 2023

Could you append .h2pattern to one of the patterns corresponding to a failed duplication and try to open them using Project > Open Pattern?

Alright. I did just that. Attached .h2pattern to the filename. Opened it via Open Pattern. The result is the same - the pattern name is "unknown".

@PatDyn
Copy link
Author

PatDyn commented Aug 22, 2023

Do you experience it on fresh installs using new songs too? Does it maybe occur after using Hydrogen quite a lot or just for large song in terms of patterns? What's the frequency of failing duplication?

I tried with a fresh song, duplicated the pattern and did not experience this problem.
Using the project i experienced this in, duplicating always results in "unknown" as a pattern name.
That project has 23 patterns in total. I attached the project for further analysis.
PercussionSet-02-r.h2song.zip

@theGreatWhiteShark
Copy link
Contributor

That project has 23 patterns in total. I attached the project for further analysis.
PercussionSet-02-r.h2song.zip

Thanks a lot! This one did it.

I already located the bug: the pattern has "too much" notes. Whenever there are more than 100 notes in a pattern Qt fails to validate against our XSD schema. But just Qt as the XSD defines a max occurrence of 1000 notes and the pattern is valid.

I'll fix it

theGreatWhiteShark added a commit to theGreatWhiteShark/hydrogen that referenced this issue Aug 22, 2023
There was a limitation in the XSD file that set the maximum number of allow notes within a pattern to `1000`. This number can easily be reached by setting resolution to `off` and filling all notes for a couple of instruments. Curiously, Qt treated this number wrong and also deemed paterns containing more than `100` notes as invalid.

Once considered invalid, Hydrogen thinks this pattern is of a legacy format. But since it is not, loading partially fails.

I removed the constraint for a maximum number of notes.

fixes hydrogen-music#1827
theGreatWhiteShark added a commit to theGreatWhiteShark/hydrogen that referenced this issue Aug 22, 2023
There was a limitation in the XSD file that set the maximum number of allow notes within a pattern to `1000`. This number can easily be reached by setting resolution to `off` and filling all notes for a couple of instruments. Curiously, Qt treated this number wrong and also deemed paterns containing more than `100` notes as invalid.

Once considered invalid, Hydrogen thinks this pattern is of a legacy format. But since it is not, loading partially fails.

I removed the constraint for a maximum number of notes.

fixes hydrogen-music#1827
@theGreatWhiteShark
Copy link
Contributor

@PatDyn could you compile and install the changes in #1842 and check whether this fixes things at your end?

Alternatively, you could just change line 74 in /usr[/local]/share/hydrogen/data/xsd/drumkit_pattern.xsd from

<xsd:element ref="h2:note" minOccurs="0" maxOccurs="1000"/>

into

<xsd:element ref="h2:note" minOccurs="0" maxOccurs="unbounded"/>

@AVLinux
Copy link

AVLinux commented Aug 22, 2023

Ahhh that makes sense! I think in hindsight it was in pretty busy patterns that this issue popped up.

@theGreatWhiteShark
Copy link
Contributor

Closed with #1842

theGreatWhiteShark added a commit that referenced this issue Aug 30, 2023
There was a limitation in the XSD file that set the maximum number of allow notes within a pattern to `1000`. This number can easily be reached by setting resolution to `off` and filling all notes for a couple of instruments. Curiously, Qt treated this number wrong and also deemed paterns containing more than `100` notes as invalid.

Once considered invalid, Hydrogen thinks this pattern is of a legacy format. But since it is not, loading partially fails.

I removed the constraint for a maximum number of notes.

fixes #1827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants