Coder Social home page Coder Social logo

Comments (37)

ialhashim avatar ialhashim commented on September 5, 2024 5

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)

from mitsuba.

diiigle avatar diiigle commented on September 5, 2024 3

@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.

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024 2

@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.

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

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.

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

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.

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

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?

from mitsuba.

diiigle avatar diiigle commented on September 5, 2024

+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.

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024

@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.

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

@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

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024

@JeroenDStout

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

from mitsuba.

diiigle avatar diiigle commented on September 5, 2024

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?

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

@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.

from mitsuba.

diiigle avatar diiigle commented on September 5, 2024

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.

from mitsuba.

JeroenDStout avatar JeroenDStout commented on September 5, 2024

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

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024

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

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024

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

from mitsuba.

ialhashim avatar ialhashim commented on September 5, 2024

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

from mitsuba.

kfiros1 avatar kfiros1 commented on September 5, 2024

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?

from mitsuba.

guoxx avatar guoxx commented on September 5, 2024

@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.

from mitsuba.

kfiros1 avatar kfiros1 commented on September 5, 2024

@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).

from mitsuba.

ialhashim avatar ialhashim commented on September 5, 2024

@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.

from mitsuba.

kfiros1 avatar kfiros1 commented on September 5, 2024

@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.

from mitsuba.

merlinND avatar merlinND commented on September 5, 2024

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

from mitsuba.

kfiros1 avatar kfiros1 commented on September 5, 2024

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

from mitsuba.

kfiros1 avatar kfiros1 commented on September 5, 2024

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.

from mitsuba.

mzeilfelder avatar mzeilfelder commented on September 5, 2024

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.

from mitsuba.

diiigle avatar diiigle commented on September 5, 2024

@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.

from mitsuba.

mzeilfelder avatar mzeilfelder commented on September 5, 2024

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).

from mitsuba.

noamgat avatar noamgat commented on September 5, 2024

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?

from mitsuba.

CeiMu avatar CeiMu commented on September 5, 2024

@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.

from mitsuba.

merlinND avatar merlinND commented on September 5, 2024

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.

from mitsuba.

CeiMu avatar CeiMu commented on September 5, 2024

from mitsuba.

merlinND avatar merlinND commented on September 5, 2024

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.

from mitsuba.

CeiMu avatar CeiMu commented on September 5, 2024

from mitsuba.

CeiMu avatar CeiMu commented on September 5, 2024

from mitsuba.

chaosink avatar chaosink commented on September 5, 2024

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 #52 (comment) 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?

from mitsuba.

chaosink avatar chaosink commented on September 5, 2024

@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.

from mitsuba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.