12

starting with the new Mathematica 11.0.0 version on a Windows 7 machine I ran into a problem I am not able to solve.

While using the Plot functionality I am able to draw plots with or without a PlotLabel:

Plot[Sin[x], {x, 0, 1}, PlotLabel -> "Test"]

Nevertheless I am not able to integrate this Plot within a GraphicsGrid without causing Mathematica to crash with the below Windows error message:

(Warning, this might crash your kernel! Save your work before evaluating.)

GraphicsGrid[{{Plot[Sin[x], {x, 0, 1}, PlotLabel -> "Test"]}}]

The program can't start because gobject-2-vs12.dll is missing from your computer. Try reinstalling the program to fix this problem.

As I mentioned, I run Mathematica 11.0.0 on a Windows 7 machine with Intel i7 Processor. The behavior sticks to the combination of the two functions including the PlotLabel-option and is reproducible. How can I obtain the corresponding library?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Tschibi
  • 877
  • 4
  • 13
  • Please do not use the [tag:bugs] tag when posting a new question. It is a special tag which (by agreement) is always added by someone else than the original poster. – Szabolcs Sep 19 '16 at 10:48
  • I cannot reproduce the problem on OS X with M10.0.0. – Szabolcs Sep 19 '16 at 10:49
  • Thank you for you fast answer. I won't use like this in the future. – Tschibi Sep 19 '16 at 10:56
  • I can't reproduce the problem using Mathematica 11.0.0 under Windows 10. – Karsten7 Sep 19 '16 at 12:05
  • Did you search-engine gobject-2-vs12.dll is missing? – Karsten7 Sep 19 '16 at 13:19
  • 2
    Yes I did, but unfortunately I could not find any Mathematica correlated answers. – Tschibi Sep 19 '16 at 13:33
  • Your problem seems to be specific to your Mathematica installation and not to Mathematica in general. – Karsten7 Sep 19 '16 at 14:53
  • No problem on OS X with MMA 11.0.0.0 – N.J.Evans Sep 19 '16 at 14:57
  • 1
    Or possibly a bad combination with the software of our company. I was able to reproduce the error on our second computer with the same Mathematica version. Unfortunately I can't simply reinstall without the system administrator. Anyway thank you for your support. I let you know if reinstalling will fix the problem. – Tschibi Sep 19 '16 at 15:33
  • I have two versions of this DLL in my installation: at Program Files\Wolfram Research\Mathematica\11.0\SystemFiles\Libraries\Windows-x86-64 and in the Program Files\Wolfram Research\Mathematica\11.0\SystemFiles\Libraries\Windows directory. Ask Wolfram support for these files and place them there. – Sjoerd C. de Vries Sep 19 '16 at 20:07
  • Maybe there's a rogue DLL in places like \windows\system32 that Mma picks up ... ? You could try dependency walker to verify this. But it's a long shot. – Szabolcs Sep 21 '16 at 04:35
  • 1
    I can reproduce the problem. This happens for me on both 11.0.0 and 11.0.1, Windows 8.1 64 bits. (Note: the file mentioned is however not missing despite the message.) –  Oct 01 '16 at 13:00
  • Interesting. Meanwhile I got in contact with Wolfram Support. They give me advice to delete my BaseDirectory and my UserBaseDirectory (which resets all settings) I did this, but the problem still remains ... Maybe it helps you. I also noticed, that the corresponding file ist there but Mathematica does not recognize it. Do you have a custom Path for the installation directory? I have the idea that this could be one of the reasons, it occurs. Im still waiting for another answer from Wolfram support. Meanwhile I use the workaround and try to gather as much information as possible ... – Tschibi Oct 02 '16 at 16:51
  • @Tschibi Only seing your comment now. Yes, I used a custom path for the installation directory. –  Oct 19 '16 at 16:31
  • @SjoerdC Thanks for pointing out the two versions, I've managed to find a solution based on them, see below. – István Zachar Oct 26 '16 at 08:25
  • I cannot reproduce the problem using Mathematica 11.0.1 (Win 10 - 64 Bit). – gwr Oct 26 '16 at 09:52
  • I still have this problem after reinstall. Any ideas out there? I can't print to PDF as this error message pops up and Mma crashes. – Edmund Dec 13 '16 at 20:30
  • I have also the same problem on Windows 10. Mathematica 11 crashes at each time when I try to save a PDF of a graphic. Then, I returned to Mathematica 9 to avoid this problem, unfortunately. – optimal control Oct 31 '17 at 10:30
  • I sometimes have the same issue with my current installation of Mathematica 11.2 and previous one 11.0.2. Windows 7 Restarting my pc usually solved the problem. – user3615884 Oct 31 '17 at 10:02

3 Answers3

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\SystemFiles\Libraries\Windows-x86-64\

32bit version, 299 KB, at: $InstallationDirectory\SystemFiles\Libraries\Windows\

Simply overwriting the 32it version with the 64 bit (i.e. copy the larger file over the smaller) does not work.

Interestingly, after some experimentation, Mathematica were able to run the above problematic code correctly. However, in a new session, the same error message and crash happens. I have no idea how the code evaluated correctly, but my understanding is that some other Mathematica function I called were able to find and load the dll-s, so the libraries were already in memory when I evaluated the GraphicsGrid code, which then did not have to find the dll-s itself. Whichever this function was, no further experimentation unveiled.

As Tschibi correctly states, Mathematica "can not find the 64bit libraries within the whole folder of the gobject-2-vs12.dll" and you have to copy this file (and some others) to C:\Windows\System32\. This is supported by the fact that FindLibrary["gobject-2-vs12.dll"] returns False. Adding any of the folders to $LibraryPath does not work either (though at least FindLibrary and LoadLibrary will find the dll). For me, at least the following files had to be copied to the Windows folder:

"gobject-2-vs12.dll"
"glib-2-vs12.dll"
"intl.dll"
"iconv.dll"
István Zachar
  • 47,032
  • 20
  • 143
  • 291
  • @Szabolcs and others on MaxOSX: do you have a single, 64bit version only? – István Zachar Oct 26 '16 at 08:10
  • @Zachar: I tried your solution, but in my case it did not work. After overwriting I got the same error message as before. – Tschibi Oct 27 '16 at 05:43
  • Could some of you provide me with you $Path variables? Maybe in my case I have an unfortunate combination of two problems ... – Tschibi Oct 27 '16 at 06:05
  • @Tschibi Which version of the file do you have? Both? Are the sizes the same as in my case? – István Zachar Oct 27 '16 at 16:52
  • @Zachar: The Filesizes are 347kB (Version 2.46.2.0) and 299kB (Version 2.46.2.0) – Tschibi Oct 28 '16 at 07:54
  • 2
    @All From all I can see, the problem is due to the fact, that mathematica can not find the 64bit libraries within the whole folder of the gobject-2-vs12.dll. After I copied this Files to C:\Windows\System32\ the problem disappeared. I aware, that this kind of solution is somehow ugly, but it is showing us the reason of the problem. – Tschibi Nov 07 '16 at 10:29
  • @Tschibi If that works for you, you should provide it in your (or mine) answer! – István Zachar Nov 07 '16 at 13:37
  • It works, but to my mind, copying this library files to another folder, is far from being an elegant solution. I thought maybe, we could find a better way of solving this problem. Anyway if you recommend me posting this as a solution, I will do. – Tschibi Nov 09 '16 at 07:02
  • Copying the files in System32 works also for me. That's great, thanks. –  Nov 10 '16 at 23:50
2

I found a workaround to make my existing code work. But I have still no idea where the problem derives from, or how to solve it.

For those who run into a similar problem you can bypass it by using

GraphicsGrid[{{Image[Plot[Sin[x], {x, 0, 1}, PlotLabel -> "Test"]]}}]

But anyway I am open for a better solution.

Best Regards Tschibi2000

Tschibi
  • 877
  • 4
  • 13
0

Why not try reinstalling Mathematica as the error message you received suggested? Doing so should provide the missing library. As for others who have commented, your code runs fine on my Win7 system.

Pirx
  • 4,139
  • 12
  • 37
  • I will try in the next days. Without the administrator from our company I am not allowed to do this changes ... – Tschibi Sep 19 '16 at 15:53