News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

The 16 January 2010 build (6088) is out.

Started by killerbot, January 17, 2010, 09:18:01 AM

Previous topic - Next topic

sbezgodov

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.

Micool121

build 6088: class functions parameters are not parsed anymore :

for example:

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...

ollydbg

Quote from: jens on January 19, 2010, 12:23:39 PM
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.

ollydbg

#63
Quote from: Micool121 on January 21, 2010, 12:01:36 AM
build 6088: class functions parameters are not parsed anymore :

for example:

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:

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:

* 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]
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.

ollydbg

Quote from: sbezgodov 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.


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.

sbezgodov

#65
Quote from: ollydbg on January 21, 2010, 02:25:43 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]

Jenna

Quote from: sbezgodov on January 21, 2010, 10:38:22 AM
Quote from: ollydbg on January 21, 2010, 02:25:43 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.

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.

ollydbg

@jens and sbezgodov
I read some source code about the m_IsLocal.
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.

MortenMacFly

Quote from: ollydbg on January 21, 2010, 04:00:09 PM
            // 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

I think I found the cause for the local workspace bug, this patch should correct it:
--- 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:
    Parse(filename, flags == 0, loader); // isLocal = (flags==0)

@Morten:
please have a look.

MortenMacFly

Quote from: jens on January 21, 2010, 09:14:34 PM
@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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

@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.

MortenMacFly

Quote from: ollydbg on January 22, 2010, 02:28:25 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Loaden

#73
SVN6110, wxSmith
..\..\..\include\cbstyledtextctrl.h|9|error: wx/wxscintilla.h: No such file or directory|

lost search path
..\..\..\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|

fprijatelj

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