12

Update 2015 September 4: An incorrect paclet update was pushed recently that caused Mathematica to not hang on startup with "Initializing kernels". The problem and solution are described here: Mathematica 10.0.x freezes in Initializing kernels.


In version 10.1.0 under Windows 7 x64 I have a repeating problem. Every time I start the Mathematica Front End the Welcome to Wolfram Mathematica screen appears, then freezes and eventually is marked (Not Responding) by Windows.

(It does not matter whether Welcome screen or New document is selected as the show-on-startup action; the Front End freezes in either case immediately after that object is displayed.)

How can I fix this?

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • 2
    I confirm exactly the same problem in Mathematica 10.0.2 / Win7. The workaround with deleted pacletSiteData_10.pmd2 and disabling data updates did work. Thanks! P. –  Sep 03 '15 at 09:22
  • There was a very recent broken CloudObject paclet push that will cause 10.0.x installations to hang at "Initializing kernels...". I do not believe it is the same problem, because it is readily reproducible and based on the timing, though the workaround given by Mr.Wizard will obviously apply. – ilian Sep 03 '15 at 23:10
  • This seems to be getting many hits due to the bugged paclet update. Since you were not around, I took the liberty to edit in a link at the top. Please revert it if you think that's better, otherwise we can revert in a few days when the problem is gone. – Szabolcs Sep 04 '15 at 15:29
  • @PetrS You saved my day! I just encounter starting problem, I have re-start windows several times, re-install the mathematica, all failed! Just delete pacletSiteData_10.pmd2 works perfectly – matheorem Nov 23 '15 at 06:58
  • @matheorem Glad I could help. :-) – Mr.Wizard Nov 24 '15 at 13:45
  • Perhaps not the right place to say it but I still experienced freezes on many new versions of Mathematica. I managed to get rid of them by renaming the user directories (see https://support.wolfram.com/12464#:~:text=Press%20Command%20%2B%20Shift%20%2B%20G%20to,Mathematica%20to%20its%20default%20configuration). I was first hesitant to do this since I actually liked my modifications. However, I could place them all back without the problems reoccurring. I think the issue is usually in files that MMA generates automatically (see e.g. also https://mathematica.stackexchange.com/a/121053/45020). – Kvothe Jan 20 '23 at 16:03

3 Answers3

15

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 turn off Automatically check for data updates in the Internet Connectivity tab of the Preferences menu.

I presume that some automatic data update is incompatible with my version; hopefully it will be identified and fixed.

I am posting this for anyone else who might have this problem and is in need of a quick solution.

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • This is very alarming! We did just recently push a 10.1.0-exclusive Dataset paclet, which will be auto-installed (it contains a relatively minor fix). However, this should certainly not cause a freeze on startup! – Stefan R Aug 06 '15 at 19:22
  • @StefanR I take it you will be looking into this, and thank you in advance. :-) – Mr.Wizard Aug 06 '15 at 19:23
  • Do you by any chance know the contents of the Paclets directory? Is there any specific paclet that's causing problems? – Stefan R Aug 06 '15 at 19:30
  • @StefanR Sorry, I do not. I deleted everything in there. I could re-enable "Automatically check for data updates" and let the Front End freeze, and watch to see if anything appears in /Paclets if you think that would be useful. – Mr.Wizard Aug 06 '15 at 19:38
  • I think that would be very helpful, thanks! – Stefan R Aug 06 '15 at 19:41
  • @StefanR Sorry it took so long but I finally did that; the only change was the appearance of the file Dataset-1.1.15860273.paclet in /Temporary. However deleting this file did not let the Front End start without freezing, but clearing Paclets entirely did, so I'm not sure it's the problem. – Mr.Wizard Aug 07 '15 at 01:06
  • Does FE freeze even if you disable the WelcomeScreen? – Stefan R Aug 07 '15 at 18:56
  • @Stefan It freezes on both cases, whether I select show welcome screen or show new document on start-up. – Mr.Wizard Aug 08 '15 at 06:45
  • @Stefan I seem to have isolated the problem to a single file; see update above. – Mr.Wizard Aug 08 '15 at 06:53
  • Thanks! I've forwarded this information to our PacletManager developer. – Stefan R Aug 10 '15 at 15:12
  • @Mr.Wizard Perhaps you could upload a copy of this file somewhere? I assume your system is able to connect to http://pacletserver.wolfram.com just fine -- do you run a firewall or antivirus program and does the problem still occur if it's disabled temporarily? Something I would recommend is trying Process Explorer which may reveal some clues as to what exactly is happening during the hang. – ilian Aug 11 '15 at 16:19
  • @ilian I do use firewall and antivirus but I have not had other connecting problems that I know of. Mathematica.exe and WolframKernel.exe are permitted; are there other executables that need to connect? – Mr.Wizard Aug 12 '15 at 01:58
  • @Mr.Wizard I think not, any paclet update activity takes place solely in the kernel. But it's a simple experiment that may be worth trying -- sometimes these security programs can get overzealous and interfere with network traffic or file access. I've tried (but haven't been able) to reproduce this issue on a number of Windows machines. If you could think of anything specific to your setup, such as maybe using a VPN or a proxy server, that would be helpful information. – ilian Aug 12 '15 at 16:39
  • @Mr.Wizard Is this something WR will probably push a fix to soon? I am hesitant to try to fix this problem myself based on these instructions I don't fully understand, so if a fix is coming anyway should I just be patient? – Jerry Guern Sep 05 '15 at 10:50
  • @Jerry Have you already tried this solution? If you are experiencing that particular issue a fix has apparently already been released. However if you are experiencing something else, as I apparently am, you may need to use the more general, brute-force fix described in my answer above. I have been too lazy to follow up on this with ilian as my installation is otherwise fine. – Mr.Wizard Sep 05 '15 at 18:39
  • @Mr.Wizard It's still hanging up at "Initializing Kernels". And I don't understand the instructions in your fix. What is FileNameJoin? What program do I give that instruction to and how? Windows Explorer can't find any directory called Paclets or and file called pacletSiteData_10.pmd2. So I have no idea what to do. – Jerry Guern Sep 05 '15 at 21:04
  • @Mr.Wizard nevermind, this other solution worked: http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels – Jerry Guern Sep 05 '15 at 21:15
0

In case it helps someone: I just had this freezing problem on both MMA 11.0.1 and 10.3 using Ubuntu 16.04.

The problem was actually not caused by MMA but by wrong permissions on my home folder and, possibly, ~/.dmrc. Once this corrected and after a reboot, everything was back to normal.

anderstood
  • 14,301
  • 2
  • 29
  • 80
0

The problem has been solved with firewall of Windows. All executable files Mathematica need to add an exception of firewall

mez0n
  • 9
  • 1
  • I believe I have my firewall configured correctly and I still have this problem unless I leave Automatically check for data updates disabled. Would you include the specific exception you are using for the Windows Firewall? – Mr.Wizard Sep 03 '15 at 21:27
  • First you need to delete this !damn! file pacletSiteData_10.pmd2.

    Then, before runnign Mathematica, add all the executable files in the Windows Firewall exceptions. I have not tried which exactly file donwloading again pacletSiteData_10.pmd2, so added all files: math.exe , Mathematica.exe, MathKernel.exe and so on. Hope this help you)

    – mez0n Sep 04 '15 at 04:24
  • Ah, I see, you're blocking Mathematica rather than allowing it. That apparently works like disabling Automatically check for data updates which is my solution. I believe ilian was suggesting that not properly allowing connectivity might be the source of the problem, which is why I was initially confused by this answer. Thanks for reporting this. – Mr.Wizard Sep 04 '15 at 04:36
  • Hm, disabling all updates in Mathematica works too, but file pacletSiteData_10.pmd2 downloading again.It's confusing.... – mez0n Sep 04 '15 at 04:55