Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 - Mitsuba 3.6.0 installed via pip silently crashes, Mitsuba 3.5.2 works #1456

Open
tomasiser opened this issue Jan 13, 2025 · 5 comments

Comments

@tomasiser
Copy link
Member

Summary

Under Windows 11, running pip install mitsuba==3.6.0 installs both mitsuba and drjit, however, running the mitsuba command or running a Python script with import mitsuba simply crashes with no error messages.

In comparison, pip install mitsuba==3.5.2 works fine.

My investigation (see below) leads me to believe that it cannot find drjit-core.dll and drjit-extra.dll because it is looking in the wrong places to find it.

System configuration

OS: Windows 11
Python version: 3.12.5

Description

Running the Process Monitor on the mitsuba.exe process simply shows that it is trying to look for drjit-core.dll and drjit-extra.dll everywhere except in the directory it actually is:
image

The correct paths in this case would be:

c:\Users\Tomas\Research\cgglab\env\Lib\site-packages\drjit\drjit-core.dll
c:\Users\Tomas\Research\cgglab\env\Lib\site-packages\drjit\drjit-extra.dll

but Mitsuba never looks there.

Steps to reproduce

  1. Run pip install mitsuba==3.6.0
  2. Run mitsuba --help and observe the process crashes with no output
  3. Create a Python file containing import mitsuba and print("Hello world"), run it, and observe it crashes with no output
@njroussel
Copy link
Member

Hi @tomasiser

I tried this on a fresh windows setup and couldn't reproduce it. Both the mitsuba command line and the python import worked.

In Python, at the very least, you should be getting an import error if it failed to load a DLL, so I'm guessing something else is happening.

The fact that mitsuba.exe cannot find the Dr.JIT DLLs is expected. When running the command line, the PATH envvar is populated manually to find those DLLs](https://github.com/mitsuba-renderer/mitsuba3/blob/master/src/python/python/cli.py).

Does importing drjit in Python work? Can you double-check the drjit version that is installed with mitsuba ? I'm honestly not sure what could be going on.

@njroussel
Copy link
Member

Actually, could you try following the later steps of this comment: #1428

Namely, repairing your MSVC redistributable. This produced completely silent crashes when we ran into it.

(We've added some steps to compilation process which shouldn't make this as issue in the future anymore, hopefully.)

@wjakob
Copy link
Member

wjakob commented Jan 14, 2025

If that doesn't fix the issue, could it be that there is something non-standard about your setup? E.g using Conda, having installed Dr.Jit or Mitsuba into different paths (e.g. one system-wide, one in the home directory site-packages)

@tomasiser
Copy link
Member Author

tomasiser commented Jan 15, 2025

I see, is the pip distribution of Mitsuba 3.6.0 built using a different MSVC version than 3.5.2? That could explain why 3.5.2 works but 3.6.0 silently crashes. I am now on a different Windows 11 computer where 3.6.0 works fine. Once I am on the previous computer again, I will try to repair / update the MSVC Redistributable. Thank you for now!

EDIT: I changed the issue title because it seems the original title was incorrect.

@tomasiser tomasiser changed the title Windows 11 - pip install mitsuba==3.6.0 cannot find drjit-core.dll Windows 11 - Mitsuba 3.6.0 installed via pip silently crashes, Mitsuba 3.5.2 works Jan 15, 2025
@njroussel
Copy link
Member

I see, is the pip distribution of Mitsuba 3.6.0 built using a different MSVC version than 3.5.2?

Yes, that has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants