# Raster with ColorFunction is blank when Dynamic Updating is disabled

UPDATE

Today I was having these WaveletScalogram problems again. I think this is ultimately some kind of interaction issue with Dynamic. I have narrowed it down to this:

Graphics[Raster[{{0}}, ColorFunction -> "AvocadoColors"]]


Run this line, and then disable Dynamic Updating ("Evaluation" menu) and run it again. On my computer it comes out blank when Dynamic Updating is disabled. If you remove the ColorFunction option, it will work fine with or without Dynamic Updating. So new question: Why does this happen? Is it a bug? I wonder if others can even reproduce this.

Previous version of this question:

I was trying to export WaveletScalogram plots (to image formats) in parallel, and some of the images were coming out blank. I've managed to reduce the issue to what appears to be quirky Rasterize behavior on WaveletScalogram plots specifically, in parallel computations. I'm on version 8.0.4.0 on Win7 64. With the following:

ParallelTable[
Rasterize@
WaveletScalogram[ContinuousWaveletTransform[RandomReal[{0, 1}, 2000]]],
{f, 4}]


I get:

Change ParallelTable to Table, or remove the Rasterize, and I get:

I'm just wondering if this is actually a bug or I'm just missing something.

update

I was able to get it to work by hard-limiting the number of kernels to the number of cores on my system (a monstrous 2 cores). The "Parallel Kernel config" is a little confusing in this regard, since I have to set it to "1 parallel kernel" to get 2 parallel kernels controlled by a 3rd master kernel O_O Still this Rasterize behavior is uncalled for, I think.

-
Rasterization is done by the front end, not the kernel. I'm not sure what happens when you run parallel calculations: does it connect to the front end you see, or does each parallel kernel launch its own invisible front end in the background? (Possibly the latter). Just something good to know. –  Szabolcs Apr 30 '13 at 18:55
It seems on OS X each subkernel is launching its own front end to do the rasterization. It does sound like a bug though, but I can't reproduce it on OS X. –  Szabolcs Apr 30 '13 at 18:59
it looks like the various Method options ("CoarsestGrained", "EvaluationsPerKernel", etc) have an affect on which plots turn out blank, but they still turn out blank. –  amr Apr 30 '13 at 19:35
Well, I can't reproduce this on version 8.0.4 or 9.0.1, also on 64-bit Windows. I have a quad-core CPU, so I tried both 4 and 8 plots, but they all came out okay. I suppose conceivably it could be a graphics driver issue. –  Oleksandr R. May 1 '13 at 3:10
Dear @amr, may I ask you describe a bit more specifically, how did you find a workaround for your problem? In particular, what exactly have you changed in parallel kernel configuration? And yet, in effect, have you reduced the number of kernels running? Thanks! –  Alexey Bobrick Sep 20 '13 at 13:36