erkyrath / lectrote

The IF interpreter in an Electron shell
Other
248 stars 28 forks source link

Very large gblorb file crashes Chrome process at load time #76

Open ghost opened 7 years ago

ghost commented 7 years ago

When opening a game file (.gblorb) the result is an empty, white window devoid of any text. The toolbar is visible and intractable. The game file launches perfectly fine in wingit, so I assume that the file should be OK, and the issue is persistent with several game files.

erkyrath commented 7 years ago

Does the same thing happen with .z5 or .zblorb files?

Does the "Find..." menu option work? (Opening a Search field at the top right corner.)

What is your operating system version?

ghost commented 7 years ago

.zblorb does not show as a valid game file (.ulx, .blorb .blb .gblorb .glb only). Find does not open anything. Same white window.

OS: Windows 10 Build: 14393 Version: x64 and x86 1.1.5

erkyrath commented 7 years ago

Cannot reproduce on my Win10 box. (Testing 1.1.5.)

(I will fix the bug with .zblorb not showing as runnable; that's unrelated.)

ghost commented 7 years ago

Example of what I see: https://www.youtube.com/watch?v=n1lGZg7Mnks

Odd that it's not reproducible. It occurs on both of my PCs, one of which had a fresh W10 install last week

curiousdannii commented 7 years ago

Does the "Open developer tools" menu option work? If so, what does the console show?

erkyrath commented 7 years ago

That was going to be my next question... try that menu option (in the blank window) and then select the Console tab in the debugger pane. It may show an error message.

erkyrath commented 7 years ago

It may be helpful to know that we have an experimental build of Gargoyle that runs on MacOS Sierra. Link: http://eblong.com/zarf/tmp/gargoyle-2016-mp.mac.dmg

erkyrath commented 7 years ago

Also (while I'm thinking of it): does the problem still occur with a small Glulx file like http://eblong.com/zarf/glulx/Advent.ulx ?

ghost commented 7 years ago

Tested with the small file you sent and it worked as it should. Appears to be a problem with large files maybe?

Opening the developer tools gives the message "DevTools was disconnected from the page. Once the page is reloaded, DevTools will automatically reconnect"

erkyrath commented 7 years ago

Thanks for checking this!

Yes, at this point I believe it is a problem with very large game files. (Total Blorb file size is the issue.) I gather from your video that you are testing a file which is around 200 megabytes. The way Lectrote loads the data is not efficient and causes the Chrome process to run out of memory and crash.

erkyrath commented 7 years ago

I have a couple of solutions in mind:

However, for the present the answer is "Lectrote just doesn't support files that large."

selkieTG commented 7 years ago

Sounds right. I found with version 1.1.4 under Linux it failed like this when I tried to load Trap Quest (just the gblorb files are 158MB or 185MB, BTW):

<--- Last few GCs --->

  49 ms: Scavenge 2.5 (9.0) -> 2.5 (9.0) MB, 1.1 / 0.0 ms [allocation failure].
  93 ms: Scavenge 3.9 (11.0) -> 3.7 (13.0) MB, 0.6 / 0.0 ms [allocation failure].
 171 ms: Scavenge 6.1 (14.0) -> 5.3 (14.0) MB, 1.5 / 0.0 ms [allocation failure].
 258 ms: Scavenge 7.5 (15.0) -> 6.4 (15.0) MB, 2.7 / 0.1 ms [allocation failure].
 298 ms: Scavenge 8.6 (16.0) -> 8.1 (20.0) MB, 2.0 / 0.0 ms [allocation failure].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x17b2b7113a49 <String[7]: file://> 1: load_named_game(aka load_named_game) [/home/.../progs/Lectrote/Lectrote-linux-x64/resources/app/apphooks.js:~11] [pc=0x1a5dc38ef68c](this=0x23604cc04399 ,arg=0x257855142c71 <an Object with map 0x33a568581df9) 2: /* anonymous */ [/home/.../Lectrote/Lectrote-linux-x64/resources/app/apphooks.js:263] [pc=0x1a5dc38e6a35](this=0xd2667c6d229 <an ...

dmp1991 commented 7 years ago

Is there a plan to fix the large gblorb problem? I just tried the latest release (1.2.1 on Mac Sierra) on a 100MB gblorb and had the same behavior of just a white window resulting. I had a 72 MB gblorb which displayed a "Quixe init: glk_put_string: invalid stream" error (I don't know if that's a Lectrote issue or an issue with the gblorb to be honest), so I suspect the limit is somewhere between the two sizes.

erkyrath commented 7 years ago

There is a plan, as noted above, but no schedule.

Quixe init: glk_put_string: invalid stream

This error indicates a game coding bug, 95% of the time.