Problem with MarvinSketch (OSX/Firefox and Safari)

User e68372b980

21-07-2009 21:39:56

I have recently downloaded the Marvin Developer tools in order to embed Marvin into some teaching pages for our Department.


When I run the pages from your manual (index.html) and then looking at the examples I cannot seem to load MarvinSketch applet. It just hangs with the warning "Applet is loading.....please wait".


I have also tried to look at a couple of web pages that use MarvinSketch. In that case the applet loads but i then get an infuriating dialogue box that warns me that the applet is not from a trusted source. The dialogue box returns every few seconds and has hung Firefox several times. Safari behaves fairly similarly.


MacOS 10.5.7


Firefox 3.0.11


Marvin is 5.2.3.1



I don't know what version of Java I have but it was updated in the last few weeks (sorry to sound so dumb).


 


Thanks,


Andrea

ChemAxon 909aee4527

22-07-2009 07:57:11

Dear Andrea,


do these examples work for you?: http://www.chemaxon.com/marvin/examples/applets/sketch/index.html


How do you try opening the index.html page: have you downloaded and extracted the Marvin Applets package to your local computer or on a server?


Do you have an installed and running web server like Tomcat?


Can you please send us at least one link (if it is public) where you had the problem?


Kind regards,
Judit

User e68372b980

03-08-2009 15:58:24

Looks like it's down to my ignorance. I've now unzipped the files again on our server and everything now works moderately well.


I'm a bit puzzled by some peculiar differences between the applet and the desktop versions. The cursor in teh applet version is displaced from where things happen on screen. It makes it very fiddly to link carbons together reliably. It takes several minutes to compensate for the displacement. (Which is fun, if you're into how vision and brain processing works ;-)   )


I've emailed Tamas to see what he thinks.

User e68372b980

03-08-2009 16:08:04

Hmm. Looking at your page, that works perfectly, exactly the same as the desktop version, with the atom list down the side and the templates at the bottom. I can get those to reproduce on our version..... I ownder if there's some configuration thing I don't know about.

ChemAxon 909aee4527

04-08-2009 11:52:47

Dear Andrea,



there is no special configuration needed I know about. I asked Tamas to reply here if he has some thoughts.


Isn't it a bandwidth related slowness?


Kind regards,
Judit

User e68372b980

04-08-2009 13:13:04

It gets a little weirder and I'm now a bit confused.


I've now written a page using your "Applet Only" version of how to embed the MarvinSketch code.


In Firefox i get a truncated version of the MarvinSketch window - the atom types on the right and the structure templates at the bottom are missing. In Safari the page works fine but with a funny grey background.


I should add that your example page runs perfectlywith the same browser (Firefox 3.0.13) while under Safari the chemaxon example page again has the weird grey background.


Any suggestions? Our moodle page is:


http://moodle.ucl.ac.uk/mod/resource/view.php?inpopup=true&id=204605


and you can get to it by selecting the "guest access" option and using the code word "atropine".


Thanks,


Andrea

ChemAxon 7c2d26e5cf

05-08-2009 22:57:24

I could not reproduce this issue under Mac. Can you send snapshoot about your applets (how it looks like when it is truncated and when the grey screen displays).


Have you got any error message on the (Java) Console?

User e68372b980

06-08-2009 07:44:01

Here are two images - the incomplete one from Firefox and the other from Safari. I've now looked at the error console in Firefox and there's a huge list of warnings.


Unfortunately I can't cut and paste them so I've got a screenshot for you. 


Any thoughts?


 

ChemAxon 7c2d26e5cf

06-08-2009 13:14:43

I guess it may be a configuration problem on your machine.


Are you sure that you use the same Java in both browsers? Probably, your Firefox uses different Java than Safari or its plugin is not the proper version. I could not download Firefox 3.0.11, so I could test it with the latest Firefox (3.0.13).


I recommend to update to the latest Firefox (3.0.13). Probably it solves the problem.


My Mac uses Java 1.5.0_16. See screenshots. I also attached a snapshot about its Adds-on list of my Firefox 3.0.13. Please, check the Java plugin version in the "Tools/Adds-on/Plugins" menu of your Firefox.Please also compare which Java version used by the applet in Safari and in Firefox. You can get this info from the "About MarvinSketch" dialog.
To display it, do a right click on the canvas and select "About MarvinSketch" option.


(Sorry for the pure quality of the pictures, I have scalled them down to insert them easier into the post.)

User e68372b980

06-08-2009 16:06:41

Hi.


I've fiddled around a fair bit. I've now updated Firefox to version 3.5.2 and this now means that the java plugin is 0.9.7.2.


Your http://www.chemaxon.com/marvin/examples/applets/sketch/embed.html works perfectly in Firefox.


On the other hand, the page that was truncated before as in the screencap above has the same problem. And because it's truncated and the cursor is displaced I can't actually do the "About Marvinsketch" thing because i can't get to the help menu.


It's really quite bizarre.


If it's any help here is the screencap of the "About marvinsketch" taken in Safari (which remains weirdly grey, but it does work).


Cheers,


Andrea


 

ChemAxon 7c2d26e5cf

06-08-2009 16:22:30


On the other hand, the page that was truncated before as in the screencap above has the same problem. And because it's truncated and the cursor is displaced I can't actually do
the "About Marvinsketch" thing because i can't get to the help menu.


There are several other alternative ways to open "About MarvinSketch" dialog.


- Open a viewer in a new window "View/Open MarvinView in 2D", and select "Help/About". It will give the same info than "About MarvinSketch" dialog.


- Take a right click on the sketch canvas. When popup displays, use arrow keys and "Enter" to browse in the popup menu and select "About MarvinSketch" option. You can also use the mnemonic key of this option ("A") to access it directly after the popup menu was displayed.


- Click to any item on the menubar (e.g.: "File") then browse to the "Help" menu with arrow key. Help menu will display. Do not bother if it is does not fully visible. Just press the proper mnemonic key ("A").


User e68372b980

06-08-2009 18:43:36

Aha. That's interesting. Here is the "About MarvinSketch". I hope this is of some use. Not being very tech-y I'm baffled by all this. To my untrained eye, they look pretty similar......


I'm very grateful to you for all your help on this.


Andrea


 


 

ChemAxon 7c2d26e5cf

10-08-2009 12:57:54

Probably, your Safari does not tolerate the default Look And Feel. 
Please try your example in Safari with the folllowing parameter (prefer metal look and feel instead of the default one):
<param name="skin" value="javax.swing.plaf.metal.MetalLookAndFeel"/>
Does the following example work for you?
http://www.chemaxon.com/marvin/sketch/index.jsp />If you open it with Safari,applet is invoked with Metal look and feel (in other cases, it uses the default settings).

User e68372b980

10-08-2009 13:22:53

Tamas,


Thanks for the suggestion. When I open that page with Safari, I get a beautfiul looking marvin window. Unfortunately Safari hangs and becomes unresponsive after a couple of minutes.......


Andrea

ChemAxon 7c2d26e5cf

11-08-2009 23:14:51

Where does this freezing occures? In which example? Have you built in "skin" parameter into your moodle site example and get this freezing there? Probably, you get it with the index.jsp example?


Have you found any error message on the Console (/Applications/Utilities/Console)?

User e68372b980

12-08-2009 06:14:48

Good morning.


I haven't done anything fancy at all. Safari actually crashes on your example page:


http://www.chemaxon.com/marvin/sketch/index.jsp


 


It takes a couple of minutes and then it locks up. All I can do is force quit so I'm not sure what diagnostics I can give you.

ChemAxon 7c2d26e5cf

13-08-2009 15:20:21

Thanks for the bug report. Indeed, Safari window freezes after loading this page (when Help/About MarvinSketch dialog is opened).


We will debug it.

User 08353716d8

09-05-2010 21:50:18

was a solution ever found to the problem of the applet being truncated? I am currently having the same problem, only in Firefox 3.6/Mac OS 10.6. I have been unable to replicate the problem in Safari or Chrome (Mac OS 10.6 or Windows 7) or IE8 (Windows 7). The applet is cut off on the right and bottom sides, almost identical to the screenshots posted in this thread, and mouse clicks are not positioned correctly - clicking in the lone pair dropdown activates the radical dropdown below it, for example.


My stats:


OS: Mac OS 10.6


Java Version: Jave 6, Upate 17


Plug-in version from Firefox: Java Embedding Plugin 0.9.7.2, MRJ Plugin version 1.0-JEP-0.9.7.2


Any help would be greatly appreciated, my company uses MarvinSketch in an onlin testing/homework application and we very much need to support Firefox on Macs.


 


thanks,


Danny Holyfield


dholyfield _at_ webassign.net

ChemAxon 7c2d26e5cf

11-05-2010 02:01:05

We will check it.

User 08353716d8

14-06-2010 16:23:59

Any solution ever found to this? We just upgraded to 5.3.3, but the applet is still cut off on the right and bottom in Firefox/OSX only. Is the MarvinSketch applet not compatible with Firefox on Macs?

User e68372b980

14-06-2010 20:49:04

I don't know whether a solution was really "found" and to be honest with you, I don't know how we fixed it. Certainly one of the things we did was to move it around to various places in our directory structure and then it worked. Our apporach was then based on the time-honoured "if it ain't broke then don't ask any questions". I can probably tell you where we exactly we put the stuff if you want.


Andrea

User 08353716d8

15-06-2010 14:09:42

That's ok .. I see that ChemAxon does not list Firefox as a recommended browser for Mac OS 10.5 and above. So, unless this magically fixes itself, we'll probably just tell any students using Macs that MarvinSketch doesn't work with Firefox and to use Safari or Chrome instead. Not the most desireable solution, but it will work.

ChemAxon 7c2d26e5cf

15-06-2010 14:12:12

Can you show the embedded applet code into html?


OS X Firefox can behaves differently than other browser on other platform.


Because of compatibility issues, some features can be unavailable under certain platform.


Please also give the browser and java version.


These info would be very useful to be able to check this issue.

User e68372b980

15-06-2010 14:34:37

Tamas.


I am using MacOSX 10.6.3 with Firefox 3.5.4 and Java13.2.0.


The code for the page that has the applet that works properly is listed below:


 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="http://moodle.ucl.ac.uk/theme/standard/styles.php?forceconfig=ucl-purpleblue" />
<link rel="stylesheet" type="text/css" href="http://moodle.ucl.ac.uk/theme/ucl-purpleblue/styles.php?forceconfig=ucl-purpleblue" />
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/yui/yahoo/yahoo-min.js"></ class="end-tag">script><script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/yui/event/event-min.js"></ class="end-tag">script><script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/yui/connection/connection-min.js"></ class="end-tag">script><script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/swfobject/swfobject.js"></ class="end-tag">script><script type="text/javascript">
var flashversion = swfobject.getFlashPlayerVersion();
YAHOO.util.Connect.asyncRequest('GET','http://moodle.ucl.ac.uk/login/environment.php?sesskey=8nn8mzHcOL&amp;flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);
</script>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="http://moodle.ucl.ac.uk/theme/standard/styles_ie7.css" />
<![endif]-->

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="http://moodle.ucl.ac.uk/theme/standard/styles_ie6.css" />
<![endif]-->




    <meta name="keywords" content="moodle,  " />
<title></title>
<link rel="shortcut icon" href="http://moodle.ucl.ac.uk/theme/ucl-purpleblue/favicon.ico" />
<!--<style type="text/css">/*<![CDATA[*/ body{behavior:url(http://moodle.ucl.ac.uk/lib/csshover.htc);} /*]]>*/</style>-->

<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/javascript-static.js"></ class="end-tag">script>
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/javascript-mod.php"></ class="end-tag">script>
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/overlib/overlib.js"></ class="end-tag">script>
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/overlib/overlib_cssstyle.js"></ class="end-tag">script>

<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/cookies.js"></ class="end-tag">script>
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/ufo.js"></ class="end-tag">script>
<script type="text/javascript" src="http://moodle.ucl.ac.uk/lib/dropdown.js"></ class="end-tag">script>

<script type="text/javascript" defer="defer">
//<![CDATA[
setTimeout('fix_column_widths()', 20);
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function openpopup(url, name, options, fullscreen) {
var fullurl = "http://moodle.ucl.ac.uk" + url;
var windowobj = window.open(fullurl, name, options);
if (!windowobj) {
return true;
}
if (fullscreen) {
windowobj.moveTo(0, 0);
windowobj.resizeTo(screen.availWidth, screen.availHeight);
}
windowobj.focus();
return false;
}

function uncheckall() {
var inputs = document.getElementsByTagName('input');
for(var i = 0; i < inputs.length; i++) {
inputs.checked = false;
}
}

function checkall() {
var inputs = document.getElementsByTagName('input');
for(var i = 0; i < inputs.length; i++) {
inputs.checked = true;
}
}

function inserttext(text) {
text = ' ' + text + ' ';
if ( opener.document.forms['theform'].message.createTextRange && opener.document.forms['theform'].message.caretPos) {
var caretPos = opener.document.forms['theform'].message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
} else {
opener.document.forms['theform'].message.value += text;
}
opener.document.forms['theform'].message.focus();
}

function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; i<oClassNames.length; i++){
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
}
}
else{
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
}
var oElement;
var bMatchesAll;
for(var j=0; j<arrElements.length; j++){
oElement = arrElements[j];
bMatchesAll = true;
for(var k=0; k<arrRegExpClassNames.length; k++){
if(!arrRegExpClassNames[k].test(oElement.className)){
bMatchesAll = false;
break;
}
}
if(bMatchesAll){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
//]]>
</script>
</head>

<body class="mod-resource course-4979 dir-ltr lang-en_utf8" id="mod-resource-view">

<div id="page">

<!-- END OF HEADER -->

    <div id="content">
<div class="box generalbox generalboxcontent boxaligncenter clearfix"><h3 style="text-align: center;">Welcome to the MarvinSketch Page</h3>Here you can draw any molecular structure you might ever want. Go on. Have a go. Draw something illegal! <br /><br />To use MarvinSketch, select the tools in the left and right toolbars. There are ready made templates at the bottom of the page. Once you've drawn the picture you can either save the file to your hard drive (as a picture or a Marvin .cxsma file for later re-use) or you can choose Select All under the Edit menu and then Copy As SMILES string to produce a unique text string that defines your molecule. You will need to paste such strings into answers to some of the revision questions. Have fun. <br /><br />You may also want to use MarvinSketch for things above and beyond the current course. What's the rudest molecule you can draw? What about the most unlikely? Feel free to post ideas in the Fun and Frolic Forum.<br /><br /> <applet width="540" height="480" code="JMSketch" archive="jmarvin.jar" codebase="http://moodle.ucl.ac.uk/file.php/4979/marvin/"><strong>(YOU CANNOT SEE A JAVA APPLET HERE)</strong> </applet></div>
</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
<div id="footer">
<p class="helplink"><a href="http://docs.moodle.org/en/mod/resource/view" target="_blank"><img class="iconhelp" src="http://moodle.ucl.ac.uk/pix/docs.gif" alt="" />Moodle Docs for this page</a></p><br><hr />
<div class="data_protection">

	Data Protection Act 1988:  UCL Moodle users are reminded that their use of Moodle will be logged and that this information, with other personal data about them contained within the system, will be used by tutors and/or facilitators to monitor their participation, progress and completion of the courses.

</div>
<div class="policies">
<a href="http://www.ucl.ac.uk/cert/swg/policy/Guidelines-6-elearning_200703.html"> /> Guidelines for e-learning communication tools
</a>
</div>

<div class="contact_copyright">
University College London - Gower Street - London - WC1E 6BT - <img src="http://www.ucl.ac.uk/images/phone.gif" id="phone" alt="Telephone:" width="13" height="9"> +44 (0)20 7679 2000
</div>



</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4551567-2");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

User 08353716d8

15-06-2010 14:57:22

sure thing:


 


browser: Firefox 3.6.3


OS: Mac OS 10.6.3


Java version: 1.6.0_20


MarvinSketch version: 5.2.4 (error also occurs in 5.3.3, not listing that source as we have other problems relating to template files with the new version)


applet code:


<applet codebase="http://www.dholyfield.dev.webassign.net/marvin-5.3.3" archive="jmarvin.jar" code="JMSketch" width="625" height="520" name="medit" id="medit" MAYSCRIPT>
<param name='scriptable' value='true'>
<param name='skin' value='javax.swing.plaf.metal.MetalLookAndFeel'>
<param name='autoscale' value='true'>
<param name='maxscale' value='42'>
<param name='scale' value='42'>
<param name='molbg' value='#c1d7e8'>
<param name='atomFont' value='Serif'>
<param name='undetachByX' value='false'>
<param name='menuconfig' value='http://www.dholyfield.dev.webassign.net/marvincustom/customization.xml'>
<param name='shortcuts' value='http://www.dholyfield.dev.webassign.net/marvincustom/shortcuts.xml'>
<param name='customizationEnabled' value='false'>
<param name='templateToolbarCustomizable' value='false'>
<param name='extraBonds' value='arom,wedge,either,any'>
<param name='atomNumbersVisible' value='false'>
<param name='bondLengthVisible' value='false'>
<param name='valenceErrorVisible' value='false'>
<param name='ezVisible' value='false'>
<param name='addRemoveHatomsEnabled' value='false'>
<param name='lonePairsAutoCalc' value='false'>
<param name='atomMappingVisible' value='true'>
<param name='lonePairsVisible' value='true'>
<param name='chiralitySupport' value='off'>
<param name='menubar' value='false'>
<param name='ttmpls0' value=''>
<param name='rendering' value='wireframe'>
<param name='atomSymbolsVisible' value='true'>
<param name='sketchCarbonVisibility' value='on'>
<param name='explicitH' value='true'>
<param name='implicitH' value='all'>
<strong>You must have Java and Javascript to view MarvinSketch</strong>
</applet>

User 08353716d8

24-06-2010 14:00:53

We just upgraded to MarvinSketch 5.3.4, which I hoped would fix the problem, but no luck. The MarvinSketch applet is still cut off on the right and bottom in Firefox for Mac OS 10.6, rendering it unusable to students. Any other ideas what the problem could be? My applet code is the same as above except that we're now using the launcher (appletlauncher.jar) for the archive and the code (chemaxon.marvin.applet.JMSketchLaunch) attributes.

User 08353716d8

28-06-2010 19:05:02

no help? i know this is an odd problem, and i'm guessing no one has been able to repro.


Andrea is the only one I've seen run into the the problem - you say you fixed it by simply moving the location of the applet files? our 5.3.4 files are technically in a new folder, but the applet is still unusable in Firefox for macs.


fingers crossed that there is some kind of fix for this ...

ChemAxon 7c2d26e5cf

01-07-2010 15:28:27

Although we have tested applet in several configuration, we could not reproduce rendering issues (truncated applet in Safari and overlapping canvas in Firefox).


I suggest to increase horizontal dimension of applet (width attribute). Probably, it helps to render icons and components properly on the larger space.


Anyway we recommend only Safari for latest OS X.

User 08353716d8

02-07-2010 16:09:44

For now, that's what we're doing - recommending students on Macs use Safari. Everything works fine there. The truncation problem occurs for us in Firefox on Macs. Increasing the width of the applet tag was one of the first things I tried - the MarvinSketch applet stretches to fit the new width, but is still cut off on the right and bottom. I'm not surprised you couldn't repro, when I go to the demo page in Firefox, it's not cut off. So it must be something about the page we're dropping it into. I'll let you know if I ever find a fix so you can log it in your notes.

User e68372b980

04-07-2010 20:16:52

It's been so long since it mysteriously started working again in Firefox that I just can't remember what we did, I'm afraid. But I too had seen the sample ChemAxon page where the applet worked and was driven half mad by my own pages..........


Remember - a sufficiently advanced technology will look like magic..........


;-)


Andrea