last day (25 days later) » 

12:17 AM
Some of you might have problems with our Image Uploader Palette in the new Mathematica version 10.0.1. The issue was reported for Windows (and I haven't experienced it neither on Mac nor Linux). The palette seems to hang when you press the upload button.
Due to the great help of rhermans we could expose many details of this bug and I think it has most probably nothing to do with the Uploader itself but with JLink and Java we use.
If you experience problems with the uploader, you can try to call the core routine manually to see where the delay/hang comes from:
<< JLink`
png = ExportString[Plot[x, {x, 0, 1}], "PNG"];
InstallJava[];
JLink`JavaBlock[
 JLink`LoadJavaClass["de.halirutan.uploader.SEUploader",
  StaticsVisible -> True];
 SEUploader`sendImage[ToCharacterCode[png]]]
The last block takes up to a minute, where it should take only some seconds.
What rhermans could tell is that the <<JLink` call throws error messages like
Set::wrsym: Symbol $jlinkExtraReadDirs is Protected. >>
Attributes::locked: Symbol $jlinkExtraReadDirs is locked. >>
The variables in question live under the context JLink`InstallJava`Private`$jlinkExtraWriteDirs and I suspect they have something to do with the issue. Since the uploading routine is very simple, one source of the bug could be the creation of a temporary file.
If someone who experiences the issue could try the following and report back, it would be very helpful. First, restart the kernel (or better mathematica) and then do
<< JLink`
InstallJava[]
JLink`LoadJavaClass["java.io.File", StaticsVisible -> True]
file = File`createTempFile["image", "png"]
file@deleteOnExit[]
The last block should take only a fraction of a second.
 

  last day (25 days later) »