Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

25

I can reproduce this on OS X in M10.0.2 and M9.0.1, so it looks like a bug. Please report it to Wolfram support. Table will automatically try to compile its argument above a table length threshold. This threshold is 250 by default and can be set to a different value using SetSystemOptions["CompileOptions" -> "TableCompileLength" -> ...]. It seems ...


16

The kernel crashes due to stack overflow. It is not safe to recurse too deeply. Increasing $RecursionLimit to values that are too great (and actually recursing that deep) risks a crash. (So yes, in a way it's due to insufficient memory, but it has nothing to do with memoization. It is due to insufficient stack space.) From the documentation: On most ...


14

The only solution I have found is to delete the contents of the directory given by: FileNameJoin[{$UserBaseDirectory, "Paclets"}] More specifically it appears to be sufficient to delete a single file: FileNameJoin[{$UserBaseDirectory, "Paclets", "Configuration", "pacletSiteData_10.pmd2"}] To prevent Mathematica freezing on the next start-up I need to ...


12

Version: Mathematica Version 9.0.1.0, Microsoft Windows 64-bit OS: Windows 7 My mathematica crashed the same way. But only when it was not connected to the internet. I changed my default printer , and it fixed the problem. Follow these steps: Start menu>>Devices and printers There will be one/many printers listed there. The one with a green check mark on ...


12

This is quite good: f[d_, n_] := With[{x = Pick[d, Thread[Accumulate[d] - n < 0]]}, Scan[f[x, n - Total[#]] &, Subsets[Complement[d, x], {1, Infinity}]]] f[_, 0] := Throw @ True; weird[n_] := (DivisorSigma[1, n] > 2 n) && ! TrueQ @ Catch @ f[Most @ Divisors[n], n] Select[Range[10000], weird] // AbsoluteTiming (* {1.450002, {70, 836, ...


12

For an example, Internal`RadicalMemberQ[x y, {x^2 y, x y^3}] (* True *) which means that $x y$ belongs to the radical of the polynomial ideal generated by $x^2 y$ and $x y^3$. The method used to obtain the result is effectively Property 3 in the Gröbner Bases documentation, see http://reference.wolfram.com/language/tutorial/ComplexPolynomialSystems.html. ...


11

The crash may be avoided by turning off the Suggestions Bar. The reason is that one of the computations attempted by the predictive interface in the background, namely Solve[(0.000092742725 - 0.000015933052*I)* E^((0. + 3.1934271000000003*^-10*I)*t) - (0.0000981431 + 0.0001437239*I)* E^((0. + 1.4229429000000001*^-9*I)*t) + (0.0057300369 - ...


9

This is clearly a bug in part extraction for TemporalData. You can work around it by giving your times explicitly. subset = td["Part", 1, {Cases[td["PathTimes"], x_ /; 10 <= x <= 50]}] I have a feeling this is more in the spirit of what you want here anyway. The "Part" property resamples the data so that it is uniformly spaced if you give {tmin, ...


9

This is a bug in Mathematica 10.0.0 and will be addressed in the first 10.0.x bug fix release (Mathematica 10.0.1). Thank you for reporting it and our apologies for any work lost because of this issue.


9

This crash has been fixed in version 10.2. In[1]:= if = NDSolveValue[{D[u[t, x, y, z], t] == 0, u[0, x, y, z] == 0}, u, {x, y, z} \[Element] Ball[], {t, 0, 1}, Method -> "FiniteElement"]; In[2]:= Export["if.wdx", if]; ...


9

This MathGroup discussion should answer your question, so I'll cite it here: On Tue, 29 May 2012 05:47:52 -0400 (EDT), JCW wrote: Please forgive my dragging up ancient history: I have been using Mathematica from version 2.2 through 7.0. I remember at least one (maybe two?) format conversions that were necessary to update old ...


9

The issue is reproducible on my 64bit Windows 7 machine. Actually, my PlotExplorer function also suffers from it, causing a crash. Here is the solution that worked for me. There are two versions of gobject-2-vs12.dll in your Mathematica installation (at least there is no other copy on my Windows machine): 64bit version, 347 KB, at: $InstallationDirectory\...


9

A bit too long for a comment. I think the hang is happening within Integrate: Block[{Integrate}, DSolve[y'[x] == Cos[2 x] + (Sin[2 x] + y[x]) y[x], y[x], x] /. { Integrate -> Inactive[Integrate]} ] Edit Here's the solution using withTimedIntegrate (as Micheal E2 pointed out in the comments): withTimedIntegrate[DSolve[y'[x] == Cos[2 x] + (Sin[2 x]...


8

The Mathematica Knowledge Base has an article on this issue. It´s caused by an error with open source graphics drivers. The mesa solution works by bypassing your graphics card and so will make things run a bit more slowly.


8

Building on Szabolcs' hint, This issue is caused by a problematic graphics driver. The reason the mathematica -mesa resolves this is that it bypasses the opengl code which causes the crash. The error is most common with an Intel945 graphics card. You can try reverting to an older version of the driver which doesn't have the issue. Hopefully ...


8

You can use the undocumented Method option "DelaunayDomainScaling" to deal with the problem. I don't know any details but I assume it works by rescaling the data inside the triangulation algorithm: ListContourPlot[temp, Method -> {"DelaunayDomainScaling" -> True}, PlotRange -> All]


8

Glad to note this is fixed in 10.0.1.


8

(* Input: Range of even numbers --- Output: Primitive weird numbers *) Block[{$RecursionLimit=Infinity}, subOfSum[ss_, kk_, rr_]:= Module[{s=ss, k=kk, r=rr}, If[ s+w[[k]] >=mm && s +w[[k]] <=m, t=False; Goto[ done](*Found*), If[s +w[[k]]+w[[k +1]] <=m, subOfSum[s +w[[k]], k+1, r-w[[k]]]]; If[s+r -w[[k]] &...


8

Specifying the DistanceFunction seems to fix it. Nearest[v, 39.28, {All, 8.57}, DistanceFunction -> (Norm[#1 - #2] &)] {39.28, 33.81, 33.56, 32.47, 31.12, 30.72} Note that the radius had to be changed also because Nearest will return points whose distance are strictly less than the radius.


8

This is a incompatible pointer problem. Just change int const *dims to mint const *dims (a total of 2 places), and the function will give correct results. My attempt to explain the difference: (Since I don't use C, I may make mistakes. Feel free to edit, or if there are any serious mistakes, I will remove this paragraph) mint refers to long in my system (...


8

As part of its algorithm, RandomPoint attempts to determine the region dimension by calling RegionDimension[region1] In version 10.4, the above gives up quickly without returning a result, and RandomPoint proceeds by using a heuristic estimate. But in version 11.0, RegionDimension tries harder to compute the dimension, which is a rather costly symbolic ...


7

An observation, rather than an answer to the why question. The question suggests, that the problem might have something to do with the used lapack library. As it turns out, at least on my machine it doesn't. We can replace the C-code with the most simple routine which is taking an input tensor and returning exactly the same tensor as result. MTensor ta = ...


7

I saw this problem recently on the Wolfram Community website and answered it there. I'll copy my answer here (http://community.wolfram.com/groups/-/m/t/603973) I'm not sure if there's a simple way to prevent the issue. I would do this by basically reconstructing the ListVectorPlot Function from VectorPlot. To make it easy, I'll just make an Interpolation of ...


7

I had the same issue and it drove me crazy for a long time. Do you have any joysticks plugged in? Specifically, if you have a Logitech 'Extreme 3D Pro' joystick plugged in, it will cause Mathematica to crash upon interaction with any Graphics3D object.


7

The "possible issues" section of the documentation for Polygon says that Degenerate polygons are not valid geometric regions A degenerate polygon is a polygon that has two or more vertices which are the same. The polygons that crash the kernel seem to be of this type. You can avoid the kernel crashes by not evaluating Area on such polygons, for example ...


6

The main part of this question has been answered at How to abort on any message generated? However, in my mind there remains a very live issue: why should the front end ever crash at all? Its primary job is as a user interface. As such, there is no excuse for it to crash, ever. By contrast, when I use a terminal program to connect with, say, a Linux ...


6

Start Mathematica with the command mathematica -mesa It will be a bit slow, but it probably won't crash. This works for me. About the rest of the incompatibilities with newer versions of Ubuntu, I have no idea what to do.


6

Not an answer but I just wanted to observe that the $RecursionLimit info box (whatever that is called) has a formatting error on my Mac: Update halirutan: When I set $RecursionLimit to say 30, then hover the symbol and click on the information $i$, I sometimes get more than only wrong formatting:


Only top voted, non community-wiki answers of a minimum length are eligible