18

Bug fixed in 10.1.0 via paclet update


Since a few days now, each time I open a new Mathematica session I get the small red error popup window with the error messages:

Throw::nocatch: Uncaught Throw[False] returned to top level.

repeated many times, as you can see from this screenshot:

enter image description here

Apart from the error window, Mathematica seems to work without problems. I didn't do anything "strange" with Mathematica recently, no new installation or update or anything of the sort.

What does this error mean, and what are the possible causes and fixes?

glS
  • 7,623
  • 1
  • 21
  • 61
  • I have the very same `problem' since today! I just tried plying with the cloud since 2-3 days ago... could that be somehow related? –  Jun 03 '15 at 12:37
  • I actually never did anything related to the cloud.. To my knowledge at least – glS Jun 03 '15 at 15:05

2 Answers2

13

Eventually, I was able to reproduce this problem. The way to fix it is to delete the MLCleaner-1.0 directory in $UserBaseDirectory/Paclets/Repository, then restart Mathematica and run RebuildPacletData[].

The underlying reason is the same as in 84539, though it was triggered by the use of a different top-level function depending on Throw/Catch during kernel startup.

ilian
  • 25,474
  • 4
  • 117
  • 186
  • This did the trick, thank you very much! Only one thing: the folder MLCleaner wasn't rebuilt with that command, is this a problem? What is it for? – glS Jun 04 '15 at 06:32
  • 1
    @glance Glad it worked! MLCleaner is a small, one time use utility paclet. Its only purpose is to uninstall a broken Machine Learning paclet update that was causing problems for some users. This instance of Throw messages will be automatically fixed by a MLCleaner update which I understand is undergoing final checks before being uploaded to the paclet servers. – ilian Jun 04 '15 at 14:19
  • Thanks! I had the same problem and this solution worked for me. – Vladimir Reshetnikov Jun 04 '15 at 16:43
  • Likewise - just happened to me on Ubuntu – dr.blochwave Jun 08 '15 at 14:45
  • I suffer this,but I cannot find MLCleaner in that folder.This is all items I have. – yode Apr 17 '17 at 20:17
  • @yode I doubt you are having the same problem. The symptoms may look similar but is likely caused by a different piece of code. – ilian Apr 17 '17 at 21:49
  • I cannot think up what invalid operation I have made – yode Apr 17 '17 at 21:50
  • @yode it is likely to be more useful for you to open another question for the problem you are experiencing, and see there if it is indeed caused by the same issue as this one – glS Apr 18 '17 at 15:46
  • @glS The bug is disappear now,and it is be more annoying,I mean the kernel of Mathematica become more easy to crash.Sad day.. – yode Apr 18 '17 at 16:16
  • @ilian This happened to me and I isolated it to the subfolder StructuredArrayPatch-1.0 -- can you tell me what that is/was? – Mr.Wizard Oct 11 '19 at 07:41
  • 1
    @Mr.Wizard I believe this is intended for backward compatibility when the next version introduces a change in the internal structure of e.g. QuantityArrays. Since the new format can appear in downloaded data (which can be shared between several versions of Mathematica) the patch allows older versions to convert it to the format they understand. Which version was this and did you have anything in your init.m file? As a workaround, I would edit the PacletInfo.m so the patch code does not run on startup, but it could still be loaded manually if needed. – ilian Oct 12 '19 at 07:17
  • @ilian Thank you. I am using version 10.1.0. The Throw message still appeared when using -noinit so I don't think it's a conflict with my init.m file? – Mr.Wizard Oct 12 '19 at 19:22
  • 1
    @Mr.Wizard No, I see where the problem is. There was a change in how the Paclet Manager processes the comma-separated version list in PacletInfo.m, but that fix only went in version 10.2. Version 10.1 will still give the messages, which are the undesirable result of a StringTrim call during kernel startup (so e.g. someone who used StringTrim in init.m would get similar errors). This should have been tested better before releasing a paclet update that would retroactively affect 10.1. I have let the appropriate people know about this bug. – ilian Oct 12 '19 at 20:02
  • @ilian I'm still being bugged by this; could you nudge someone to fix this soon? – Mr.Wizard Dec 16 '19 at 11:02
  • 1
    @Mr.Wizard I was hoping it was already fixed. We had to release a set of individual StructuredArrayPatch paclets for each version. The update should happen automatically in due course, but just in case, please try PacletSiteUpdate /@ PacletSites[]; PacletUpdate["StructuredArrayPatch"] – ilian Dec 16 '19 at 20:46
  • @ilian Thank you! That appears to have downloaded the update StructuredArrayPatch-1.0.2.1 but I had to manually delete the old folder StructuredArrayPatch-1.0 before the error went away. – Mr.Wizard Dec 17 '19 at 14:18
3

I had exactly this same problem two days ago. I tried numerous fixes, but I finally had to uninstall Mathematica and all of its library files, and then I did a clear install of Mathematica. This fixed the problem, except it initially seemed to have broken my CUDA.

After the clean install I couldn't get Mathematica to automatically sign me into the Wolfram cloud, but that problem was fixed by executing CloudConnect[] in new Mathematica session.

My broken CUDA was fixed by manually downloading the Mathematica 10 CUDA resources file from the Wolfram server and then executing:

Needs["CUDALink`"]

CUDAResourcesInstall["path-to-download", Update->True]

toadatrix
  • 456
  • 3
  • 4