mitsuba icon indicating copy to clipboard operation
mitsuba copied to clipboard

Crash on start ("VC version 15.0 not installed" / "could not find or load the Qt platform plugin")

Open JeroenDStout opened this issue 6 years ago • 37 comments

The build completes, though prepended with the warning that

VC version 15.0 not installed

and

Unable to detect a Qt installation -- not building the GUI!

I also get a lot of Unknown compiler version

I am building from within VS2017 (15.3.5), so I figure the VC 15.0 has to be installed. The dependencies (which I got here from git) include Qt. I am not super-interested in the GUI, but I figure the VC warning might have something to do with the crash.

When starting mitsuba.exe (or mitsutil or mtssrv) it almost instantly freezes (not responding), both from command line and from explorer, and with admin privilege. There is no log, as far as I can tell.

It's possible I have done something silly, please forgive me as it was hard for me to understand the build process.

JeroenDStout avatar Nov 04 '17 16:11 JeroenDStout

Addendum: just realised I could set MSVC_VERSION to 14.0 for a try-out and it compiles without further warnings (save for the Qt one), but it still freezes when starting.

Addendum 2: Apparently it hangs in Imf::staticInitialize();

Addendum 3: Commenting out Imf::staticInitialize(); prevents the freeze, though of course I imagine now EXR exporting would not work.

JeroenDStout avatar Nov 04 '17 16:11 JeroenDStout

Sorry to keep addenduming this, but I checked out the 0.5.0 version from feb 2014, and it builds without any problems, it builds the GUI with Qt and there are no freezes.

Fortunately 0.5.0 is good enough for my purposes, but I would of course prefer to work with a more recent version (and hopefully contribute at some point!), so if there is anything you'd like to have me try to get it to work, let me know.

For the record, in both cases did I only check out the version (feb 2014 vs. most recent) and download the dependencies directly (from the old 2014 repo and from the recent git repo). The older builds fine in one go, the second one has the 15.0 problem and cannot find Qt.

JeroenDStout avatar Nov 04 '17 19:11 JeroenDStout

Sorry to bump this, but I am quite interested in getting to the most recent version at some point.

I ran through the process again; I downloaded from this repository and added the dependencies. I am using Visual Studio 2017, scons 3.0 and python 2.7. After fixing the print statements, the build in Visual Studio initially returns

scons : warning : VC version 15.0 not installed. C/C++ compilers are most likely not set correctly. Installed versions are: ['14.1', '14.0', '10.0']

And then

Unable to detect a Qt installation -- not building the GUI!

Did I miss a step? Is the 15.0 intended? Or is the Windows compilation broken at the moment?

JeroenDStout avatar Nov 15 '17 22:11 JeroenDStout

+1 same for me. Changing MSVC_VERSION to 14.1 just throws a lot of

Unknown compiler version - please run the configure tests and report the results errors.

diiigle avatar Nov 23 '17 15:11 diiigle

@JeroenDStout @diiigle

  1. VC version 15.0 not installed You have to use scons-2.5.1, you can find it in dependencies folder

  2. Unable to detect a Qt installation -- not building the GUI! First, use scons-2.5.1. Secondly, "lupdate" and "lrelease" is not included in "dependencies\bin", but seems it's not used so I just comment it in qt5.py.

  3. To compile GUI successfully

    • Copy "dependencies\lib\Qt5Core.dll" to "dependencies\bin" so that uic.exe is not crash
    • Copy "qwindows.dll" to "dist\platforms\qwindows.dll", I get qwindows.dll from a Qt installation package.

guoxx avatar Dec 10 '17 12:12 guoxx

@guoxx thank you for the reply!

Apologies in advance if I am getting this wrong, but checking the version on scons I do believe I am getting Scons 2.5.1:

scons

JeroenDStout avatar Dec 11 '17 02:12 JeroenDStout

@JeroenDStout

Which version of python are you using? My dev environment are Win10 Anaconda3 Python2.7

guoxx avatar Dec 11 '17 02:12 guoxx

These Unknown compiler version errors are coming from a boost header file.

My Visual C compiler version is 19.11.25547 which will make this test fail. And upgrading boost won't help, since they do not support VC version 15 yet (https://sourceforge.net/projects/boost/files/boost-binaries/1.65.1/)

I think we can ignore them for now, as they are only a precaution of boost.

@guoxx Thanks for the tips. This should be fixed in the dependencies_win64:

  • Add missing qwindows.dll
  • comment the unnecessary parts in qt5.py

@guoxx @amyspark Would you do that?

diiigle avatar Dec 11 '17 12:12 diiigle

@guoxx

Windows 7, Python 2.7

@diiigle How far are you getting it to compile, now? From your suggested fixes it sounds like you are getting quite far.

JeroenDStout avatar Dec 11 '17 15:12 JeroenDStout

Yes, I made it. There were some problems in the ply module, but I just commented it in shapes/SConstruct.

Even got the GUI working with @guoxx's tips.

diiigle avatar Dec 11 '17 15:12 diiigle

@diiigle If it is not too much to ask, could you give me some sort of brief step-by-step of what you did?

JeroenDStout avatar Dec 11 '17 15:12 JeroenDStout

@diiigle Did you observe 8 grey pixels on the top and right boarder of GUI window?

guoxx avatar Dec 11 '17 16:12 guoxx

@guoxx No, I don't have such artifacts. It looks just like the 0.5.0 binaries except for some minor scalings on the menu fonts.

@JeroenDStout

git clone --depth=1 https://github.com/mitsuba-renderer/mitsuba.git
cd mitsuba
git clone --depth=1 https://github.com/mitsuba-renderer/dependencies_win64.git dependencies

Comment in data/scons/qt5.py:

                QT5_RCC = locateQt5Command(env,'rcc', env['QTDIR']),
                # QT5_LUPDATE = locateQt5Command(env,'lupdate', env['QTDIR']),
                # QT5_LRELEASE = locateQt5Command(env,'lrelease', env['QTDIR']),

                QT5_AUTOSCAN = 1, # Should the qt tool try to figure out, which sources are to be moc'ed?

...

                QT5_MOCFROMCXXCOM = [
                        '$QT5_MOC $QT5_MOCFROMCXXFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE',
                        Action(checkMocIncluded,None)],
                #QT5_LUPDATECOM = '"$QT5_LUPDATE" $SOURCE -ts $TARGET',
                #QT5_LRELEASECOM = '"$QT5_LRELEASE" $SOURCE',
                QT5_RCCCOM = '"$QT5_RCC" $QT5_QRCFLAGS $SOURCE -o $TARGET',
                )

        # Translation builder
        # tsbuilder = Builder(
        #         action = SCons.Action.Action('$QT5_LUPDATECOM'), #,'$QT5_LUPDATECOMSTR'),
        #         multi=1
        #         )
        # env.Append( BUILDERS = { 'Ts': tsbuilder } )
        # qmbuilder = Builder(
        #         action = SCons.Action.Action('$QT5_LRELEASECOM'),# , '$QT5_LRELEASECOMSTR'),
        #         src_suffix = '.ts',
        #         suffix = '.qm',
        #         single_source = True
        #         )
        # env.Append( BUILDERS = { 'Qm': qmbuilder } )

Comment in src/shapes/SConscript:

plugins += env.SharedLibrary('obj', ['obj.cpp'])
#plugins += env.SharedLibrary('ply', ['ply.cpp', 'ply/ply_parser.cpp'],
#        CPPPATH = env['CPPPATH'] + ['#src/shapes'])
plugins += env.SharedLibrary('serialized', ['serialized.cpp'])

From a Developer Command Prompt for VS 2017:

copy dependencies\lib\Qt5Core.dll dependencies\bin
scons --cfg=build\config-win64-msvc2017.py --parallelize

Running the GUI will crash if you have no Qt5 installed on your system. Install it and it will find the necessary qwindows.dll on the path.

But we should definitely fix this as described here and include the qwindows.dll in the dependencies_win64 repo.

diiigle avatar Dec 12 '17 12:12 diiigle

@diiigle Compiling errors of ply_parser.cpp is been fixed with latest update of VS2017 which is 15.5.1

guoxx avatar Dec 12 '17 15:12 guoxx

@diiigle For the 8 grey pixels, it turn out a bug from Qt. If you launch mtsgui on second monitor, this issue occur. Can be solved by upgrade to Qt 5.9.3. I will create a PR to fix dependencies for win64.

guoxx avatar Dec 13 '17 05:12 guoxx

Overwriting the provided Qt dlls with the latest Qt 5 ones on my system fixed the qwindows.dll issue for me.

ialhashim avatar Jan 08 '18 15:01 ialhashim

Hey,

I had the same problem and I followed the instructions here. now I dont get the message about

Unable to detect a Qt installation -- not building the GUI!

but instead I have the message of:

`This application failed to start because it could not find or load the Qt platform plugin
''windows'' in '' '',

Available plattform plugins are: windows.

Reinstalling the application may fix the problem.

I reinstalled the Qt and scons again, I have 5.8 version of Qt and using scons-2.5.1. I copied the "qwindows.dll" to "dist\platforms\qwindows.dll from the Qt and commented the unnecessary parts in qt5.py as @guoxx suggested.

what else can I do?

kfiros1 avatar Jan 11 '18 13:01 kfiros1

@justForAsk For windows version (I never tried linux one), you don't need to install Qt, all the required DLL/headers are included in dependencies_win64 except qwindows.dll.

I think you can use https://github.com/guoxx/dependencies_win64, right version of qwindows.dll is added. But you still need to copy it manually.

guoxx avatar Jan 12 '18 05:01 guoxx

@guoxx thanks for the reply. I've tried to do all the process again with your dependencies and I've got the message:

`This application failed to start because it could not find or load the Qt platform plugin
''windows'' in '' '',

Available plattform plugins are: windows.

Reinstalling the application may fix the problem.

in addition, I've got a lot of Cannot find or open the PDB file and some of the 'mtsgui.exe' unloaded in the Visual Studio.

the full message:

'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\mtsgui.exe'. Symbols loaded.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\xerces-c_3_1.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\boost_system-vc141-mt-1_64.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Unloaded 'C:\Windows\System32\ucrtbase.dll'
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\boost_filesystem-vc141-mt-1_64.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\libmitsuba-core.dll'. Symbols loaded.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\libmitsuba-render.dll'. Symbols loaded.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\libmitsuba-hw.dll'. Symbols loaded.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5Gui.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5Widgets.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5Core.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5OpenGL.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5Xml.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5XmlPatterns.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Qt5Network.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\libfftw3-3.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\jpeg.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\libpng16.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Iex.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\IlmImf.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\zlib1.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\boost_thread-vc141-mt-1_64.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Half.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\vcomp140.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Unloaded 'C:\Windows\System32\glu32.dll'
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\glew32mx.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\mpr.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\boost_chrono-vc141-mt-1_64.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\IlmThread.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Users\kfirs\source\mitsuba\dist\Imath.dll'. Module was built without symbols.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Program Files (x86)\TeamViewer\tv_x64.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.16299.192_none_887f70824ab5b0de\comctl32.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file.
'mtsgui.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

Reinstalling the application may fix this problem.
Unhandled exception at 0x00007FFFBCAEB70E (ucrtbase.dll) in mtsgui.exe: Fatal program exit requested.

The program '[9736] mtsgui.exe' has exited with code 0 (0x0).

kfiros1 avatar Jan 12 '18 07:01 kfiros1

@justForAsk try one thing: copy compiled DLLs and exe to your local Qt bin folder. Its not good practice but sometimes I do this to figure out situations were different Qt dlls are being mixed together during application start up.

For me this worked and then I realized I just need to copy the Qt dlls that I have on my system to the 'dist' folder. Its not an obvious error this 'qwindows.dll'. I tried having the file there but it wasn't working.

ialhashim avatar Jan 12 '18 07:01 ialhashim

@ialhashim sorry but I didnt completely understand. Im using the Qt in the dependencies. what files to copy? from my system32 or from dependencies (and which folder)? and when you say 'dist', do you mean to dist in mitsuba folder or dist in dependencies?

if you can refer to the specific location and specific files, it would be very helpful.

kfiros1 avatar Jan 12 '18 09:01 kfiros1

I just looked into it, if you don't have Qt installed what I said won't work. In any case what seems to work as others pointed out was including 'qwindows.dll'. This file needs to be under a folder 'platforms'.

Here is a link of my 'dist' after compiling the latest repo and adding the missing file. If it works for you then you can recompile mitsuba and won't need any other changes in the future.

dist.zip

(PS: VS 2017 + Qt 5.9.3 + x64 Release)

ialhashim avatar Jan 12 '18 09:01 ialhashim

Thank you @ialhashim for providing a working dist directory. Then, if I understood correctly, the error "could not find or load the Qt platform plugin 'windows'" can happen in at least two cases:

  • Missing qwindows DLL: mitsuba\dist\platforms\qwindows.dll
  • The DLL is present, but other Qt5... DLLs come from another Qt version / distribution

As a workaround to this issue, you can:

  1. Install Qt from the official website (default installation directory: C:\Qt)
  2. Overwrite the distributed Qt5Core.dll, etc files provided in mitsuba\dependencies\lib (and so mitsuba\dist) by the ones from your Qt installation (C:\Qt\<your qt version>\<your qt platform>\bin\
  3. Copying C:\Qt\<your qt version>\<your qt platform>\plugins\platform\qwindows.dll to mitsuba\dist\platforms\qwindows.dll

merlinND avatar Jan 12 '18 10:01 merlinND

@ialhashim @guoxx @merlinND it works, thank you all

kfiros1 avatar Jan 12 '18 10:01 kfiros1

Update:

I succeed to run the GUI and render a scene after doing the scons step and taking the 'dist' to my mitsuba folder. However, my purpose is to extend one of the integrator, when I take the 'dist' folder from @ialhashim, it constrains me to get the files that he built to the dist folder and not my files with the integrator that I've changed. I've tried to build it on my own and take only the platforms folder from the dist but it goes back to the previous problem with the message:

`This application failed to start because it could not find or load the Qt platform plugin
''windows'' in '' '',

Available plattform plugins are: windows.

Reinstalling the application may fix the problem.

kfiros1 avatar Jan 16 '18 09:01 kfiros1

I got a new problem, maybe anyone else has an idea: I got a crash in png_read_image when it tries to read logo.png on start. The logo.png looks fine and I can't really see any bug in the code or see anything in debugging that looks wrong (finds the file, sizes and bitdepth correct). The crash-stack I get:

zlib1.dll!00007ffdd14b6a40()	Unknown
libpng16.dll!00007ffdbccd74fc()	Unknown
libpng16.dll!00007ffdbcccd681()	Unknown
libpng16.dll!00007ffdbccccf4e()	Unknown
libmitsuba-core.dll!mitsuba::Bitmap::readPNG(mitsuba::Stream * stream) Line 2556	C++
libmitsuba-core.dll!mitsuba::Bitmap::readStream(mitsuba::Bitmap::EFileFormat format, mitsuba::Stream * stream, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & prefix) Line 351	C++
libmitsuba-core.dll!mitsuba::Bitmap::Bitmap(mitsuba::Bitmap::EFileFormat format, mitsuba::Stream * stream, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & prefix) Line 297	C++
mtsgui.exe!GLWidget::initializeGL() Line 122	C++
Qt5OpenGL.dll!00007ffdbcd06740()	Unknown
Qt5OpenGL.dll!00007ffdbcd0a5f1()	Unknown
mtsgui.exe!GLWidget::resizeEvent(QResizeEvent * event) Line 1366	C++
Qt5Widgets.dll!00007ffd9f93c732()	Unknown
Qt5Widgets.dll!00007ffd9f918b00()	Unknown
Qt5Widgets.dll!00007ffd9f917ab7()	Unknown
mtsgui.exe!MitsubaApplication::notify(QObject * rec, QEvent * e) Line 152	C++
Qt5Core.dll!00007ffd9f520259()	Unknown
Qt5Widgets.dll!00007ffd9f947674()	Unknown
Qt5Widgets.dll!00007ffd9f94f02a()	Unknown
Qt5Widgets.dll!00007ffd9f94d5b8()	Unknown
Qt5Widgets.dll!00007ffd9f94ee8e()	Unknown
Qt5Widgets.dll!00007ffd9f94f04b()	Unknown
Qt5Widgets.dll!00007ffd9f94d5b8()	Unknown
Qt5Widgets.dll!00007ffd9f94ee8e()	Unknown
Qt5Widgets.dll!00007ffd9f94f04b()	Unknown
Qt5Widgets.dll!00007ffd9f94d5b8()	Unknown
mtsgui.exe!MainWindow::MainWindow(QWidget * parent) Line 228	C++
mtsgui.exe!main(int argc, char * * argv) Line 284	C++

I got it to compile originally using most of the hints above:

  • Set MSVC_VERSION to "14.1" (the 15.0 does not exist as this seems to be about platform target and VS2017 uses 14.1, while 15 was only used accidentally once in some VS2015 beta).
  • Copied qwindows.dll to dist/platforms (One thing I learned: It has to be exactly the same version as the one in the other qt dll's, one dll mentioned above was slightly different and that didn't work at all)
  • Applied changes in qt5.py as diiigle posted
  • When I got to my crash I tried one more thing and updated all qt files (dll, lib, headers) to 5.10.1, but getting the exact same result with that.

Unfortunately ialhashim's dist.zip doesn't work for me. There mtsgui starts, does nothing (not even make a window) and quits again without doing anything or creating any error.

My system is Windows 10 and the VS 2017 Community Edition.

Any ideas welcome. Or if anyone else has a working "dist" and can post it I would also be glad. I mainly wanted to see if maybe some trouble I had with Mitsuba 0.5.0 is maybe fixed in git already.

mzeilfelder avatar Mar 19 '18 13:03 mzeilfelder

@mzeilfelder which versions of libpng/zlib are you linking to? It looks to me, as if they are not linked properly (but I am not an expert on windows for that). There might be a problem because Qt might also link to those libraries, but different versions.

diiigle avatar Mar 21 '18 10:03 diiigle

Dependencywalker tells me that libmitsuba-core.dll depends on dist/libpng16.dll and dist/zlib1.dll I don't see any other dependencies to libpng or zlib, so when qt has those as well then it probably links to them statically. I'm not sure if there can be problems when a dll internally uses a static-library and the application links to the same library dynamically (one should think this is fine... right?).

edit: Just to add - I didn't change the dist folder in any way - so the .exe and .dll are still beside each other, so there shouldn't be a chance that Windows loads another dll I think (Windows behaves there somewhat different than Linux and prefers shared libs beside the binaries).

mzeilfelder avatar Mar 21 '18 11:03 mzeilfelder

After solving all of these problems, the version just hangs after launching on windows 10 (no error message, last log message is "DEBUG main [WGLSession] Initializing WGL session". Has this happened to anyone? Is there a workaround?

noamgat avatar Jul 14 '19 12:07 noamgat

@merlinND Hello, after I download QT and move the relevant DLL file to the dist directory, the mtsgui display can't be started normally.(0x000007b) How can I solve this problem.

CeiMu avatar Apr 30 '21 07:04 CeiMu

Hello @CeiMu, Sorry, I don't know how to solve this issue. The best solution would be to disable the GUI and use Mitsuba from the command line.

merlinND avatar Apr 30 '21 07:04 merlinND

However, the code I want to run is version 0.5.0 of mituba. When using mitsuba.exe on the command line, it shows that the upgrade can only be run through mtsgui. But I didn't find the installation tutorial of MITSUBA 0.5.0 source code on the Internet. I'm a novice. Could you give me some suggestions? Thank you very much.

------------------ 原始邮件 ------------------ 发件人: "mitsuba-renderer/mitsuba" @.>; 发送时间: 2021年4月30日(星期五) 下午3:28 @.>; @.@.>; 主题: Re: [mitsuba-renderer/mitsuba] Crash on start ("VC version 15.0 not installed" / "could not find or load the Qt platform plugin") (#52)

Hello @CeiMu, Sorry, I don't know how to solve this issue. The best solution would be to disable the GUI and use Mitsuba from the command line.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

CeiMu avatar Apr 30 '21 07:04 CeiMu

If the scene file you are trying to render comes from a version of Mitsuba that's not too old (or alternatively from version 0.6), it might just work to change the version number in the scene's <scene> XML tag at the top.

merlinND avatar Apr 30 '21 07:04 merlinND

I'm sorry, but I have modified the version but there are some other errors in the operation. If you have time, I can give you the source code, which is the code of the network specification and accompanied by the documentation. Can you please show me how to run it? I'm very confused about this right now. I would appreciate it if you could help me.

------------------ 原始邮件 ------------------ 发件人: "mitsuba-renderer/mitsuba" @.>; 发送时间: 2021年4月30日(星期五) 下午3:40 @.>; @.@.>; 主题: Re: [mitsuba-renderer/mitsuba] Crash on start ("VC version 15.0 not installed" / "could not find or load the Qt platform plugin") (#52)

If the scene file you are trying to render comes from a version of Mitsuba that's not too old (or alternatively from version 0.6), it might just work to change the version number in the scene's <scene> XML tag at the top.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

CeiMu avatar Apr 30 '21 08:04 CeiMu

I'm sorry to disturb you. I have a specific question now. Could you take a look at this readme and tell me how to modify sconscript? Thank you very much.

------------------ 原始邮件 ------------------ 发件人: "mitsuba-renderer/mitsuba" @.>; 发送时间: 2021年4月30日(星期五) 下午3:40 @.>; @.@.>; 主题: Re: [mitsuba-renderer/mitsuba] Crash on start ("VC version 15.0 not installed" / "could not find or load the Qt platform plugin") (#52)

If the scene file you are trying to render comes from a version of Mitsuba that's not too old (or alternatively from version 0.6), it might just work to change the version number in the scene's <scene> XML tag at the top.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

CeiMu avatar Apr 30 '21 08:04 CeiMu

Thank you @ialhashim for providing a working dist directory. Then, if I understood correctly, the error "could not find or load the Qt platform plugin 'windows'" can happen in at least two cases:

  • Missing qwindows DLL: mitsuba\dist\platforms\qwindows.dll
  • The DLL is present, but other Qt5... DLLs come from another Qt version / distribution

As a workaround to this issue, you can:

  1. Install Qt from the official website (default installation directory: C:\Qt)
  2. Overwrite the distributed Qt5Core.dll, etc files provided in mitsuba\dependencies\lib (and so mitsuba\dist) by the ones from your Qt installation (C:\Qt\<your qt version>\<your qt platform>\bin\
  3. Copying C:\Qt\<your qt version>\<your qt platform>\plugins\platform\qwindows.dll to mitsuba\dist\platforms\qwindows.dll

For https://github.com/mitsuba-renderer/mitsuba/issues/52#issuecomment-357202398 as the above, I found this qwindows.dll helps.

So we don't need to install the whole Qt package and copy the multiple DLLs.

It's enough to just create the dir dist\platforms, and put the above DLL into it.

@merlinND What about putting this qwindows.dll into the dependencies repo?

chaosink avatar Apr 20 '22 10:04 chaosink

@JeroenDStout Seems there is no solution for VC version 15.0 not installed in this thread. I encountered this issue on my machine also.

I checked the code of Scons C:\Python27\scons-2.5.1\SCons\Tool\MSCommon\vc.py. It finds VC 15.0 by the registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7\15.0. On my machine, it's C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\ in the Registry Editor. I have used the Professional version sometime before. But it was uninstalled later. And now the Community version was installed instead. However, the registry item was not modified. So a simple modification of the item fixed the issue.

That's my case. FYI.

chaosink avatar Apr 20 '22 11:04 chaosink