12
$\begingroup$

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?

$\endgroup$
19
  • $\begingroup$ Please do not use the 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. $\endgroup$
    – Szabolcs
    Commented Sep 19, 2016 at 10:48
  • $\begingroup$ I cannot reproduce the problem on OS X with M10.0.0. $\endgroup$
    – Szabolcs
    Commented Sep 19, 2016 at 10:49
  • 2
    $\begingroup$ Yes I did, but unfortunately I could not find any Mathematica correlated answers. $\endgroup$
    – Tschibi
    Commented Sep 19, 2016 at 13:33
  • 1
    $\begingroup$ 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. $\endgroup$
    – Tschibi
    Commented Sep 19, 2016 at 15:33
  • 1
    $\begingroup$ 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.) $\endgroup$
    – user31159
    Commented Oct 1, 2016 at 13:00

3 Answers 3

9
$\begingroup$

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"
$\endgroup$
9
  • $\begingroup$ @Szabolcs and others on MaxOSX: do you have a single, 64bit version only? $\endgroup$ Commented Oct 26, 2016 at 8:10
  • $\begingroup$ @Zachar: I tried your solution, but in my case it did not work. After overwriting I got the same error message as before. $\endgroup$
    – Tschibi
    Commented Oct 27, 2016 at 5:43
  • $\begingroup$ Could some of you provide me with you $Path variables? Maybe in my case I have an unfortunate combination of two problems ... $\endgroup$
    – Tschibi
    Commented Oct 27, 2016 at 6:05
  • $\begingroup$ @Tschibi Which version of the file do you have? Both? Are the sizes the same as in my case? $\endgroup$ Commented Oct 27, 2016 at 16:52
  • 2
    $\begingroup$ @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. $\endgroup$
    – Tschibi
    Commented Nov 7, 2016 at 10:29
2
$\begingroup$

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

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ I will try in the next days. Without the administrator from our company I am not allowed to do this changes ... $\endgroup$
    – Tschibi
    Commented Sep 19, 2016 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.