Author Topic: The 16 January 2010 build (6088) is out.  (Read 132495 times)

Offline sbezgodov

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: The 16 January 2010 build (6088) is out.
« Reply #60 on: January 20, 2010, 01:53:07 pm »
I have following bug. When class browsers filter is "All local symbols (Workspace)", you can see that symbol list is same as using "Everything" filter. Is doesn't depend on projects quantity in workspace.
rev.6088 and rev.6080 has this bug, but rev.6023 nighty build works fine.

Can anyone confirm? Thanks.

Offline Micool121

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: The 16 January 2010 build (6088) is out.
« Reply #61 on: January 21, 2010, 12:01:36 am »
build 6088: class functions parameters are not parsed anymore :

for example:

Code: [Select]
spsysModelSystem * xmlInterface::parseSystem(QDomElement element)
{
    int i;
    systLayout * defaultLayout;
    QDomElement defLayoutElmt = element.firstChildElement("systLayout");

....
}
QDomElement class is not recognised anymore for "element"... it worked in previous build...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5239
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 16 January 2010 build (6088) is out.
« Reply #62 on: January 21, 2010, 01:10:02 am »
Would it be possible to remember the last x search results if no reparsing has been done in the meantime and first search in the results-list (map or whatever is the best for this purpose) ?
After reparsing this list should be either cleared or updated.
hi, jens, i am not fully understand what is this suggestion means. we always do a search under a scope, so different search keywords have different scopes, how can we remember the search result?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5239
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 16 January 2010 build (6088) is out.
« Reply #63 on: January 21, 2010, 02:20:51 am »
build 6088: class functions parameters are not parsed anymore :

for example:

Code: [Select]
spsysModelSystem * xmlInterface::parseSystem(QDomElement element)
{
    int i;
    systLayout * defaultLayout;
    QDomElement defLayoutElmt = element.firstChildElement("systLayout");

....
}
QDomElement class is not recognised anymore for "element"... it worked in previous build...

It works fine here on my own build rev 6091. You can see the screen shot below, with the test code:
Code: [Select]
class QDomElement
{
public:
    int aaaaa;
    int bbbbb;
};


spsysModelSystem * xmlInterface::parseSystem(QDomElement element)
{
    int i;
    systLayout * defaultLayout;
    QDomElement defLayoutElmt = element.
}


Edit
See the log of rev 6091 in trunk:

Code: [Select]
* CC: fixed bug with not parsing function arguments anymore (thanks OllyDbg)
So, I think it has already fixed in the trunk. So you can build your own C::B, or wait a moment for the next nightly build.


[attachment deleted by admin]
« Last Edit: January 21, 2010, 02:24:27 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5239
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 16 January 2010 build (6088) is out.
« Reply #64 on: January 21, 2010, 02:25:43 am »
I have following bug. When class browsers filter is "All local symbols (Workspace)", you can see that symbol list is same as using "Everything" filter. Is doesn't depend on projects quantity in workspace.
rev.6088 and rev.6080 has this bug, but rev.6023 nighty build works fine.

Can anyone confirm? Thanks.


If you supply a simple test case, I will test for you. Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline sbezgodov

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: The 16 January 2010 build (6088) is out.
« Reply #65 on: January 21, 2010, 10:38:22 am »
If you supply a simple test case, I will test for you. Thanks.

Just open hello world project or CB ContribPlugins workspace and you will see it when parsing is done. Look at attached images.
There is also TokenMatchesFilter() function in class browser, but seems that it was not changed in latest revisions. I think that token's m_IsLocal flag is not correctly set. What is the meaning of this flag? Seems it determines file is found in workspace or not.

[attachment deleted by admin]
« Last Edit: January 21, 2010, 10:52:40 am by sbezgodov »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: The 16 January 2010 build (6088) is out.
« Reply #66 on: January 21, 2010, 01:32:30 pm »
If you supply a simple test case, I will test for you. Thanks.

Just open hello world project or CB ContribPlugins workspace and you will see it when parsing is done. Look at attached images.

Confirmed on linux.

This bug might be related to another issue, where the ide is unaccessible for some seconds on startup.
At least if the symbols-browser normally shows "All local symbols", and now shows "Everything" instead, because loading into the symbols-browser takes much longer and locks the IDE until it's finished.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5239
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 16 January 2010 build (6088) is out.
« Reply #67 on: January 21, 2010, 04:00:09 pm »
@jens and sbezgodov
I read some source code about the m_IsLocal.
Code: [Select]
void ParserThread::HandleIncludes()
{
    wxString filename;
    bool isGlobal = !m_IsLocal;
    wxString token = m_Tokenizer.GetToken();
    // now token holds something like:
    // "someheader.h"
    // < and will follow iostream.h, >
    if (TestDestroy())
        return;

    if (!token.IsEmpty())
    {
        if (token.GetChar(0) == '"')
        {
            // "someheader.h"
            // don't use wxString::Replace(); it's too costly
            size_t pos = 0;
            while (pos < token.Length())
            {
                wxChar c = token.GetChar(pos);
                if (c != _T('"'))
                    filename << c;
                ++pos;
            }
        }
        else if (token.GetChar(0) == '<')
        {
            isGlobal = true;
            // next token is filename, next is . (dot), next is extension
            // basically we'll loop until >
            while (1)
            {
                token = m_Tokenizer.GetToken();
                if (token.IsEmpty())
                    break;
                if (token.GetChar(0) != '>')
                    filename << token;
                else
                    break;
            }
        }
    }

    if (!filename.IsEmpty())
    {
        TRACE(F(_T("HandleIncludes() : Found include file '%s'"), filename.wx_str()));
        do
        {
            // setting all #includes as global
            // it's amazing how many projects use #include "..." for global headers (MSVC mainly - booh)
            isGlobal = true;

            if (!(isGlobal ? m_Options.followGlobalIncludes : m_Options.followLocalIncludes))
                break; // Nothing to do!

            wxString real_filename = m_pParent->GetFullFileName(m_Filename, filename, isGlobal);
            // Parser::GetFullFileName is thread-safe :)

            if (real_filename.IsEmpty())
                break; // File not found, do nothing.

            {
                wxCriticalSectionLocker lock(s_MutexProtection);
                if (m_pTokensTree->IsFileParsed(real_filename))
                    break; // Already being parsed elsewhere
            }

            TRACE(F(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str()));
            // since we 'll be calling directly the parser's method, let's make it thread-safe
            {
                wxCriticalSectionLocker lock2(s_mutexListProtection);
                m_pParent->DoParseFile(real_filename, isGlobal);
            }
        } while (false);
    }
}

So, most Tokens in header files should be global (not local), only files belong to the workspace is local. Is there something wrong in handling include files?...
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: The 16 January 2010 build (6088) is out.
« Reply #68 on: January 21, 2010, 05:26:03 pm »
Code: [Select]
            // setting all #includes as global
            // it's amazing how many projects use #include "..." for global headers (MSVC mainly - booh)
            isGlobal = true;
That makes it quite clear: We set all files to global as usually there is no strict usage of <> and "". So if we are strict users (of MSVC) will complain.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: The 16 January 2010 build (6088) is out.
« Reply #69 on: January 21, 2010, 09:14:34 pm »
I think I found the cause for the local workspace bug, this patch should correct it:
Code: [Select]
--- tmp/tmpVBbR0I-meld/parser.cpp
+++ home/jens/codeblocks-build/codeblocks.trunk/src/plugins/codecompletion/parser/parser.cpp
@@ -964,7 +964,7 @@
         return;
 
     LoaderBase* loader = 0; // defer loading until later
-    Parse(filename, isGlobal, loader);
+    Parse(filename, !isGlobal, loader);
 }
 
 void Parser::StartStopWatch()

The old line was:
Code: [Select]
    Parse(filename, flags == 0, loader); // isLocal = (flags==0)
@Morten:
please have a look.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: The 16 January 2010 build (6088) is out.
« Reply #70 on: January 22, 2010, 11:10:24 am »
@Morten:
please have a look.
That seems correct... hmmm... another bug introduced by me when actually simplifying things. I should be more careful. I'll commit the collected bug fixes in a minute.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5239
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 16 January 2010 build (6088) is out.
« Reply #71 on: January 22, 2010, 02:28:25 pm »
@morten:
Current SVN still failed in parsing VC++ headers.
See here and the patch: Re: The 16 January 2010 build (6088) is out. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: The 16 January 2010 build (6088) is out.
« Reply #72 on: January 22, 2010, 02:44:31 pm »
@morten:
Current SVN still failed in parsing VC++ headers.
I know. However, I am hardly trying to commit. But BerliOS doesn't let me at the moment. Access is not granted and won't be for some time. I don't know when I am able to commit again.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 16 January 2010 build (6088) is out.
« Reply #73 on: January 24, 2010, 06:15:16 am »
SVN6110, wxSmith
..\..\..\include\cbstyledtextctrl.h|9|error: wx/wxscintilla.h: No such file or directory|

lost search path
Code: [Select]
..\..\..\sdk\wxscintilla\include
wxSmith - Aui
D:\CodeBlocks\src\plugins\contrib\wxSmithAui\wxSmithAui.cpp|1|warning: ..\..\..\include/sdk.h.gch: not used because `CB_PRECOMP' not defined|
« Last Edit: January 24, 2010, 06:49:36 am by Loaden »

Offline fprijatelj

  • Single posting newcomer
  • *
  • Posts: 2
Re: The 16 January 2010 build (6088) is out.
« Reply #74 on: January 24, 2010, 10:27:56 am »
Hi

My platform   win-XP

1. Build, or Rebuild, looses my ENVIRONMENT settings.
If I go to Project/Properties/EnvVars and click ok  and then  run program everything is OK.
After new build, I have to repeat the upper procedure.

2. QT4 Project has only mingw option.
   From 4.6 Nokia distributes both mingw and MSVC versions of lib.


BRGS
Franček