Archive for the 'Bug Fixes' Category

Legacy sketches will not work under Chrome Mac OS X

A recent update on Mac OS X (10.8.2+) removed the Java and required users to download/install new Java from Oracle’s site. This also came with a new problem: Chrome in Mac OS X will not be able to run Java applets because it is a 32 bit browser.

Well, not much we can do about that (unless you work at Google or Oracle). Therefore legacy sketches that run on Java will not be displayed to Chrome users and they will be requested to open the sketch in another browser.

This will come in the next code push to OpenProcessing. pff. I hate browser problems..

Tweaking sketches! Now on OpenProcessing.

Last week I launched a new feature on the site. Tweaking, also known as forking, allows you to select any sketch on OpenProcessing and create tweak (a fork) of it and share back with the people on the website.

 

Continue reading ‘Tweaking sketches! Now on OpenProcessing.’

Recent issues on Chrome and Safari vs. Java applets

Update January 17, 2011: The issue that I posted below had been resolved, thanks to the user’s feedback in the comments below. There are still some slowness of Java and OpenGL issues under Chrome and Safari, but I will publish a new blog post about those issues.
—————————–
After some updates on Chrome and Safari (or Java itself, I am not quite sure) happened within the last month, sketches viewed in Chrome and Safari started to have issues. I try to find a fix, however I couldn’t find a proper solution, so I am reaching out to you people to see if anyone has a solution. Below, I try to dictate the issue and the current temporary fix I am using on the website at the moment.

How it was before

On OpenProcessing I was using the <object> tag, which is defined by W3C as the tag to be used when loading Java applets. Every sketch on the site has its own folder (eg. /visuals/applets/visuale33893968dc725ff118fe73b6c3d41cc) so I was also using the codebase parameter to provide the directory that the sketch runs under. So when a sketch is using an image (eg. loadImage(“test.jpg”) ), java would look for the image on the codebase directory.

The html code looked like this:

<object classid="java:living.class"
            			type="application/x-java-applet"
				codebase="../visuals/applets/visuale33893968dc725ff118fe73b6c3d41cc"
            			archive="living.jar,core.jar"

            			width="300" height="300"
            			standby="Loading Processing software..." >
		<param name="archive" value="living.jar,core.jar" />
		<param name="codebase" value="../visuals/applets/visuale33893968dc725ff118fe73b6c3d41cc/">
</object>

The problem: Chrome and Safari stopped supporting <object> tag.

Around mid-December, 2010, chrome and safari browsers stopped displaying java applets given with <object> tags. I was also informed about this issue on the feedback forum and couple of users recommended me to check out javadeploy.js, a javascript solution to curate the proper html code for displaying applet. This solution is also used by the Processing application itself when exporting sketches to html. After playing a little bit with it, I saw that this javascript creates an <applet> code (which is deprecated by W3C) instead of <object> tag, but sketches seemed to work fine across browsers (but extremely slow on Chrome and Safari). So I updated the site with this version. The javascript code looked like this:

var attributes = {
 codebase: '../visuals/applets/visuale33893968dc725ff118fe73b6c3d41cc',
 code: 'living.class',
 archive: 'living.jar,living.jar,core.jar',
 width: 300,
 height: 300,
 image: 'loading.gif'
 };
var parameters = { };
var version = '1.5';
deployJava.runApplet(attributes, parameters, version);

HTML code that deployJava generates looked like this:

<applet codebase="../visuals/applets/visuale33893968dc725ff118fe73b6c3d41cc" code="living.class"
 archive="living.jar,living.jar,core.jar" width="300" height="300" image="loading.gif">
 <param name="codebase_lookup" value="false">
</applet>

After a week, I started receiving comments about sketches not loading external files (images, sound files, etc.). After some digging, I realized java applet was ignoring the codebase information, and wasn’t able to find the related files. This wasn’t becoming an issue when you check index.html file generated by Processing on export, since every file is in the same directory and there is no codebase information. However, it was becoming an issue when your uploaded sketch gets moved to its own directory under applets folder.

Current situation: <object> for Firefox :)   but  <applet> for Chrome, Safari :(

Currently, I added the logic to check the browser of the user and display <applet> version for Chrome and Safari, and <object> version for the other browsers. So this only partially solves the problem. People using Chrome and Safari still can’t see the sketches using images, audio, or any external file.

For the moment I have to advise you to use Firefox when browsing OpenProcessing (I always found Firefox superior to others, but of course, I don’t support browser discrimination). You will see the sketches properly and fast. If you use Chrome or Safari, it will be slow, and any sketch using external files will break.

I would appreciate any comment, direction or help you can provide me on solving this issue. Please also keep me updated if you see errors and problems that might be related to this issue or related to the website in general. Only with your information and emails I can keep track of the user experience on the site. Please comment below, or shoot an email to .

Character display issues solved (hopefully!), but needs some action from you; just enter again in “edit details”

Yes, I am optimistic this time! Your Swedish, Norwegian, Turkish, Greek, etc.. names should show up all OK with all the actual characters!

Because of the wrong character encoding, names and titles on the website (like Aşçıoğlu, Ilgın, Øyvind Åsane, Mayré Martínez) was being displayed in variously different ways (like A?ç?o?lu, ?lg?n, Martínez)..

If your name currently doesn’t look right (or your sketch titles), please edit it once more, so that it can be saved to database correctly! I am so sorry that you have to do these once again, because I was initially stupid enough not to realize the problem with the character encoding initially.

Please, please, let me know if you still have problems, so that I can work on it! You should be able to see all the characters fine.