defold / editor2-issues

DEPRECATED
45 stars 4 forks source link

editor fails to start when opening project- log file included #466

Closed blurymind closed 7 years ago

blurymind commented 7 years ago

The editor stopped working. When I open any of the example projects that worked in the previous alpha version, the editor simply crashes without any error pop up. The process just dies before loading the project.

This bug is present in: version = 1.2.96 sha1 = a48d5f28357da97535eb74640370c9e50598eda0 time = 2017-02-07T18:10:15.172777

I am attaching the log file editor2.zip

blurymind commented 7 years ago

After actually reading the log file carefully and also checking the disk space on disk C: I have concluded that the likely reason for the problem is that disk C runs out of space.

It looks like the editor is dumping a huge cache of temp files every time when opening a project and that doesnt get cleaned up when quiting it or on the next start (about 200 mb). As a result, it eventually depletes my free space on disk c and then fails to load projects altogether - until I delete these folders manually editor-defold2

Btw I am running the editor from a usb flash thumb- from another drive

blurymind commented 7 years ago

Apologies, this is not a regression, both alpha versions do the same thing. They copy a lot of files to a temporary folder in C drive every single time a project is opened. My guess is that the entire editor makes a copy of itself there, but it does not clean up that copy when you close it

It would be nice if we had some sort of an error mesage pop up with a warning that the user is out of space on C drive if that happens at least - if it's intended design

Or at least clean up the previous copies prior to creating a new one- so we dont eventually run out of space

blurymind commented 7 years ago

the files in the temp folder seem to be game compilers for all target devices, not the actual editor. Interesting :)

Even though they seem to be disabled at the moment in Defold, the engine is doing something with them. Are you copying them to there in order to make debugging easier?

Why not just keep them in the folder where the editor is? I dont mind if they are unpacked

ragnard-king commented 7 years ago

Hi,

ragnard-king commented 7 years ago

Please let us know if you are able to start as usual after receiving an update, so we can close this issue. Thanks!

blurymind commented 7 years ago

I will update the software when I get back home and report :) The network at my job is blocking the updater

blurymind commented 7 years ago

@ragnard-king I tested this on tonight's version of defold.

The problem still persists. Defold creates a new temporary folder every time I start it, without clearing any of the temporary folders from previous sessions. As a result, with every opening of the editor I eventually deplete the free space on disk C and defold fails to load any projects until I manually go and delete those cache folders it left.

A simple solution to this would be to run a cleantemp() function that removes all the temporary folders from previous sessions before running the function that is creating one for the current session:

rm -r $userTempFolderPath/defold-unpack* createTempFolder()

sorry above is probably a crappy example of pseudo code, just trying to illustrate what I mean xD

Another nice thing to add is a check if there is enough space on disk C to create a temp folder for the session. If not enough, a prompt could warn the user that Defold needs more space on disk C and ask them if they want to try again. Right now if there is no disk space left on C, defold simply crashes when you ask it to load a project

ragnard-king commented 7 years ago

Thanks for the update! I think I communicated a bit poorly: What I meant was that the we had a recent regression causing crashes when opening projects (unrelated to disk space). This has since been fixed. We have not yet addressed the temporary files issue, but we will get there :-)

blurymind commented 7 years ago

Thank you @ragnard-king Defold has no issue loading projects for me when there is enough disk space. If that start occurring I will report it asap

ragnard-king commented 7 years ago

@blurymind We've now improved how we unpack files and we should no longer waste space using temporary files/directories. This change will unfortunately require you to download a new version of the editor from the dashboard as it's not covered by the auto-update process.