AppCode Hangs a lot

已回答

I've had a lot of issues with AppCode over the last year or so hanging a lot. It appears to be getting worse, not better. This hang was after a forced OS security update, and AppCode was attempting to reindex my code. While OS updates are a relatively rare occurrence, these types of hangs happen several times a day, often when I switch Git branches from an external terminal and reindexing begins. 


Linked are a spindump and sample of the hang: https://gist.github.com/dwabyick/61bf0607d8df5dc487bd1ef7495b5343

7

I came here to write a post on this - I'm getting the same thing, but will post a specific set of details around this as well.

0
Avatar
Permanently deleted user

Hi guys,

Could you try 2017.3 RC and see if the same problem is actual there?

In general, I'd recommend trying to increase -Xmx value via Custom VM Options (to, say, 4000m or so). In case it doesn't help, please report issue in our tracker and include zipped contents of Logs folder (Help | Show Logs in Finder), CPU snapshot at the time of hang (better to have snapshot duration > 30sec).

0

That will just allow it to use up more RAM... which might solve the performance issue (or not), but the memory usage is one of the main issues.

0
Avatar
Permanently deleted user

Would it be possible to capture memory snapshot as well then? Please note: memory snapshots might contain sensitive data (source code) from the project. We'd take a look which process specifically eats memory in your case.

0

I don't want to go EAP right now, but I'll try upping the memory.  I'll take a look at a memory snapshot if it happens again. 

0

I also am having this problem. 

  • 2013 Mac Pro
  • 64GB RAM

I increased the RAM footprint quite a bit which made it go from unusable to usable (and after the spin dump increased it to 16GB but still occurs), however it still frequently goes colorful wheel and hangs for a few minutes until it completes whatever it's doing which really kills productivity unfortunately. Examples that have triggered this

  • Help>Search Infrequently this will hang
  • Stop debugging If the debugged app crashes AppCode will sometimes spin for some time
  • Right click Saw it just doing a right click in a source code window
  • Random click around the menu structure, frequent
  • Unknown Randomly it will freeze and spin for no apparent reason

 

On debugging I did try Instrumenting it to see what it was doing but the tool wasn't able to get anything without kdebug_signpost(), but here is a spindump Gist I created while it hung. This occurred by just clicking around the menus.

Related issue: ^Space (auto complete) is a frequent problem where it sits and spins, I'd rather have it preload the symbols for everything ideally on startup. 

 

Options:

-Xss2m
-Xms2000m
-Xmx6000m
-XX:NewSize=128m
-XX:MaxNewSize=128m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none

-XX:ErrorFile=$USER_HOME/java_error_in_appcode_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_appcode.hprof
-Xbootclasspath/a:../lib/boot.jar
-Dide.no.platform.update=true
0
Avatar
Permanently deleted user

This started like good IDE for objective-c, now it looks like its submerging, common guys ? I just tried removing everything from my system related to IDE, re-installed latest EAP and the same , I want paste text to editor and I can get a cup of cafe, then it works for a while but then sometimes this same.. looks like its eating really much resources, es incomparable with android studio, that runs really smooth with kotlin and java, but for sure this was not like this 3 years ago when it worked quite good, before adding of swift support i think...

1
Avatar
Permanently deleted user

Dohan, 

Which -Xmx value are you using? Could you check if increasing it helps (per comment above). In case it doesn't - it would be really helpful if you submit an issue in our tracker and attach CPU snapshot that corresponds to the problem with pasting text that you mentioned. Surely, due to Swift and its interoperability with Objective-C, IDE now needs more memory to process all the symbols from both langs, but such situation as you described is not normal and we'd really like to investigate it if you provide more info.

0

I, too, am having this issue—with most of the latest versions of AppCode, including 2018.3.4, and 2019.1 EAP. What is similarly annoying is when AppCode gets stuck "Preparing Build", and then I click the X button to cancel, and it get's stuck "Stopping Build"... after this no more builds are possible until I restart AppCode, allow it to rebuild indexes, etc. which is a huge waste of time.

See screenshot below (which has been stuck like that for more than 5 minutes—I even got up and went for some coffee, but no avail).

 

And, yes, I have tweaked -Xmx, etc. as follows:

```

-Xss2m
-Xms512m
-Xmx4096m
-XX:NewSize=128m
-XX:MaxNewSize=128m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-Dfile.encoding=UTF-8

```

 

0

I should also add that this occurs just as frequently with 2018.3.4 as with the EAP builds.

0

More of the same: 

 

0
Avatar
Permanently deleted user

@Stuartro,

Please use tracker rather than forum to report issues. Please attach logs (Help | Show Log in Finder) after reproducing the problem and capture CPU snapshot.

0

请先登录再写评论。