Author Topic: CC plugin interface redesign  (Read 154176 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #60 on: September 29, 2013, 05:36:33 pm »
My data seems to conflict with itself.  Using wxStopWatch, pass by reference is on average 1366.13 ms, and return value is 1423.27 ms.  However, the when I measured just the cost of creating a copy, wxStopWatch mostly reported 1 ms, implying the two techniques have no appreciable difference.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC plugin interface redesign
« Reply #61 on: September 29, 2013, 05:46:52 pm »
Probably RVO or NVRO optimizations are kicking in...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #62 on: October 05, 2013, 03:20:56 am »
Moving
Code
void CodeCompletion::OnAutocompleteSelect(wxListEvent& event)
from CC to CCManager causes a crash whenever timer.Start() is called from within it.  I have tried for several hours to find a cause and am out of ideas to try; thoughts?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC plugin interface redesign
« Reply #63 on: October 05, 2013, 11:02:58 am »
Have you tried running C::B with valgrind?  ::)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC plugin interface redesign
« Reply #64 on: October 05, 2013, 11:11:56 am »
Moving
Code
void CodeCompletion::OnAutocompleteSelect(wxListEvent& event)
from CC to CCManager causes a crash whenever timer.Start() is called from within it.  I have tried for several hours to find a cause and am out of ideas to try; thoughts?
Can you provide a patch, where the crash occurs, so I can try to debug it.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #65 on: October 05, 2013, 04:26:10 pm »
Have you tried running C::B with valgrind?  ::)
Not tried valgrind yet, but I will now.

Can you provide a patch, where the crash occurs, so I can try to debug it.
Attached is the current state of my code; I could try to minimize the other changes if you would like (however, the crash happens before control reaches any other new code, so I did not bother currently).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC plugin interface redesign
« Reply #66 on: October 05, 2013, 05:53:31 pm »
Against which revision, branch or fork is the patch ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC plugin interface redesign
« Reply #68 on: October 05, 2013, 06:41:38 pm »
I already cloned alphas github repo, but there is no ccmanager.{h|cpp} inside it.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #69 on: October 05, 2013, 07:14:05 pm »
Did you switch to the cc_interface branch?  The files should be there.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #70 on: October 05, 2013, 07:16:16 pm »
Have you tried running C::B with valgrind?  ::)
Not tried valgrind yet, but I will now.
Tested, and got something around 2700 messages.  I could not find any that had an obvious relation to this problem, though.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC plugin interface redesign
« Reply #71 on: October 05, 2013, 07:35:15 pm »
Did you switch to the cc_interface branch?  The files should be there.
I have it now, thanks.

I will see if I can find anything this evening.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC plugin interface redesign
« Reply #72 on: October 06, 2013, 12:58:57 am »
You need to specify the eventsink in the Connect-function, otherwise the editor-control is used as eventsink, because you connect the event to it.
The correct function is called, but with an incorrect this-pointer and therefore the member variable that holds the timer also points to an incorrect location.
Instead of using the timer some undefined memory that belongs to the editor-control is used => crash.

Just add NULL, this to the parameter list of Connect (and Disconnect) in CCManager::OnEditorOpen ( and CCManager::OnEditorClose).
I'm not sure if it is really needed for Disconnect, but it does not hurd.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC plugin interface redesign
« Reply #73 on: October 06, 2013, 02:02:39 am »
Thank you!  Greatly appreciated.  (I cannot believe I missed that... in fact, I was so certain I had tried it, and just about everything else.  Maybe I was just coding too late at night :-\.)

Auto parenthesis after functions is now reimplemented.  The only major visible component left to complete is the documentation popup.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC plugin interface redesign
« Reply #74 on: October 06, 2013, 02:30:20 am »
What about the symbol browser? Have it been separated from the CC plugin?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]