GithubHelp home page GithubHelp logo

Comments (6)

jkrei0 avatar jkrei0 commented on May 28, 2024 1

I've left it running for well over 24 hrs now, and it's still frozen and stuck at a consistent 20% cpu usage. It's totally frozen now, the window title/borders have disappeared, I can't minimize it, and the mouse cursor doesn't do anything (it doesn't even show as "spinning"). I'd rather not have my computer sitting there running it all the time, so I've given up and force-killed it.

Edit: I just read your comment, and yes, I get an error box pretty much immediately if I alt-tab to it. Trying to generate a debug report seems to do nothing though (maybe I don't know how to see it)? It just closes the program.

from solvespace.

ruevs avatar ruevs commented on May 28, 2024 1

No need to generate a debug report - I debugged it - and it is perfectly clear what happens.

Linked files on different drives are simply not supported right now because SolveSpace wants to store a relative path in the .slvs file. This applies only to Windows since Unix-es do not have drive letters so all paths can be relative.

Whether this should be supported or not is not clear. The advantage of relative paths is that if the top level directory of a complex project with many linked files (in sub directories) is moved to a different location everything continues to work.

The disadvantage is obviously this issue.

Even if we decide not to support absolute paths on Windows (that would be my preference) I think it should not be a crash but a "civilized" error message with an explanation. But this will take some doing.

from solvespace.

jkrei0 avatar jkrei0 commented on May 28, 2024

I did some more testing, and it seems I was wrong, and it does have something to do with file location. If the image is not on the same drive as the slvs file, it fails, and the specific image has nothing to do with it. (i.e image from C:\Users\User\Downloads, but .slvs file saved to H:\projects\solvespace\ causes the crash.)

I also tested it with an older solvespace build (3.1~36ecb85b w/ AMD fix), and it had the same issue.

from solvespace.

ruevs avatar ruevs commented on May 28, 2024

It turns out images on a different drive are currently not supported. Here is what happens:

First it tries to make the path to the linked image relative in this context:

>	solvespace.exe!SolveSpace::Platform::Path::RelativeTo(const SolveSpace::Platform::Path & base) Line 366	C++
 	solvespace.exe!SolveSpace::SolveSpaceUI::SaveUsingTable(const SolveSpace::Platform::Path & filename, int type) Line 249	C++
 	solvespace.exe!SolveSpace::SolveSpaceUI::SaveToFile(const SolveSpace::Platform::Path & filename) Line 319	C++
 	solvespace.exe!SolveSpace::SolveSpaceUI::GetFilenameAndSave(bool saveAs) Line 588	C++
 	solvespace.exe!SolveSpace::SolveSpaceUI::MenuFile(SolveSpace::Command id) Line 701	C++
 	[External Code]	
 	solvespace.exe!SolveSpace::Platform::WindowImplWin32::WndProc(HWND__ * h, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1064	C++
 	[External Code]	
 	solvespace.exe!SolveSpace::Platform::RunGui() Line 1712	C++
 	solvespace.exe!main(int argc, char * * argv) Line 29	C++
 	solvespace.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 41	C++

Since the image is on a different drive this fails and returns an empty path here:

return From("");

And then it should (intentionally) crash here:

ssassert(!relativePath.IsEmpty(), "Cannot relativize path");

With this message:
image

---------------------------
Fatal error — SolveSpace
---------------------------
File C:\[  ]\solvespace\git\src\file.cpp, line 250, function SolveSpace::SolveSpaceUI::SaveUsingTable:
Assertion failed: !relativePath.IsEmpty().
Message: Cannot relativize path.

Generate debug report?
---------------------------
OK   Cancel   
---------------------------

@jkrei0 doesn't it do that for you?

from solvespace.

jkrei0 avatar jkrei0 commented on May 28, 2024

It does eventually give me that dialog, if I let it sit for a while (not sure how long, it took letting it sit overnight). But until then, it just seems frozen - with a spinny mouse cursor, and cpu usage goes up to a mostly consistent 20% (for reference, when saving a file "normally", it spikes to ~ 20% cpu for only a second).

And windows never complains about it like it usually does for unresponsive programs.

I'll try letting it go for a while again and see if I can get it to generate a debug report.

from solvespace.

ruevs avatar ruevs commented on May 28, 2024

It does the same for me if I run it "alone" (not debugging from Visual Studio).
Try ALT+Tab it seems the error message box does not come to the front somehow so it is not visible, so from Windows' point of view it is not frozen (x64 Windows 10 22H2 Version 19045.3636).
It used to... some Windows update changed something perhaps?

from solvespace.

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.