fougue / mayo

3D CAD viewer and converter based on Qt + OpenCascade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

a couple build and run time error

easternbun opened this issue · comments

Okay the last open folder property is causing the error, but I am at lost of why and how to fix it.
it seems that path string has invalid characters I assume chinese characters
what is more is why is it trying to open wechat chat folder when it has nothing to do with mayo.
what is more is mayo's qapplication is trying to run ros2_foxy which is a robotic system
image
image
image

================

So I redownload the mayo and found a build error and a run time error

I followed the instructions given by Build-instructions-for-Windows-MSVC
the QT version is 6.4.3 with msvc2019-64bits
the OCC version is 7.6.0
the cl.exe is From "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\Hostx86\x64"
( Note cl is strange because first time I build with qmake on .pro file it did not throw a "cl could not be found" error, so I choose a latest version of cl I could find, which is from above directory. )

======

the build error:
GL_GLEXT_VERSION is redefined
The code line at 268 of command_system_information.cpp says QString cannot be converted to QChar

the run error:
memory error at run time when loading appModule settings

image
image
image
image

my Install output
image

Hello @easternbun
Thanks for your feedback!

I've just pushed a fix in develop branch for the compiler error you reported(in command_system_information.cpp). This one happened for Qt6 and not Qt5. It reminds me to check compilation against Qt6 in the CI(ie GitHub Actions)

The one about GL_GLEXT_VERSION is a compiler warning(doesn't prevent compilation to succeed) and there's no fix I can find. This happens with OpenCascade 7.6.0 and with 7.7.0 version. You can ignore this warning, if it's really an issue then try to update to OpenCascade 7.7.0

About the crash with Variant::toConstRefString() that one is weird. I suggest to clear the contents of the lastOpenFolder setting in the registry and try again. Does the crash happens on the std::get<std::string>() or after with the creation of the FilePath object?
Would be great to see the callstack and paste here also what's inside the variant object as seen by Visual Studio(Code)

@HuguesDelorme

Thanks for the reply!
The crash happened at line 139 of settings.cpp "d->loadPropertyFrom" when trying to load lastOpenFolder property, and in the function loadPropertyFrom(), the program crashed at fromVariant(property, value).
image
image

Edit the registry and please copy and paste here the value of key lastOpenFolder in HKEY_CURRENT_USER\SOFTWARE\Fougue Ltd\Mayo\application
Then clear value of that key(make it empty)
Restart Mayo

On my side I will try to start Mayo after having set the value you pasted in, and see if it reproduces the crash on my side
Thanks for your feedback

@easternbun Any news on that issue?

i think maybe the path is contain chinese or deleted

Snipaste_2023-11-01_09-31-02
Snipaste_2023-11-01_09-32-59

Hello @zerger
Thanks for the elaborated feedback
I've just pushed a fix for this issue on develop branch, can you please check if it's solved on your side?

Fixed with commit c2c1147