I'd like to ask if someone had such a problem before. I have version 8.01, on windows 7, 64 bit. SP1.
I have been trying to find why I get Mathematica kernel crash when I added a Tooltip[] command to some code I am writing.
The notebook has the Wolfram Demonstration Style sheet (the Example style sheet which one uses to make demonstrations from). It is a Manipulate, all in one cell.
When I copy the code into a new notebook with default style sheet, the crash goes away! I can't reproduce the crash in the new notebook.
No code change at all. Just copied the whole cell and pasted it in a new notebook. Only difference is one has the Demonstration style sheet, and one is the default style sheet. When I change the stype sheet of the new notebook to Demostration, I notice the Tooltip does not work as well as before. When I use the Example notebook in this style, the minute I start moving the mouse with the toolstip, Kernel crashes.
To make sure, I did this few times. Same result. Once I add the Tooltip[], kernel crash right away only when the style sheet is demonstration.
My question: Has anyone seen such a behavior? I can make the two notebooks available if that is ok.
The crash I get is:
Problem signature:
Problem Event Name: BEX64
Application Name: Mathematica.exe
Application Version: 8.0.31.32201
Application Timestamp: 4d65e0e8
Fault Module Name: StackHash_2766
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 0000000000000001
Exception Code: c0000005
Exception Data: 0000000000000008
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 2766
Additional Information 2: 2766660d255034f6e73a8cd527b6f51e
Additional Information 3: 8ab7
Additional Information 4: 8ab74987ae95fade363a8e7256e3890f
I did send a bug report to WRI.
My question is: Has anyone had such a problem where a Style sheet change can make the code behave differently? Why would style sheet change cause such a problem?
Update 1:
I was able to make small example that shows part of the problem. I am working on making another small example that shows the crash itself. But this example below shows the problem, which is that Tooltip do not work the same when the style sheet is demonstration. First, here is a screen shot, side by side, same code, the left is in default style sheet, and the right is in Demonstration style
(below the image, I paste the source code, with steps how to reproduce the problem)
Manipulate[
EventHandler[Dynamic[Graphics[
{
Circle[{0,0},1],
Dynamic@Tooltip[Text[Style["O",Red,16] ,pt],Style[pt]]
},
ImageSize->250, PlotRange->{{-1,1},{-1,1}}
],ContinuousAction->True],
"MouseDragged":>
( pt=MousePosition["Graphics"] )
],
{{pt,{0,0}},ControlType->None},
TrackedSymbols:> {None},
ContinuousAction->True
]
steps:
- Paste the above code in new style sheet, style default. Drag the point, you should see the coordinates display all the time, as you drag the point with the mouse.
- File->New->Demonstration, and paste the same code in the Manipulate cell there replacing small template already there.
- Now do the same, drag the point. You will see that the tooltip DO NOT display as the mouse is dragged. it only displays when holding the mouse steady over the point.
there is different behavior in dynamics that seems to cause this, or something else in this style.
I tried different style sheets, and the tooltip works ok there. only with Demonstration style sheet I get this problem with the tooltip.
If someone has a solution to this, it will be great. As I'd like to use tooltip in a demo.
I'll try to make an example that causes the crash also.
Update:
I've got back respsonce from WRI technical support. It is a Style sheet issue. Meanwhile, as a work around this is the suggestion From tech support:
I was able to reproduce the kernel crash. It looks like a demonstration
stylesheet issue related to imagesize fit.
At the top of the demonstration notebook there is tab called 'Tools',
clicking on it gives you an option called 'Resize Notebook to Fit'. On
resizing the notebook and saving it the kernel crash does not happen.
Thanks to WRI tech support.
update dec 2 2011 Based on John Fultz answer below, I am closing this question now. Thanks John.
Global`
) which could have an effect, especially if your code relies on a function that isn't defined in the demonstration notebook. – ResorBaseStyle -> {TooltipBoxOptions -> {TooltipDelay -> 0}}
to yourManipulate
to fix the issue. – Courson