Displayed customized template structures in MarvinSketch

User 37df300f74

09-06-2015 15:33:00

Hi, 


We customized Marvin Sketch UI using customization xml and user-defined template file and call sketcher.setParams("tmpls0=:Generic:com/.../util/files/marvin.mytemplates"); It works in the earlier version (not sure which version and we are with 6.2 at this point), 


Now when I start it, I got the following exceptions and maybe 4 out 5 times, the template structures are displayed correctly and 1 out of 5 times, no template structures displayed, but every time I got the similar exception below. I know it is caused by setParams call since if I comment that line out, there will be no exception thrown out.


also it is not clear what index and size refers to since I always get 21/20 in the exception whether I remove or add structures in my template file.


Any idea?


Thanks


Hongzhou


------------------------------


Exception in thread "Thread-16" java.lang.IndexOutOfBoundsException: Index: 21, Size: 20


at java.util.ArrayList.RangeCheck(Unknown Source)


at java.util.ArrayList.get(Unknown Source)


at chemaxon.marvin.sketch.templates.TemplateLibrary.getMyTemplatesSet(TemplateLibrary.java:235)


at chemaxon.marvin.sketch.templates.TemplateLibrary.getMyTemplates(TemplateLibrary.java:243)


at chemaxon.marvin.sketch.swing.templates.TemplateHandler.getMoleculesWithAbbreviations(TemplateHandler.java:700)


at chemaxon.marvin.sketch.swing.SketchPanel$9.run(SketchPanel.java:3627)


Exception in thread "Thread-19" java.lang.IndexOutOfBoundsException: Index: 21, Size: 20


at java.util.ArrayList.RangeCheck(Unknown Source)


at java.util.ArrayList.get(Unknown Source)


at chemaxon.marvin.sketch.templates.TemplateLibrary.getMyTemplatesSet(TemplateLibrary.java:235)


at chemaxon.marvin.sketch.templates.TemplateLibrary.getMyTemplates(TemplateLibrary.java:243)


at chemaxon.marvin.sketch.swing.templates.TemplateHandler.getMoleculesWithAbbreviations(TemplateHandler.java:700)


at chemaxon.marvin.sketch.swing.SketchPanel$9.run(SketchPanel.java:3627)

ChemAxon 4fa3cf533c

10-06-2015 09:29:10

Hi Hongzhou,


By that time, around 6.2 we introduced a new way of getting template molecules, therefore the template is not location based, but based on a dictionary, provided by us. In the beginning there were some issues with these, since they no longer have a "location" but instead they have "dictionary" property. 


I've tried to find that this was an issue or not, because as I remember, a similar issue has been solved a long time ago, but could not find it. 


What bugs me, that it is not consistent. I could try to reproduce your case, by providing the parameter you use, and the files you used, but I would advise to upgrading to a newer version, and see if the problem exists. 


 


Regards,


Tamas Fazekas-Vigh

User 37df300f74

11-06-2015 15:45:14

Hi Tomas,


 


Thanks for your message. I did upgrade to the latest version and the issue is still here.


Here is my codes. As I said, if I remove last line, no exception.


If I run the same codes many times, I got (no template structure loaded, correctly loaded and double loaded) with similar exceptions. I suspect it is thread issue. I attached the my codes, exception, templates content and screen shot for your review.


Thanks


Hongzhou

ChemAxon 4fa3cf533c

12-06-2015 12:53:00

Hi Hongzhou


I've been able to reproduce the issue with the code you've provided. Indeed, it seems there is a race condition somewhere inside the code, and it causes this exception, among other exceptions, as I've found.


We've created a ticket in our issue tracking system and will report back, as soon as it is finished. 


Regards, 


Tamas Fazekas-Vígh

User 37df300f74

16-06-2015 14:03:28

Hi Tomas,


Glad you can reproduce the issue. just by any chance, do you have a rough timeline this issue be fixed? an updated jar file would be enough for me.


Thanks


Hongzhou

ChemAxon f052bdfe3c

17-06-2015 12:39:07

Hi Hongzhou,


Unfortunately, we cannot give estimation for this problem, we need more time to investigate the possible fixes. 


Regards,


Efi

User 37df300f74

03-06-2016 20:02:39

Hi there, it is almost a year. Do you guys make any progress on this issue? Thanks


Hongzhou

ChemAxon f052bdfe3c

15-06-2016 08:13:24

Unfortunately, we were not able to solve this issue yet.


Best regards,


Efi