Author Topic: The 11 october 2006 build is out.  (Read 35859 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 11 october 2006 build is out.
« Reply #30 on: October 13, 2006, 09:54:57 am »
When I do it like Tiwag said, I can reproduce it also.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 11 october 2006 build is out.
« Reply #31 on: October 13, 2006, 10:42:56 am »
Using the artoj's snippet, I can reproduce it in 3049, but not in 3074.

Tiwag's example fails in both revisions, but only if you are at the very end of the file (i.e. if you have a closing curly brace, it does not fail).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 11 october 2006 build is out.
« Reply #32 on: October 13, 2006, 11:04:08 am »
Code
Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 3074)
+++ nativeparser.cpp (working copy)
@@ -650,6 +650,10 @@
     {
         ++blockStart; // skip {
         int blockEnd = ed->GetControl()->GetCurrentPos();
+
+        if(blockStart >= blockEnd)
+            return false;
+
         wxString buffer = ed->GetControl()->GetTextRange(blockStart, blockEnd);
         buffer.Trim();
         if (!buffer.IsEmpty() && !parser->ParseBuffer(buffer, false, false, true))
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 11 october 2006 build is out.
« Reply #33 on: October 13, 2006, 11:56:45 am »
<snip>

Hmm... I applied your patch and the assert seems to be fixed, but:

Code
#include <iostream>

class TestClass
{
public:
TestClass();
~TestClass();
int TestMethod() { return 0; }
};

int main() {
TestClass* t = new TestClass();
|
return 0;
}

If I replace the pipe symbol with "t->" the code completion does not work (but I guess this is a different bug). If I again move the opening brace to new line, it works as expected.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 11 october 2006 build is out.
« Reply #34 on: October 13, 2006, 02:37:37 pm »
Code
Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 3074)
+++ nativeparser.cpp (working copy)
@@ -650,6 +650,10 @@
     {
         ++blockStart; // skip {
         int blockEnd = ed->GetControl()->GetCurrentPos();
+
+        if(blockStart >= blockEnd)
+            return false;
+
         wxString buffer = ed->GetControl()->GetTextRange(blockStart, blockEnd);
         buffer.Trim();
         if (!buffer.IsEmpty() && !parser->ParseBuffer(buffer, false, false, true))

will this be committed ?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 11 october 2006 build is out.
« Reply #35 on: October 13, 2006, 02:55:31 pm »
Quote
will this be committed ?

Allow me to check this issue first myself...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 11 october 2006 build is out.
« Reply #36 on: October 13, 2006, 02:56:38 pm »
If it works... feel free to commit it. :)

I don't know what the function in question is actually doing, but I stepped through it in the debugger until  the assert() fired off (which is in the line after my patch).
The watches window shows that blockEnd is at the last character of the file, and blockStart points beyond the end of the file. That doesn't make sense to me, and it is what triggers the assert(), too. So, no idea whether it is a good solution for the actual problem, but it avoids the assert error ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 11 october 2006 build is out.
« Reply #37 on: October 13, 2006, 03:06:33 pm »
I committed the fix.

Quote
If it works... feel free to commit it.

Well, excuse me but I can't trust "it works" from you since you admittedly never use this functionality ;).
As a matter of fact, your patch fixed the assert but disabled code-completion (for these cases), lol.
So, the patch to your patch :P is this:

Code
-        if(blockStart >= blockEnd)
-            return false;
+       if (blockStart >= blockEnd)
+            blockStart = blockEnd;
« Last Edit: October 13, 2006, 03:33:37 pm by mandrav »
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 11 october 2006 build is out.
« Reply #38 on: October 13, 2006, 03:09:01 pm »
aaaaaaaaaaah : excellent teamwork  :lol: :lol: :lol: :lol:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 11 october 2006 build is out.
« Reply #39 on: October 13, 2006, 04:30:55 pm »
Well, excuse me but I can't trust "it works" from you since you admittedly never use this functionality ;).
As it happens, I did, in order to pinpoint the location of the problem. And yes, I immediately regretted enabling CC again.  :)
Oh yes, and I did not say "it works". I said "I don't know what that function is supposed to do, but I got rid of the assert error"  :D That's why I did not commit it right away, but left for someone else to test.

I really wish one could actually use code completion. Believe me, I would use it if it was possible. However, turning on code completion practically makes the IDE unusable.  :lol:

It's not only about an occasional crash or an assertion, the annoying "freeze after save" and "freeze as you type" problems are back again, too. :(
« Last Edit: October 13, 2006, 04:32:47 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Maddin

  • Guest
Re: The 11 october 2006 build is out.
« Reply #40 on: October 13, 2006, 05:30:08 pm »
Thanks for the advanced tabbing!

But why is it that everytime I save a file the application totaly freezes for about 5 seconds?

EDIT: rev 3074 Windows Unicode
Code completion...

Is there any way to give the parsing thread lower priority?

EDIT:
Quote
However, turning on code completion practically makes the IDE unusable.  Laughing

oh ... then you have allready answered my question
« Last Edit: October 13, 2006, 05:32:12 pm by Maddin »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 11 october 2006 build is out.
« Reply #41 on: October 13, 2006, 05:34:32 pm »
Quote
It's not only about an occasional crash or an assertion, the annoying "freeze after save" and "freeze as you type" problems are back again, too.

Quote
Is there any way to give the parsing thread lower priority?

Because everybody has his own opinions on things, allow me to clear this up:
The freeze has nothing to do with the parser threads. The freeze is for the symbols view to be updated. Although this should be running in its own thread, something is obviously wrong there. I 'm planning to fix it but I have to boot to Linux. So you have to wait until the weekend...
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: The 11 october 2006 build is out.
« Reply #42 on: October 13, 2006, 08:24:56 pm »
I really wish one could actually use code completion. Believe me, I would use it if it was possible...

aaarrrrgh ! you should try it for a while instead of %&$§"§$%/(& ' ing

CC is usable, with all limitations, but it is a great help.
i like it and enjoy it that it gets better and better ...

szaszafrasz

  • Guest
Re: The 11 october 2006 build is out.
« Reply #43 on: October 17, 2006, 09:40:25 am »
A bug: file/import project/  "any" .
For example: when I try import "aabbcc.dsp", it says "aabbbcc.cbp" not found.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 11 october 2006 build is out.
« Reply #44 on: October 17, 2006, 11:22:41 am »
A bug: file/import project/  "any" .
For example: when I try import "aabbcc.dsp", it says "aabbbcc.cbp" not found.

Try File->Open
Be patient!
This bug will be fixed soon...