gburca / VirtMus

the modern music stand - virtmus.com
GNU General Public License v2.0
8 stars 2 forks source link

Application issue: java.lang.UnsupportedOperationException #1

Open Backjus opened 7 years ago

Backjus commented 7 years ago

Hello Gabriel, first at all thank you very much for your great application. I'm a semi professional musician an implemented your app on a raspberry pi 3 and a 22'' Monitor. It is very usefull and works very fast since I changed my music notes from .pdf to .jpg format.

At the moment I've got an issue that appeared twice till now. The first time I fixed it by completely installing the application new (deleted the folders and making the playlists new). But in the meantime I've got about 200 songs in it (in about 10 playlists) and it would be a lot of work to do this again.

Therefore I' like to ask you for your help.

The issue is like following:

After I started the application 6 of my about 10 playlist disappeared

java.lang.UnsupportedOperationException at org.openide.LifecycleManager.markForRestart(LifecycleManager.java:109) at org.netbeans.core.windows.options.LafPanel$4.mouseClicked(LafPanel.java:341) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269) at java.awt.Component.processMouseEvent(Component.java:6538) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Thank you for your help in advance.

Regards Konny

gburca commented 7 years ago

That's an interesting setup. I never tried it on a Pi.

In the future, if you encounter the problem again, you should not delete the playlists and songs. See if you can save all the xml files so we can see if they're somehow corrupt (especially the *.playlist.xml ones).

gburca commented 7 years ago

From the stack trace it looks like you're trying to change the application look-n-feel (which requires an application restart). I'm able to reproduce your exception if I try to change the look-n-feel, but I'm not sure how the disappearing playlists ties into this.

Did you try changing the look-n-feel while you had unsaved changes?

Backjus commented 7 years ago

Hi Gabriel,

sorry for the delay and thanks for your patience. I didn't find the time to answer you until now.

First of all: In the meantime I found the root cause for my issue:

The issue happend at the starting of VirtMus, when the internal routine is reading the initial songlists. And here I found the issue. The failure was using special characters in my folder names and special characters in the name of my songs files: E.g. I called a song folder "Rock&Roll" or I used German vowel mutations like "ä, ö, ü, ß" in the file names. I tried to replace these letters one by one an I had success. When I removed these vowel mutations resp. special characters from the folder names and file names, everything worked fine. Also I edited the affected .xml entries and erased these characters out of it.

The songlists appeared again and everything worked fine again!!

Now I want to give you some more informations about your questions and my setup:

The challange for me was, that I am playing in 3 different bands: a mandolin ensemble, a trio as cover band (3 men band), and in a gospel choire. I had so much music sheets, for each of the three bands, that it was very uncomfortable to have all the sheets with me, or having the correct sheets for the correct ensemble with me. So I wished to have all existing music sheets with me at every time. Because I am a Computer scientist, I was looking for a reason in the digital area. Solutions for tablet pcs were not big enough and were to expensive for what they offered. I needed a solution where I could see two music sheets in the original size at once. In Germany we use the "Din A4" format. That's 30 x 20 cm = approximately 10 x 7 inch (for one sheet). Therefore I needed a 20 x 14 inch screen. And so looked for a 22'' monitor and looked also for a music sheet application that I could run on a pc system. It had to have transportabel because I planed to use it for my musical gigs on stage and for rehearsals and exercises. So I found the VirtMus application. The next problem was finding a transportable pc system for this purpose and I tried it out on a raspberry pi.

I installed your VirtMus application on a raspberry pi, 3rd generation, and it worked fine. At the beginning I used the music sheets in the .pdf file format. But this file format didn't work for me. Some sheets took more then 30, 40 or 60 seconds to load. On stage I could not use these sheets because it took to long time to load and show them upon the screen. So I was looking for a solution for this and found it by converting the .pdf files into the .jpg file format. In the same step I changed the document size to the needed resolution of 1920 x 1200 px. So the application didn't have to convert them itself and so it saved much time. The success was fantastic. Since I use .jpg files of 1920x1200 px the sheets will be loaded in approximately 3 till 5 seconds!!

Another advantage of my system is, that I don't need a lamp for my music stand anymore. The sheets are always bright and good to read on the screen, independent of the rooms brightness an lighting.

Further I use a modified foot switch in which I soldered a board of a bluetooth mouse for wireless using. And I use a mini keyboard which I fastened on the left bottom side of the monitor using a velcro brand strip.

I send some pictures of my system to you. Maybe it could be interesting for somebody ;-)

img_20170418_170437 img_20170418_170556 img_20170418_170657 img_20170418_170712 img_20170418_170804 img_20170418_170836 img_20170418_170909 img_20170418_170925 img_20170418_171002 img_20170418_171037 img_20170418_171043 img_20170418_171127 img_20170418_171221 img_20170418_171311

Now to your other questions, but I think they are answered already ;-)

So Gabriel thank you for your great application and for the work you had with it. It's a great and perfect solution for my need.

Hope this article will help someone and animates a lot of people to use this really good application.

Kind regards Konny

gburca commented 7 years ago

@Backjus , that's a neat idea. Thanks for the detailed description and pictures.

I know in general PDFs are slow to render with the currently available open-source renderers. Some big copiers/scanners also generate PDFs that are particularly slow for some reason. That's why I added the ability to easily convert the PDF to JPGs on a per-song basis.

I'll leave this issue open for now until I get a chance to see what's causing the problem with unusual file names.

gburca commented 7 years ago

I tried reproducing this issue on the Mac but was unable to. Filenames with foreign characters work just fine for playlist, song, or music pages. What OS are you using?

Backjus commented 7 years ago

Hello Gabriel,

sorry for the late answer.

I use the original Raspian-OS for my Raspberry 3.

Regards Konny