enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento 1] Thread State BLOCKED - XmlHelper.getDocumentFromFile #272

Open everon opened 6 years ago

everon commented 6 years ago

First some system specs.

OS: Fedora 26 (64 bit) PHPStorm: 2017.2.4 (up to date via toolbox) Magicento Version: 3.1.3

Semi frequently the IDE will hang and there is no way to exit without using SIGKILL (kill -9) I've suffered with this freezing issue for some time now and not found any reference to it in the wild to help.

I develop using LXC containers locally if this has any bearing on the issue (I use the remote PHP interpreter config). The issue seems to primarily be focused around layout XML files (confirmed in the stack trace).

Stack trace from log file threadDump-20171009-112134.txt

enriquepiatti commented 6 years ago

Hi @everon, are you sure is Magicento the problem? Could you try disabling to make sure that's the cause? Or you can also try just disabling the "Automatic inspect for $this in templates" option in Magicento settings.

everon commented 6 years ago

Hi @enriquepiatti

I'll give it a go and see how it goes during work today. The crash seems to happen when CTRL clicking types of blocks in layout files more often than any thing else.

everon commented 6 years ago

Hi @enriquepiatti

Was running without Automatic inspect for $this but the crash reoccurred just now. The crash always seems to happen when working in layout xml files exclusively

Attached is the new thread dump which seems to show a similar (or same) stack trace.

threadDump.txt

everon commented 6 years ago

Further to the previous comment, it seems to be further isolated to when starting a new handle and autocomplete tries to kick in.

E.g.

<?xml version="1.0"?>
<layout version="0.1.0">
    <test_...
</layout>

At the point of writing the handle (indicated by the ellipsis), Phpstorm will freeze up completely.

enriquepiatti commented 6 years ago

@everon so the freeze always happen when you try to autocomplete the handle? or sometimes works fine? Also, can you try disabling Magicento? what happens with the layout files with Magicento disabled (no need to uninstall, just disable from Magicento settings)

everon commented 6 years ago

@enriquepiatti

Was running without the layout features for a bit and didn't experience any thing. I did some work on another much smaller and basic project with the layout features enabled and hit the crash again.

The freeze happened when I highlighted a block reference. image

I've also tried to see if the issue occurs with the 2017.3 EAP (it does). At this point I'm tempted to go back through older versions of PHPStorm to see if any of them fix the issue.

Log attached.

threadDump-20171102-112610.txt

everon commented 6 years ago

Hey again,

Still seeing crashes and freezing, it seems to be isolated to when working with the names of blocks when both defining them with <block name="..."> and referencing them <reference name="...">

I'm due to renew my Magicento license for M1, has there been any changes in relation to this issue?

threadDump-20171214-142829.txt