Skip to main content

dynamic - Documentation searches hang frequently: Anyone else dealing with this?


I've been struggling with a number of hangs, dynamic timeouts, and outright crashes when using the search/documentation center in version 9. I've tried uninstalling/reinstalling and clearing preferences/cache on start-up, praying for a paclet update---but nothing seems to help.


One easily reproducible crash involves searching via the F1 key. On my machine (Windows 7, 64-bit), following the steps below, fails 100% of the time. (This is the simplest example I've taken the time to document; there seem to be many others.)



  1. With a fresh session (not always reproducible with just a fresh kernel), type something in the front-end. This could be text (in a text cell) or input (in an input cell) such as: something (and leave it unevaluated---if in an input cell)

  2. Now highlight that input and hit "F1" to perform a search. This will either return a dynamic timeout warning, or momentarily freeze the front-end and do nothing.

  3. Now use your cursor to select something again and try "F1" a second time. This will perform the search as desired.



Can anyone reproduce this issue?


UPDATE 1:


Upgrading to 9.0.1 only partially addresses the issue. To illustrate, start a fresh session/kernel, type something and then hit F1 (without manually highlighting something). A similar hangup will occur.


As Albert points out in his answer, this hangup does not seem to occur with F1 searches on built-in symbols, highlighted or not.


Finally, FWIW, I suspect Albert's observation relates to another way I've encountered errors. Quite often when I come across some unfamiliar mathematical terminology on stackexchange, I reflexively copy and paste the term---from my browser, to the search field of the documentation center (which is almost always open when I'm working). Frequently this will generate the same type of error or worse. I suspect it has to do with whether or not the search term is either a built-in symbol or already indexed somehow.


UPDATE 2:


I recently decided to wipe my machine and reinstall everything from the OS up. Eventually I got around to installing Mathematica (from the exact same installer used previously). Much to my surprise, even without applying either of the two fixes, the hangups seem to be gone (or at least below what I can perceive). Just wanted to document this. Will report back if anything changes.



Answer



While trying to debug this issue myself, I stumbled across Todd Gayley's name in the source of one of the documentation .m files and contacted him directly. Todd was super great to work with---and at the end of an hour of screensharing he provided an easy workaround.



The workaround essentially short-circuits one tiny feature of a normal documentation search. Specifically, this fix prevents the documentation code from looking up the number of times the search term appears on WRI's website. As such, you will also no longer see a count of these search hits showing up in the 'Search Results' window in your Mathematica session.


Instructions:


(* execute this to locate your user init.m file*)
SystemOpen[FileNameJoin[{$UserBaseDirectory,"Kernel"}]]

(* open the file init.m file, append the following two lines, save and close it *)
Needs["DocumentationSearch`"];
Clear[DocumentationSearch`Private`urlImport];

Now close Mathematica and restart it. No more documentation search stutters.



Comments from WRI:


This bug is caused by a delay that can occur when Mathematica's internet connectivity code looks up a proxy. The delay generally occurs only once per session, which explains why users will generally find that subsequent documentation searches proceed quickly. The delay can be longer than the default Dynamic timeout, and thus you either get a quiet failure or see the Dynamic timeout warning dialog displayed.


If you can get by with not using a proxy at all, as suggested by @Robinaut, then that is ideal. If you do need to use a proxy, then this answer is the best way to handle the problem. Turning off all internet access in Mathematica is a sledgehammer fix that should be avoided.


We are working on a fix that will eliminate the delay, but if this is not forthcoming we will simply take out the call to urlImport. Therefore, no future versions of Mathematica will suffer from this problem. Thanks to @telefunkenvf14 for helping us discover the precise cause of this problem.


Comments

Popular posts from this blog

plotting - Plot 4D data with color as 4th dimension

I have a list of 4D data (x position, y position, amplitude, wavelength). I want to plot x, y, and amplitude on a 3D plot and have the color of the points correspond to the wavelength. I have seen many examples using functions to define color but my wavelength cannot be expressed by an analytic function. Is there a simple way to do this? Answer Here a another possible way to visualize 4D data: data = Flatten[Table[{x, y, x^2 + y^2, Sin[x - y]}, {x, -Pi, Pi,Pi/10}, {y,-Pi,Pi, Pi/10}], 1]; You can use the function Point along with VertexColors . Now the points are places using the first three elements and the color is determined by the fourth. In this case I used Hue, but you can use whatever you prefer. Graphics3D[ Point[data[[All, 1 ;; 3]], VertexColors -> Hue /@ data[[All, 4]]], Axes -> True, BoxRatios -> {1, 1, 1/GoldenRatio}]

plotting - Filling between two spheres in SphericalPlot3D

Manipulate[ SphericalPlot3D[{1, 2 - n}, {θ, 0, Pi}, {ϕ, 0, 1.5 Pi}, Mesh -> None, PlotPoints -> 15, PlotRange -> {-2.2, 2.2}], {n, 0, 1}] I cant' seem to be able to make a filling between two spheres. I've already tried the obvious Filling -> {1 -> {2}} but Mathematica doesn't seem to like that option. Is there any easy way around this or ... Answer There is no built-in filling in SphericalPlot3D . One option is to use ParametricPlot3D to draw the surfaces between the two shells: Manipulate[ Show[SphericalPlot3D[{1, 2 - n}, {θ, 0, Pi}, {ϕ, 0, 1.5 Pi}, PlotPoints -> 15, PlotRange -> {-2.2, 2.2}], ParametricPlot3D[{ r {Sin[t] Cos[1.5 Pi], Sin[t] Sin[1.5 Pi], Cos[t]}, r {Sin[t] Cos[0 Pi], Sin[t] Sin[0 Pi], Cos[t]}}, {r, 1, 2 - n}, {t, 0, Pi}, PlotStyle -> Yellow, Mesh -> {2, 15}]], {n, 0, 1}]

plotting - Mathematica: 3D plot based on combined 2D graphs

I have several sigmoidal fits to 3 different datasets, with mean fit predictions plus the 95% confidence limits (not symmetrical around the mean) and the actual data. I would now like to show these different 2D plots projected in 3D as in but then using proper perspective. In the link here they give some solutions to combine the plots using isometric perspective, but I would like to use proper 3 point perspective. Any thoughts? Also any way to show the mean points per time point for each series plus or minus the standard error on the mean would be cool too, either using points+vertical bars, or using spheres plus tubes. Below are some test data and the fit function I am using. Note that I am working on a logit(proportion) scale and that the final vertical scale is Log10(percentage). (* some test data *) data = Table[Null, {i, 4}]; data[[1]] = {{1, -5.8}, {2, -5.4}, {3, -0.8}, {4, -0.2}, {5, 4.6}, {1, -6.4}, {2, -5.6}, {3, -0.7}, {4, 0.04}, {5, 1.0}, {1, -6.8}, {2, -4.7}, {3, -1....