defold / editor2-issues

DEPRECATED
45 stars 4 forks source link

Unexpected eof for socket connection. #655

Closed AGulev closed 7 years ago

AGulev commented 7 years ago

Expected behaviour

dmengine runs when I build the project

Actual behaviour

in console: WARNING:DLIB: Unexpected eof for socket connection.

and dmengine freeze with white screen and then crashed Crashlog in the file

dmengine_crash_log.txt

Steps to reproduce

just build the project using Cmd+B - sometimes dmengine freeze with warning.


Defold version1.2.102
Defold shae41546be9f07d669d1675d079e786788cd9b8f85
Build time2017-04-07T15:07:15.541900
OS nameMac OS X
OS version10.12.3
OS archx86_64
Java version1.8.0_102-b14
AGulev commented 7 years ago

@RagnarSvenssonKing I see you set the tag "engine" Just in case : reproduced only in Editor2 (maybe because there is engine version 1.2.102, i don't know)

RagnarSvenssonKing commented 7 years ago

Alright, thanks for the extra info! It might be editor2 after all then.

AGulev commented 7 years ago

@RagnarSvenssonKing I found simple way for bug reproduction:

  1. Build the project Cmd+B
  2. Do not close the opened dmengine
  3. Build the project Cmd+B one more time
AGulev commented 7 years ago

This really really hinders work. I making "Force Quit" dmengine 7-9 times per day =(

RagnarSvenssonKing commented 7 years ago

Sorry, I will start working on it right away!

AGulev commented 7 years ago

Thank you very much!!!!

RagnarSvenssonKing commented 7 years ago

I get the message "WARNING:DLIB: Unexpected eof for socket connection.", but I can't get it to hang or crash. It works every time I build&run without terminating the game first. Could you try in another project (like the runner template or similar) to see if you have the same problem there? The crash log suggests that it could be related to how the content has been loaded before rebooting the engine.

AGulev commented 7 years ago

yes, you right with other project all fine. I see the "WARNING:DLIB: Unexpected eof for socket connection." message but it works. What can I provide you for helping solve the problem?

RagnarSvenssonKing commented 7 years ago

Would you mind me getting access to your project?

AGulev commented 7 years ago

yes, just give me you defold dashboard email.

RagnarSvenssonKing commented 7 years ago

Thanks! ragnar.svensson@king.com

AGulev commented 7 years ago

you can check, it's the RedHood project

RagnarSvenssonKing commented 7 years ago

Excellent, got the crash now! Thanks a lot, will let you know when I find the reason.

RagnarSvenssonKing commented 7 years ago

Ok, I have a theory. If you have the time, you could help me verify it!

  • I think that the crash happens while we load resources async (I saw the async_load you are using)
  • When you reboot the running engine (build, Cmd+B), the engine loads resources over the network
  • Editor2 serves the resources over the network incredibly slow. This is a separate issue which I was unaware of, will look into this too.

So I think that the crash comes from an unlucky combination of these things. I will of course fix the crash too.

Could you try to provoke the crash after changing config.lua:

M.MSG_LOAD = hash("async_load")

to

M.MSG_LOAD = hash("load")

I could not get the crash after doing sync loading, but the game hangs with a white screen for long times while loading resources incredibly slow.

RagnarSvenssonKing commented 7 years ago

587 resources loaded, 300 msec/resource (OMG!!!) => 3 minutes of loading.. this is embarrassing. :)

AGulev commented 7 years ago

I have no crash if I change "async_load" to "load". In my case loading time (with a white screen) something about 25 seconds. Strange, but when I back async_load it works without crashes. Only long load O_o

AGulev commented 7 years ago

In editor1 do not closing the dmengine is a way to faster project loading. Now to close dmengine is faster way. But issue is that sometimes I forget to close dmengine...

RagnarSvenssonKing commented 7 years ago

It's now around 1000 times faster, takes a second to load it. :) Each resource is around 0.3 msec. Will look at the crash now. I'll let you know when the fixes are available in an update.

RagnarSvenssonKing commented 7 years ago

Sorry for the delay, it was really hard to find the reason of the "Unexpected EOF", which in fact turned out to be a bug in Java. Found a workaround though! A fix is up for review after which it will be merged and released. We also found and fixed the crash in the engine. As a bonus the loading is also faster because of more efficient etags-handling.

AGulev commented 7 years ago

Awesome news!

RagnarSvenssonKing commented 7 years ago

Fixed!