felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.16k stars 185 forks source link

Code crashs when casting an var via doc-comments and try to autocomplete #289

Open jens1o opened 7 years ago

jens1o commented 7 years ago

I tried out your language server using an composer project(FFMpeg/FFMpeg) https://github.com/PHP-FFMpeg/PHP-FFMpeg

Code:

<?php

require_once 'vendor/autoload.php';

use FFMpeg\FFMpeg;

$ffmpeg = FFMpeg::create();

/** @var \FFMpeg\Media\Video $video */
$video = $ffmpeg->open('test.mp4');

$video->|; // cursor here

image

When pressing "Keep Waiting", the following message appears image

Errors in Console:


VirtualAlloc() failed: [0x000005af] The paging file is too small for this operation to complete.

VirtualAlloc() failed: [0x000005af] The paging file is too small for this operation to complete.

PHP Fatal error:  Out of memory (allocated 3963617280) (tried to allocate 262144 bytes) in C:\Users\Jens\.vscode\extensions\felixfbecker.php-intellisense-1.1.1\vendor\felixfbecker\language-server\src\DefinitionResolver.php on line 189
d.logExtensionHostMessage @ extensionHost.ts:282
extensionHost.ts:282[Extension Host] 
Fatal error: Out of memory (allocated 3963617280) (tried to allocate 262144 bytes) in C:\Users\Jens\.vscode\extensions\felixfbecker.php-intellisense-1.1.1\vendor\felixfbecker\language-server\src\DefinitionResolver.php on line 189

messageService.ts:126Extension host terminated unexpectedly. Please reload the window to recover.e.doShow @ messageService.ts:126
extensionHost.ts:321Extension host terminated unexpectedly. Code:  3  Signal:  nulld.onExit @ extensionHost.ts:321```
felixfbecker commented 7 years ago

Probably an infinite recursion. Could you enable XDebug's infinite recursion protection?

jens1o commented 7 years ago

To which value? 250?

jens1o commented 7 years ago

To whatever value I'll set it, I still have problems with the code I've provided above.

felixfbecker commented 7 years ago

In the newest version PHP LS will restart without XDebug automatically. Could you try to comment out that part in php-language-server.php?

jens1o commented 7 years ago

Yeah, I'll give it a try.

Edit: Where is the extension located in the filesystem?