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

Hangs, possibly due to {transpose} with [N.C.] #301

Closed
gwyndaf opened this issue Aug 13, 2023 · 4 comments
Closed

Hangs, possibly due to {transpose} with [N.C.] #301

gwyndaf opened this issue Aug 13, 2023 · 4 comments

Comments

@gwyndaf
Copy link

gwyndaf commented Aug 13, 2023

Using 6.020_017, some issues with hanging, e.g.

{title: Grid special character?}
{transpose: -10}
{define: \\ copy N.C. format "<span face=mono weight=regular color=navy size=95%>↓</span>" }
{start_of_grid: 0+4x4+0 }
| Cm~\ |
{end_of_grid}

and

{title: N.C. transpose} 
{transpose: +3}
No chord [N.C.]

No errors messages produced, but processing hangs.

Based on the pared back samples above, it seems related to {transpose} and [N.C.]. In the first example, I can prevent hanging by removing the copy N.C. part in {define}. That seemed necessary in earlier versions but now seems obsolete. But it does point to [N.C.] as being a cause.

Past versions have given warning messages about being unable to parse/transpose [N.C.], so I think it's a known challenge, but the latest version seems like maybe it's not trapping that situation and causing a hang somewhere.

@sciurius
Copy link
Collaborator

As of 6.020_15 the non-transposed chord is stored with "xp" prefix. However, if there was no actual transpose (because it is N.C.) then a reference to itself was stored, causing a circular reference and endless loop.

6.020_018 should prevent this.

@gwyndaf
Copy link
Author

gwyndaf commented Aug 13, 2023

Is that on github yet?

I've done a pull, but still getting 6.020_017

ChordPro pushed a commit that referenced this issue Aug 13, 2023
@sciurius
Copy link
Collaborator

sciurius commented Aug 13, 2023 via email

@gwyndaf
Copy link
Author

gwyndaf commented Aug 13, 2023

Great. _018 moves along nicely with no hanging.

@gwyndaf gwyndaf closed this as completed Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants