Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Parser crash during parse of TCPDF library #144

Closed
pablopunk opened this issue Sep 2, 2016 · 10 comments
Closed

Parser crash during parse of TCPDF library #144

pablopunk opened this issue Sep 2, 2016 · 10 comments

Comments

@pablopunk
Copy link

pablopunk commented Sep 2, 2016

So, I have a fairly large PHP project (half symfony2 and half raw php) and when I install this extension it always starts to index files very fast but it stops at 32.6%, like there was a huge file or something, but it never seems to continue.

screen shot 2016-09-02 at 10 24 29 am

I'm on MacOS 10.12 with PHP 5.6

UPDATE: I enabled debug mode and it seems to stop at this file:

ss

@pablopunk
Copy link
Author

Ok it seems I'm not the only one with this problem (see #135).

Is there any way to configure crane to ignore lib/PHPExcel?

@smbkr
Copy link

smbkr commented Sep 8, 2016

I get the same issue on a large project (2992 files). The file in particular it's dying on for me is sendgrid-php.php, content of which is only:

<?php require 'vendor/autoload.php'; require 'lib/SendGrid.php'; ?>

So I don't think it's an issue with parsing the file. The file itself uses UTF-8 encoding, the only 'unusual' thing is that there is no new-line at EOF, but I know for a fact there's many other files like that in this project.

Edit: more info: I'm in Windows 10 so doesn't seem to be OS specific.

@pablopunk
Copy link
Author

Yep, it's weird. What I did now is:

  • I deleted symfony folder lib from my project (rm -rf lib) cause there were more folders there triggering the error.
  • Index all files successfully
  • git checkout lib for getting the folder back into my project

Obviously this is not a fix, it's just a workaround for getting it to finish the indexing.

@pablopunk pablopunk changed the title Indexing stuck at 32.6% Indexing stuck at X% Sep 8, 2016
@Angelinsky7
Copy link

Same issue here, with a symfony project (the tuto project) on Windows 10.
The crash occurs on differents files (not always the same percentage) and the only way to retry is to reboot vscode.

@pablopunk pablopunk changed the title Indexing stuck at X% Indexing stuck in Symfony projects Sep 21, 2016
@pablopunk
Copy link
Author

I changed the title cause the error seems to happen with the folders of a symfony project.

@nevadascout
Copy link
Member

nevadascout commented Sep 21, 2016

@pablopunk I've been doing some work on stability and trying to improve the parser over the last few days as you can see here #148.

I've identified an issue (#154) with the latest version of Symfony in that the parser doesn't understand the PHP7 syntax in the NullableController test fixture.

This does seem to be unrelated to the issue that you are having, but I now recognise the error (Cannot read property '3' of undefined) and I believe I may have fixed this for the 0.2.1 release.

In any case, I'll download the PHPExcel library and test the latest version of the parser on it to see if I can reproduce this error.

EDIT: Without checking the code, this is where I had seen that error before: #153

@nevadascout nevadascout added this to the 0.2.1 milestone Sep 21, 2016
@nevadascout nevadascout self-assigned this Sep 21, 2016
@nevadascout
Copy link
Member

After futher investigation it appears this is related to #157 (memory leak during parsing large files)

@nevadascout nevadascout changed the title Indexing stuck in Symfony projects Parser crash during parse of TCPDF library Sep 24, 2016
@nevadascout nevadascout modified the milestones: 0.2.2, 0.2.1 Sep 24, 2016
@pablopunk
Copy link
Author

I'm still getting this error. I think it's related to this issue.

This feature would be a great solution at least for now.

@nevadascout nevadascout modified the milestones: 0.2.2, 0.3.0, 0.2.5 Oct 28, 2016
@nevadascout
Copy link
Member

This should be fixed with the update of php-parser to 2.0.0

@nevadascout
Copy link
Member

Released in v0.3.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants