Neuromancer Bug Fixed

 Chris Phillips found a bug in the Neuromancer 0.6.0beta today.  If you used the RemoteObjectLoader class (recommended), instead of the raw RemoteObjectFactory (way nasty), it was impossible to create multiple remote objects on a single page, because the RemoteObjectLoader class was not thread safe.  The first remote object created was always returned by every RemoteObjectLoader, ragerdless of what remote object it was supposed to load.

Unfortunately, Rob and I are still getting the project all set up on the SourceForge system, so a new build with the fix included hasn't been released.  As such, the bug fix is only available via Subversion or via the patch file below.  Subversion instructions can be found on this page, and as they suggest, you will want to append "/trunk" to the URL listed in the command.

Since that's not very user friendly, I've included a patch for js/io/RemoteObject.js that will update an existing 0.6.0beta version with the bug fix.  Note that you want to patch just that one file, not the whole directory tree.

Index: RemoteObject.js
— RemoteObject.js (revision 3)
+++ RemoteObject.js (revision 4)
@@ -136,8 +136,10 @@
if(typeof async == "undefined")
async = false;
- RemoteObjectLoader.RemoteObjectFactory.setAsync(async);
- RemoteObjectLoader.RemoteObjectFactory.createObject(RemoteObjectLoader.HTTPConnectFactory.getInstance(), url);
+ this.remoteObjectFactory = new RemoteObjectFactory();
+ this.remoteObjectFactory.setAsync(async);
+ this.remoteObjectFactory.createObject(RemoteObjectLoader.HTTPConnectFactory.getInstance(), url);
var self = this;
@@ -143,7 +145,7 @@
checkLoaded = function()
- var remObj = RemoteObjectLoader.RemoteObjectFactory.getObject();
+ var remObj = self.remoteObjectFactory.getObject();
var fieldCount = 0;
for(var i in remObj)
@@ -160,7 +162,6 @@
this.loadInterval = setInterval(checkLoaded, 100);
RemoteObjectLoader.HTTPConnectFactory = new HTTPConnectFactory();
-RemoteObjectLoader.RemoteObjectFactory = new RemoteObjectFactory();

Any decent IDE (cough, Eclipse, cough) will have a patch function, or you can use the command line patch utility.

Comments are closed.