• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ABC file with multiple songs - strange behaviour - Fixed in 3.9.37
#1
I'm aware that MobileSheets doesn't support ABC files that contain multiple songs, but it shouldn't change them and it shouldn't crash!

This is what happens: 
I downloaded Paul Hardy's tunebooks, e.g. Paul Hardy's Parts Tunebook from https://pghardy.net/tunebooks/pgh_parts_tunebook.abc
When I import it for the first time into MobileSheets it seems to work. MobileSheets reports "successfully imported" and the title of the first song shows up on the songs tab, the whole songbook seems to be just a single song.

BUT: the file has been changed by the import process! 

Before the import the X:... line of every tune in the file had a preceding empty line that is required to separate the songs. These empty lines have been removed, the file has become invalid! 
When I try to import the (now modified) ABC songbook file again MobileSheets crashes.
When I try to open the imported song / file MobileSheets crashes.

When I try to open the modified file in Jef Moine's online ABC editor http://moinejf.free.fr/js/edit-1.xhtml it cannot be opened anymore
   

This is the behaviour of MobileSheets 3.9.34 on Win11. 
MobileSheets 3.9.33 on Android is slightly better: while trying to import that same file MobileSheets just crashes without modifying the file.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#2
That must have something to do with me changing the file encoding (that's something I do upon import if needed). That code must be stripping empty lines. I'll have to fix that. I don't want to have to process the file every time it's opened to change the file encoding, so yes, I will sometimes modify the file if needed if it's not saved with simple UTF-8 because otherwise the abc2svg library runs into serious errors.

Mike
Reply
#3
It happens even if the file is already in UTF-8 encoding.
I downloaded it originally in ANSI (Paul Hardy seems to work like that) but I had to convert it to UTF-8 already so that I could use Jef Moines online editor to fix some minor ABC syntax glitches.
Imho it would be better to check the encoding and touch the file only in case it's really necessary.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#4
I have a fix in place for Windows for the file being modified. Android will not modify the file if it's already UTF-8, but Windows is doing it regardless. I'm still trying to find time to reproduce the crash and get to the bottom of that.

Mike
Reply
#5
The file you linked to is not UTF-8 (it's Windows 1252), but I have the logic in place not to do the conversion when it's UTF-8. It also won't strip newlines in other encodings.

The file does not crash for me on Android or Windows. I did not make any changes on Android. I do see that the pages are offset for some reason though - I don't encounter that with any other files. It does take an exceptionally long time to load such a large ABC file with so many individual songs.

Mike
Reply
#6
I've verified it's some of those settings specified at the top of the file. If I remove them all, the pages all render just fine.

Mike
Reply
#7
The file I linked to is Paul Hardy's original, he works with Windows 1252. 
While separating his tunebooks into "one ABC file per song" versions I converted them to UTF-8 and fixed all issues that Jef Moine's online ABC editor http://moinejf.free.fr/js/edit-1.xhtml complained about. You can find the results in my GoogleDrive in HerbertsGoogleDrive\_MobileSheets\Fkbk0\pgh_... renamed to pgh..._edited.abct

If you rename them back to .abc you can reproduce the reported behaviour on Win11 even with the UTF-8 files:
The import seems to work and shows a newly imported song with the title of the first tune of the file. But the file is destroyed because the empty lines are removed. Trying to open that song crashes MobileSheets, even if I remove everything before the first tune.
When I bring back the empty lines I can use the created song entry to open the file.  It is rendered correctly, and I can nicely step page by page through the whole file including the introduction page and all the ABC code before the first tune.

In MobileSheets 3.9.33 (Build 727) on the Boox Tab e.g. _pgh_parts_tunebook_2025_edited.abc is rendered correctly, including the introduction page and all the ABC code before the first tune.

Conclusion: Removing the empty lines between the songs seems to be the only bug. If this is fixed as you say we're hopefully done.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#8
@Mike: Could you please make sure to include a fix for this issue in the upcoming next release. I'm currently working on a project (ABC conversion of Creole Jazzband Fakebook) where this issue really annoys me.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#9
Yes the fix is already in place for the next update. The next update is also almost finished - just testing and fixing bugs with the new features I added to automatically synchronize annotations with the Connect Tablets feature (an incredibly important addition for users with two tablets in book mode).

Mike
Reply
#10
I never managed to try book mode, but always wanted to. But I fully understand that synchronizing annotations is absolutely important in this case.

Great that the "removing empty lines" bug is fixed in the next version.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#11
Fixed in 3.9.37
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2026 MyBB Group.