consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
106 stars 10 forks source link

Re-importing Unity project is freezing consulo #157

Closed TeorikDeli closed 5 years ago

TeorikDeli commented 5 years ago

I am actually not sure if this is related to consulo-unity3d or directly to consulo; but when I try re-importing any Unity project (via right click -> Re-import Unity project), consulo freezes while indexing. This happens on consulo 2169 (nightly). I increased vmoptions -Xmx to 3000, didn't worked.

I downgraded to 2158 (beta) and unity3d plugin 5070, tried to re-import, it successfully indexed the project. As I remember, this wasn't happening on consulo 2168 or 2167. I'm using Unity 2018.2.5 (which has the new Unity packages system, maybe it's related, idk).

VISTALL commented 5 years ago

Can you attach threadDumps from log directory? (Help->Show log in explorer)

In last build was added package support (https://github.com/consulo/consulo-unity3d/issues/156) It works - but looks like you have problems with that code

TeorikDeli commented 5 years ago

Well, this is interesting. I reinstalled the 2169 and I can't reproduce the freeze problem anymore 🤔 I cleared the logs & caches multiple times before the updates, so I don't have the logs unfortunately =/ I'll send you the logs if I can reproduce the freezing again, sorry =/ And thanks! 😅

VISTALL commented 5 years ago

Thanks, i will wait for any information about that bug. Will be very helpful

TeorikDeli commented 5 years ago

Yeeey! It happened again 😅

This time, it doesn't happening all my projects. When I open one of my project, it begins to indexing but after a moment consulo freezes. My Consulo build number is 2175. I attached my logs (consulo.log, consulo.log.10 and a threaddumps directory).

consulo_logs.zip

VISTALL commented 5 years ago

Hello. Thanks - i will check today.

VISTALL commented 5 years ago

Strange error - there no obvious freeze, but there some spamming exception (and that strange)

TeorikDeli commented 5 years ago

Yeah, very strange. I suspected -as you mentioned before- the package manager, so I opened the project in Unity to reinstall the packages (I deleted package caches last week I guess), then I deleted .consulo directory (and .csproj files) and finally reopened the project. It seemed working, but then at the very end of the indexing progress bar, it freezed again. If you something in your mind to me to try, just tell me. I can see it successfully finds all the packages, I think. I can try to uninstall packages one by one, or something else.

TeorikDeli commented 5 years ago

Hi again. I deleted .consulo directory, .sln/.csproj files and moved my Packages directory to somewhere else. Then, try to open the project, "ta-daaa" it opened and indexed without any problem. So, it is definitely a problem with my packages. It's hard to test, so it'll take time for me to find which package causes this. I'm sharing my manifest.json:

{
  "dependencies": {
    "com.unity.analytics": "2.0.16",
    "com.unity.cinemachine": "2.2.7",
    "com.unity.package-manager-ui": "1.9.11",
    "com.unity.postprocessing": "2.0.11-preview",
    "com.unity.purchasing": "2.0.3",
    "com.unity.render-pipelines.core": "3.0.0-preview",
    "com.unity.render-pipelines.lightweight": "3.0.0-preview",
    "com.unity.shadergraph": "3.0.0-preview",
    "com.unity.textmeshpro": "1.2.4",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
  }
}

First, I'll test preview packages, then not built-in packages, then every other =/

TeorikDeli commented 5 years ago

The problem is Cinemachine 2.2.7. Idk why, but only when I delete it from the manifest, everything works well. Consulo gives me this error when the cinemachine is in the manifest:

ekran resmi 2018-11-13 00 18 33

This is the full log:

Invalid startOffset:-1
java.lang.Throwable

hrowable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:122)
    at com.intellij.openapi.editor.ex.util.SegmentArray.setElementAt(SegmentArray.java:43)
    at com.intellij.openapi.editor.ex.util.SegmentArrayWithData.setElementAt(SegmentArrayWithData.java:35)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter$TokenProcessor.addToken(LexerEditorHighlighter.java:355)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.doSetText(LexerEditorHighlighter.java:376)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.setText(LexerEditorHighlighter.java:349)
    at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:176)
    at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:147)
    at com.intellij.psi.impl.cache.impl.todo.TodoIndex.lambda$new$1(TodoIndex.java:99)
    at com.intellij.util.indexing.SnapshotInputMappings.readPersistentDataOrMap(SnapshotInputMappings.java:149)
    at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:95)
    at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:194)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1565)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$17(FileBasedIndexImpl.java:1501)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:526)
    at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1466)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1451)

at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:105)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$1.run(CacheUpdateRunner.java:228)
    at consulo.application.impl.BaseApplication.tryRunReadAction(BaseApplication.java:552)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$2.run(CacheUpdateRunner.java:247)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:100)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:242)
    at consulo.application.impl.BaseApplication$1.run(BaseApplication.java:375)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

I tried to uninstall and install the cinemachine in unity, but didn't worked.

VISTALL commented 5 years ago
"com.unity.cinemachine": "2.2.7",

this package?

TeorikDeli commented 5 years ago

Yes, it is.

TeorikDeli commented 5 years ago

Hi! Is there any news for this one? 😕

VISTALL commented 5 years ago

Hello. I'm busy at my primary job, and i don't have too much time for now.

I will add this issue to my check list for today.

Sorry, and thanks for reminder.

VISTALL commented 5 years ago

Hello. Tested will full dependency list - and there no problems :(

Idk how reproduce it

TeorikDeli commented 5 years ago

No problem for the delay =)

Hmmm, I removed and re-installed cinemachine 2.2.7, but this problems happens even with a fresh new project with cinemachine 2.2.7. Do you suggest anything to solve this? I tried cleaning cache, removing .consulo directory from the project, but nothing seems to work for me 😁 Thank you!

VISTALL commented 5 years ago

Strange. I will close issue - but notify me if, bug return back.

Thanks