FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Annoying freezes

 
Post new topic   Reply to topic     Forum Index -> Visual D
View previous topic :: View next topic  
Author Message
awishformore



Joined: 03 Sep 2008
Posts: 17

PostPosted: Tue Jul 13, 2010 4:05 am    Post subject: Annoying freezes Reply with quote

Hey.

I've been working with VisualD for a while now, and I'm rather happy overall. There is however one big issue that keeps bugging me.

Frequently, when I press ENTER at the end of closed braces, the end of file, most of the time behind the last statement, VS 2010 freezes for 1-2 minutes before coming back with a "External component has throw an exception" message.

I don't know how to reliably reproduce it or why it is happening, but it totally kills any flow of work Sad.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Tue Jul 13, 2010 11:57 pm    Post subject: Re: Annoying freezes Reply with quote

Hi,

awishformore wrote:
Frequently, when I press ENTER at the end of closed braces, the end of file, most of the time behind the last statement, VS 2010 freezes for 1-2 minutes before coming back with a "External component has throw an exception" message.

I don't know how to reliably reproduce it or why it is happening, but it totally kills any flow of work Sad.


Do you have very large files? Typing curly braces invokes looking for matching braces, and maybe something goes wrong there.

I don't experience freezes but notice a short delay when typing '}' at the end of 10000 lines of code (VS2008 on XP). What OS are you working on (32/x64)?

Maybe, a process dump might help. To create it, run procdump (http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx) while VS is freezed like this

Code:
procdump devenv.exe


procdump should then write a file "devenv.dmp", that you can send to me: r.sagitario at gmx.de

Rainer
Back to top
View user's profile Send private message
awishformore



Joined: 03 Sep 2008
Posts: 17

PostPosted: Thu Jul 15, 2010 3:41 pm    Post subject: Reply with quote

Hey.

It actually just happened again, in a 7 line file where I just created a new class.

It almost always happens when I add a new line with ENTER after the last closing curly brace inside the class, but before the final closing curly brace of the class itself.

Code:
class CircularBuffer(T)
{
   private:
      T[] container;
      uint index = 0;
   
   public:
      this(int size = 16)
      {
         container = new container[size];
      }// insert new line here = freeze
}


I will try to provide a process dump asap.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Fri Jul 16, 2010 10:44 am    Post subject: Reply with quote

I could not reproduce it with your code snippet. Is it reproducable for you?

If it happens when hitting ENTER, it might have to do with smart indentation. You can disable it in the text editor settings for D.
Back to top
View user's profile Send private message
awishformore



Joined: 03 Sep 2008
Posts: 17

PostPosted: Sun Jul 18, 2010 11:55 am    Post subject: Reply with quote

Hello again.

I will try disabling the smart indentation.

I just wanted to let you know that I was working in D the whole day today and never had any problem. Then, I wanted to test what I had been working on and it was back. After a mere 3 freezes, the memory usage of VS was up to over 3.7GB(!). Here is the exact code that caused the issue:

Code:
import entity;

import sqliteconnector;

void main()
{
   LogManager log_mgr;
   log_mgr.setLevel(LogManager.DEBUG);
   
   log_mgr.log(LogManager.ALWAYS, "NEXUNITY SERVER PROTOTYPE...");
   
   JobManager job_mgr = new JobManager();
   EntityManager ent_mgr = new EntityManager();
   PhysicsManager phy_mgr = new PhysicsManager(ent_mgr, job_mgr);
   
   log_mgr.log(LogManager.ALWAYS, "STARTUP SEQUENCE COMPLETE!");
   
   for(int i = 0; i < 1000000; i++)
   {
      ent_mgr.addEntity(new Entity());
   }
   
   // TEST SQLITE
   SQLiteConnector db = new SQLiteConnector();
   
       <- I was inserting new lines here to code the test
}


If it happens again with smart indentation gone, I will repeat it on purpose to get you your dump Wink.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Mon Jul 19, 2010 12:57 am    Post subject: Reply with quote

Do you know if the memory usage was "normal" before the freezes?

If Visual D is continuously wasting memory, it very much looks like there are issues with false pointers or other leaks that keep the garbage collector from reclaiming memory.

The freezes might be memory collections going through tons of small allocations.
Back to top
View user's profile Send private message
awishformore



Joined: 03 Sep 2008
Posts: 17

PostPosted: Mon Jul 19, 2010 7:06 pm    Post subject: Reply with quote

Hey.

I'm quite sure that the memory usage was normal before the first freeze and increased by a lot every time it froze. So i looks like the memory leaking is happening during the freeze and is caused by whatever that "external" program is.

The problem is completely gone when smart indentation is turned off, and incidentally, I like that much better anyway. If you would still like some sort of information (the dump, anything else), let me know and I'll try to provide it.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Wed Jul 21, 2010 11:33 am    Post subject: Reply with quote

Hi,


awishformore wrote:
The problem is completely gone when smart indentation is turned off, and incidentally, I like that much better anyway. If you would still like some sort of information (the dump, anything else), let me know and I'll try to provide it.


I wasn't expecting that it would be possible to actually narrow it down to the smart indentation. If that's the case, getting rid of the problem would be nice and looks like it should be possible. I tried different indentation/tab settings, but could not reproduce it (what are yours?). So a dump would be nice...

Rainer
Back to top
View user's profile Send private message
beezir



Joined: 17 Mar 2009
Posts: 3

PostPosted: Sun Jul 25, 2010 12:02 am    Post subject: Reply with quote

I've had this exact problem a few times. It seems completely unpredictable - sometimes I can write out a very basic class and it'll happen, other times I can go for hours with nothing, even though I'm doing the same behavior. It's very hard for me to reproduce. Fills up 4GB of memory and the swap space starts thrashing. I'll try to trigger the behavior again, but no promises. Wink
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Mon Jul 26, 2010 1:26 am    Post subject: Reply with quote

Please have procdump ready (e.g. putting a link with the prepared command line on the desktop) for making a process dump while Visual Studio is freezed...
Back to top
View user's profile Send private message
Extrawurst



Joined: 14 Mar 2007
Posts: 41

PostPosted: Thu Aug 05, 2010 9:11 am    Post subject: Reply with quote

i encountered the same problem in VS 2010 ( did not happen at all in VS2005 ) and the freezes always make devenv.exe eat all my memory (up to ~3gig) until it shows the exception message box. after that the IDE keeps being a fat lazy bitch and has to be restarted.
Does not seem to be very trivial to reproduce as it just happend a few times in a row (when i started a new project -> just a few lines and modules of code) and when i was ready to fire up procdump it did not happen anymore Wink

but stay tuned, as soon as it happens again i give you the dump.
Back to top
View user's profile Send private message
Extrawurst



Joined: 14 Mar 2007
Posts: 41

PostPosted: Fri Aug 06, 2010 6:32 am    Post subject: Reply with quote

Extrawurst wrote:
but stay tuned, as soon as it happens again i give you the dump.


ok i got it. i created ticket #12 but the dump is too big for an attachment there, so i mail it to you.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Fri Aug 06, 2010 12:38 pm    Post subject: Reply with quote

With the help of the process dump from Extrawurst, I think I have tracked this down.

I have uploaded a preliminary version 0.3.15 to the download folder, please try it.

Rainer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Visual D All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group