lectrote icon indicating copy to clipboard operation
lectrote copied to clipboard

Very large gblorb file crashes Chrome process at load time

Open ghost opened this issue 9 years ago • 14 comments

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.

ghost avatar Oct 20 '16 02:10 ghost

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?

erkyrath avatar Oct 20 '16 15:10 erkyrath

.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

ghost avatar Oct 21 '16 14:10 ghost

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

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

erkyrath avatar Oct 23 '16 03:10 erkyrath

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

ghost avatar Oct 23 '16 20:10 ghost

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

curiousdannii avatar Oct 24 '16 00:10 curiousdannii

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 avatar Oct 24 '16 01:10 erkyrath

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 avatar Oct 24 '16 02:10 erkyrath

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 ?

erkyrath avatar Oct 24 '16 02:10 erkyrath

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"

ghost avatar Oct 25 '16 21:10 ghost

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 avatar Oct 25 '16 21:10 erkyrath

I have a couple of solutions in mind:

  • Use JS typed arrays internally: https://github.com/erkyrath/quixe/issues/25
  • Break the images out into a cache directory and refer to them there: https://github.com/erkyrath/lectrote/issues/19

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

erkyrath avatar Oct 25 '16 21:10 erkyrath

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 ...

selkieTG avatar Oct 27 '16 02:10 selkieTG

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.

dmp1991 avatar Jan 28 '17 18:01 dmp1991

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.

erkyrath avatar Jan 28 '17 22:01 erkyrath