I want to use the library in my Java Application. I tried running guidoviewer.java and it worked. There's something wrong with the rendering though. The beams are rendered correctly. But the rest of them are misplaced somehow.
So far I tried looking inside paint and setGMN function, but I failed to isolate the problem. I assume something was wrong with conversion from .gmn file to screen, or maybe my library settings. How can I fix this problem?
Here's what I'm using:
1.GuidoJava-v.1.24
2.guidolib-1.63-devkit-windows
3.Running on 32-bit JDK,
Darren
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry but I can’t reproduce the problem. I checked on Windows 10 using the jdk1.8.0_60.
I’ve compiled the guidoviewer sample from the GuidoJava-v1.24 directory:
javac guidoviewer.java
and run :
java guidoviewer
Everything went fine.
Can you send more information on your local context?
Best
—
Dominique
I want to use the library in my Java Application. I tried running guidoviewer.java and it worked. There's something wrong with the rendering though. The beams are rendered correctly. But the rest of them are misplaced somehow.
So far I tried looking inside paint and setGMN function, but I failed to isolate the problem. I assume something was wrong with conversion from .gmn file to screen, or maybe my library settings. How can I fix this problem?
Here's what I'm using:
1.GuidoJava-v.1.24
2.guidolib-1.63-devkit-windows
3.Running on 32-bit JDK,
Hi Dominique thanks for replying. I got really weird bug here.
I'm using Windows 10 64-bit version. In the past few days , I tried running the sample on Intellij and command line,no avail. Tried using GuidoJava-v.1.25 you updated earlier - no luck either. I also have updated the java (now using java 1.8.0.121) ,but both 32 jre and 64 bit jdk version produces the same bug.
Funny thing however, sometimes the rendering is right at random.
So I still get this
but this sometimes occur
Different results from the same gmn file ! I get these results no matter what I'm using (whether it's cmd or intellij and even using both java's 32/64 bit version).What causes such erratic behaviour?
EDIT
The Map> Voice is correct though, although the rest are misplaced. The same goes for other functions below the Map menu item
Last edit: darren 2017-02-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dominique thanks for replying. I got really weird bug here.
I'm using Windows 10 64-bit version. In the past few days , I tried running the sample on Intellij and command line,no avail. Tried using GuidoJava-v.1.25 you updated earlier - no luck either.
actually, there is no change for windows with the latest version (1.25), it only corrects a library ref path on Mac OS
I also have updated the java (now using java 1.8.0.121) ,but both 32 jre and 64 bit jdk version produces the same bug.
Such erratic behavior could come from an uninitialized variable (and that takes random value).
The problem is that I’ve not been able to reproduce up to now. I’ll try again.
Can you confirm that you compiled the guidoviewer.java sample included in the package and that you get this behavior with the compiled viewer?
In case not (or if you modified the code), can you send me the code to reproduce?
Funny thing however, sometimes the rendering is right at random.
So I still get this
but this sometimes occur
Different results from the same gmn file ! What causes such erratic behaviour?
Sorry but now, I can’t reproduce.
I tried with your java code but I’ve not been able to see the problem.
Note that you don’t have to load the GuidoEngine library from the java code, the dependency is solved by the system and the Guido library is automatically loaded when the jni library is loaded.
Note also that I’ve removed the package information in order to run the guidoviewer.
Could you try this very simple and straightforward test:
from an unmodified package expanded to GuidoJava-v.1.26:
ps: make also sure that any of the guido libraries (guidoengine or jniguidoengine) is NOT available from one of the standard libraries paths (in windows system for example), otherwise the system could load one of these libraries and not the one included in the package.
Ah my bad, I'll remove the code that loads the GuidoEngine library from the java code.Thanks for the follow up Dominique.
I've tried your suggestion. After downloading the GuidoJava-v.1.26, I built the java from cmd and then running examples in the example link. But I still got the misplacement. Here:
Did you run the same (only gone through javac once) guidoviewer.java multiple times? That's how I got the misplacement. The rendering is still right sometimes
Last edit: darren 2017-02-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah my bad, I'll remove the code that loads the GuidoEngine library from the java code.Thanks for the follow up Dominique.
I've tried your suggestion. After downloading the GuidoJava-v.1.26, I built the java from cmd and then running examples in the example link. But I still got the misplacement. Here:
And here's my cmd
too small to read, and I can’t enlarge the picture.
Anyway, it probably doesn’t matter...
Did you run the same (only gone through javac once) guidoviewer.java multiple times? That's how I got the misplacement.
yes I did, and the result is always correct
Another hypothesis: check that you have the latest Guido2.ttf font installed. I don’t know how an old font could produce this kind of behavior. The fonts are always compatible and could only lack some symbols, but never know…
Could you also tell me (or send me a picture) how the mappings are displayed (Map menu), in particular the voice and staff mappings. That should provide additional information on what happens internally.
ok, thanks for the pictures, the problem is thus definitely not related to the engine but to the native graphic device.
I’ve been able to reproduce (again) with a lot of patience… (it’s hard to get the pb on my side) and I’ve eventually found the reason:
it comes from the font metrics that are collected at initialization time, and from time to time, the system gives 0 for these metrics. I don’t know why and I don’t know what I can do since that occurs at system level.
The difference is that this version watch the metrics collection process and makes several attempts to get correct results.
You’ll should get debug messages on the console and in particular a "collectMetrics failed” message in case of failure.
Since I modified the code, I’ve not been able to reproduce the pb, even to get the "collectMetrics failed” message, but that doesn’t mean the problem is solved since it’s really hard to trigger here.
Can you check on your side and keep me informed.
—
Dominique
Yes, I've reinstalled the guido font. Now using the guidofont2 but no success. I wonder why myself.
The mapping, staff and system are fine. As a matter of fact, they have always been correct (I've already posted the mapping above). Here's the pics
Dominique thanks for the follow up. Something works ! The misplacement occurs less frequently now. But it still occured, although the miss is less severe.
Here's the cmd output when error occured.
D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 52136, 200, 200
GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 52160, 75, 75
Guido Warning: Named Parameter has wrong type: id
GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625
I did not have the "collectMetrics failed” message though when it appeared. As a comparison, here's the cmd message when things are working just fine.
D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 1024, 256.836, 241.406
GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 2048, 66.8335, 16.2231
Guido Warning: Named Parameter has wrong type: id
GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I want to use the library in my Java Application. I tried running guidoviewer.java and it worked. There's something wrong with the rendering though. The beams are rendered correctly. But the rest of them are misplaced somehow.
So far I tried looking inside paint and setGMN function, but I failed to isolate the problem. I assume something was wrong with conversion from .gmn file to screen, or maybe my library settings. How can I fix this problem?
Here's what I'm using:
1.GuidoJava-v.1.24
2.guidolib-1.63-devkit-windows
3.Running on 32-bit JDK,
Darren
Hi Darren,
Sorry but I can’t reproduce the problem. I checked on Windows 10 using the jdk1.8.0_60.
I’ve compiled the guidoviewer sample from the GuidoJava-v1.24 directory:
Can you send more information on your local context?
Best
—
Dominique
Hi Dominique thanks for replying. I got really weird bug here.
I'm using Windows 10 64-bit version. In the past few days , I tried running the sample on Intellij and command line,no avail. Tried using GuidoJava-v.1.25 you updated earlier - no luck either. I also have updated the java (now using java 1.8.0.121) ,but both 32 jre and 64 bit jdk version produces the same bug.
Funny thing however, sometimes the rendering is right at random.

So I still get this
but this sometimes occur

Different results from the same gmn file ! I get these results no matter what I'm using (whether it's cmd or intellij and even using both java's 32/64 bit version).What causes such erratic behaviour?
EDIT

The Map> Voice is correct though, although the rest are misplaced. The same goes for other functions below the Map menu item
Last edit: darren 2017-02-15
Such erratic behavior could come from an uninitialized variable (and that takes random value).
The problem is that I’ve not been able to reproduce up to now. I’ll try again.
Can you confirm that you compiled the guidoviewer.java sample included in the package and that you get this behavior with the compiled viewer?
In case not (or if you modified the code), can you send me the code to reproduce?
Sure,the source code is attached. Kindly have a look.
I added 3 dependencies to my project in Intellij : guidoengine.jar , jniGUIDOEngine.dll and lastly GUIDOEngine.dll.
I got them from :
1. GuidoJava-v.1.25
2. guidolib-1.63-devkit-windows
Modification is limited only to adding package name and loading GUIDOEngine (shown in comment in the source code). Everything else is untouched.
ok, I’ve been able to reproduce.
I think the java package was not correctly build on windows.
In addition, there was a set of issues with the native devices (GDIPlus on windows).
There is a new package here:
https://www.dropbox.com/s/o26q96ruphfp2fw/GuidoJava-v.1.26.zip?dl=0 https://www.dropbox.com/s/o26q96ruphfp2fw/GuidoJava-v.1.26.zip?dl=0
can you check on your side and tell me if everything is fine now.
—
Dom
Nope, I've tried the 1.26 version above but still got the same inconsistencies here.
Note: I tried linking dll and jar both with System.load( "D:\GuidoJava-v.1.26\GuidoJava-v.1.26\GUIDOEngine64.dll") etc. But still the same
Sorry but now, I can’t reproduce.
I tried with your java code but I’ve not been able to see the problem.
Note that you don’t have to load the GuidoEngine library from the java code, the dependency is solved by the system and the Guido library is automatically loaded when the jni library is loaded.
Note also that I’ve removed the package information in order to run the guidoviewer.
Could you try this very simple and straightforward test:
from an unmodified package expanded to GuidoJava-v.1.26:
then open any of the sample guido files (included in the dev kit or available from https://sourceforge.net/projects/guidolib/files/gmn-examples/ https://sourceforge.net/projects/guidolib/files/gmn-examples/) I’ve tried almost all of them without problem.
—
Dom
ps: make also sure that any of the guido libraries (guidoengine or jniguidoengine) is NOT available from one of the standard libraries paths (in windows system for example), otherwise the system could load one of these libraries and not the one included in the package.
Ah my bad, I'll remove the code that loads the GuidoEngine library from the java code.Thanks for the follow up Dominique.
I've tried your suggestion. After downloading the GuidoJava-v.1.26, I built the java from cmd and then running examples in the example link. But I still got the misplacement. Here:
And here's my cmd
http://imgur.com/4we7vMj
Did you run the same (only gone through javac once) guidoviewer.java multiple times? That's how I got the misplacement. The rendering is still right sometimes
Last edit: darren 2017-02-21
too small to read, and I can’t enlarge the picture.
Anyway, it probably doesn’t matter...
Another hypothesis: check that you have the latest Guido2.ttf font installed. I don’t know how an old font could produce this kind of behavior. The fonts are always compatible and could only lack some symbols, but never know…
Could you also tell me (or send me a picture) how the mappings are displayed (Map menu), in particular the voice and staff mappings. That should provide additional information on what happens internally.
Yes, I've reinstalled the guido font. Now using the guido2.ttf but no success. I wonder why myself.
The mapping, staff and system are fine. As a matter of fact, they have always been correct (I've already posted the mapping above). Here's the pics
Last edit: darren 2017-02-22
Le 22 févr. 2017 à 08:07, darren zerogame@users.sf.net a écrit :
ok, thanks for the pictures, the problem is thus definitely not related to the engine but to the native graphic device.
I’ve been able to reproduce (again) with a lot of patience… (it’s hard to get the pb on my side) and I’ve eventually found the reason:
it comes from the font metrics that are collected at initialization time, and from time to time, the system gives 0 for these metrics. I don’t know why and I don’t know what I can do since that occurs at system level.
You can get a new version of the GuidoEngine dlls here:
https://www.dropbox.com/s/okmfr18goofd0s1/dlls.zip?dl=0
The difference is that this version watch the metrics collection process and makes several attempts to get correct results.
You’ll should get debug messages on the console and in particular a "collectMetrics failed” message in case of failure.
Since I modified the code, I’ve not been able to reproduce the pb, even to get the "collectMetrics failed” message, but that doesn’t mean the problem is solved since it’s really hard to trigger here.
Can you check on your side and keep me informed.
—
Dominique
Dominique thanks for the follow up. Something works ! The misplacement occurs less frequently now. But it still occured, although the miss is less severe.
Here's the cmd output when error occured.
D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 52136, 200, 200
GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 52160, 75, 75
Guido Warning: Named Parameter has wrong type: id
GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625
I did not have the "collectMetrics failed” message though when it appeared. As a comparison, here's the cmd message when things are working just fine.
D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 1024, 256.836, 241.406
GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 2048, 66.8335, 16.2231
Guido Warning: Named Parameter has wrong type: id
GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625