Author Topic: some issues and requests  (Read 42915 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: some issues and requests
« Reply #30 on: September 08, 2010, 02:08:17 pm »
In both cases the trace log is useless unfortunately.
When I say this I mean that it fails in the wxwidgets DLL like this:
wxStringBase13GetStringDataEv        
wxStringBase6lengthEv                
wxStringBase5emptyEv                  
xStringBaseC2ERKS_                    
wxFileName9GetVolumeEv                
wxFileName7GetPathEi12wxPathFormat    
wxFileName11GetFullPathE12wxPathFormat

...but coming from codecompletion:

nativeparser.cpp (int NativeParser::FindCurrentFunctionStart(ccSearchData* searchData, wxString* nameSpace, wxString* procName, int caretPos)):
size_t num_results = m_pParser->FindTokensInFile(searchData->pf->file.GetFullPath(), result, tkAnyFunction | tkClass);

called from:

nativeparser.cpp (NativeParser::FindCurrentFunctionToken(ccSearchData* searchData, TokenIdxSet& result, int caretPos)):
if (procName.IsEmpty())

etc...

That isn't very clear to me...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #31 on: September 08, 2010, 03:03:21 pm »
I have to say I have seen very nice improvements on the cc branch. It is really way better then before :-)
Congratulations to the cc gurus !!!
True, however, I am still facing random crashes. Unfortunately not always. They are of two kinds:
1.) a compiler error occurs and the file in question is opened by C::B automatically. Result: C::B either crashes or freezes. This happens to me often for winbase.h and/or cstdint (the latter only when NOT using the C0XX compiler switch).
2.) a compiler warning/note occurs in the logs and I click on e.g. a note which opens the file in question, too. Result is the same as above but it'll always crash, not freeze.

In both cases the trace log is useless unfortunately. In both cases it works when having CC disabled.

I told Loaden about this but unfortunately he cannot reproduce. He sent me a patch I should try for a solution (actually related to refactoring), but it didn't work.

So: Is it only me or can anybody else reproduce this, too? I am using SVN HEAD of the CC branch, no additional things.
Hi, Morten, can you trying this patch? (Only for testting)
Change Log:
Quote
1, add code re-factoring feature, support "Find reference" and "Rename symbols".
2, fix a bug cc will hang when create a project by wizard.
3, improve re-parsing of up-front header files, increase some performance.
4, add filter when parsing source files, .xrc  .xml files were not parsed.
5, real-time parsing does not parse system header files.
6, optimize the ui performance when opening several editors, special handling for wx2.8.11.
7, re-factor the CC search function, (use SearchData type instead of cbEditor)
8, optimize the UI performance after batch parse finishes, some tasks were moved from main thread to child thread.
9, add an menu entry of "Reparse this file"
10, add an menu entry of "Reparse current project", and improve Re-parsing project functionality
11, change the short-key to do the codecompletion from Ctrl+SPACE to Shift+SPACE, because in Chinese,Japanese or Korean System, Ctrl+SPACE is always used to switch IME.
12, fix switch parser delay when editor actived
13, improve switch parser

2010-09-09 10:12:53 Update: delete the attachment.
« Last Edit: September 09, 2010, 04:16:04 am by Loaden »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #32 on: September 08, 2010, 03:14:45 pm »
BUT when I position the cursor between 2 functions, the toolbar doesn't show a function [acceptable since we are in between functions], BUT the drop down list is empty. Since I was still at the global scope, the dropdown list should still contain all the functions. Right ?
I will checking, and try to fix.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: some issues and requests
« Reply #33 on: September 08, 2010, 03:59:12 pm »
Hi, Morten, can you trying this patch? (Only for testting)
I'll give it a try... Probably any volunteers should do the same.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #34 on: September 09, 2010, 04:17:48 am »
BUT when I position the cursor between 2 functions, the toolbar doesn't show a function [acceptable since we are in between functions], BUT the drop down list is empty. Since I was still at the global scope, the dropdown list should still contain all the functions. Right ?
I will checking, and try to fix.
Fixed!

All change log:
Quote
1, add code re-factoring feature, support "Find reference" and "Rename symbols".
2, fix a bug cc will hang when create a project by wizard.
3, improve re-parsing of up-front header files, increase some performance.
4, add filter when parsing source files, .xrc  .xml files were not parsed.
5, real-time parsing does not parse system header files.
6, optimize the ui performance when opening several editors, special handling for wx2.8.11.
7, re-factor the CC search function, (use SearchData type instead of cbEditor)
8, optimize the UI performance after batch parse finishes, some tasks were moved from main thread to child thread.
9, add an menu entry of "Reparse this file"
10, add an menu entry of "Reparse current project", and improve Re-parsing project functionality
11, change the short-key to do the codecompletion from Ctrl+SPACE to Shift+SPACE, because in Chinese,Japanese or Korean System, Ctrl+SPACE is always used to switch IME.
12, fix switch parser delay when editor actived
13, improve switch parser
14, fix crash when show call tip in *NONE* project file.
15, fix global scope update error

2010-09-10 15:58:41 Update: delete the attachment.
« Last Edit: September 10, 2010, 10:01:38 am by Loaden »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #35 on: September 09, 2010, 04:20:25 am »
Hi, Morten, can you trying this patch? (Only for testting)
I'll give it a try... Probably any volunteers should do the same.
If there have any crash report, please show me, thanks!

About V32 patch:
Based on the V31, just modify the codecompletion.cpp file.
« Last Edit: September 09, 2010, 04:22:15 am by Loaden »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: some issues and requests
« Reply #36 on: September 09, 2010, 04:54:10 am »
BUT when I position the cursor between 2 functions, the toolbar doesn't show a function [acceptable since we are in between functions], BUT the drop down list is empty. Since I was still at the global scope, the dropdown list should still contain all the functions. Right ?
I will checking, and try to fix.
Fixed!

All change log:
Quote
1, add code re-factoring feature, support "Find reference" and "Rename symbols".
2, fix a bug cc will hang when create a project by wizard.
3, improve re-parsing of up-front header files, increase some performance.
4, add filter when parsing source files, .xrc  .xml files were not parsed.
5, real-time parsing does not parse system header files.
6, optimize the ui performance when opening several editors, special handling for wx2.8.11.
7, re-factor the CC search function, (use SearchData type instead of cbEditor)
8, optimize the UI performance after batch parse finishes, some tasks were moved from main thread to child thread.
9, add an menu entry of "Reparse this file"
10, add an menu entry of "Reparse current project", and improve Re-parsing project functionality
11, change the short-key to do the codecompletion from Ctrl+SPACE to Shift+SPACE, because in Chinese,Japanese or Korean System, Ctrl+SPACE is always used to switch IME.
12, fix switch parser delay when editor actived
13, improve switch parser
14, fix crash when show call tip in *NONE* project file.
15, fix global scope update error

wonderful!! I will check it soon.
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 Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #37 on: September 10, 2010, 10:03:09 am »
Final test patch:
Quote
1, add code re-factoring feature, support "Find reference" and "Rename symbols".
2, fix a bug cc will hang when create a project by wizard.
3, improve re-parsing of up-front header files, increase some performance.
4, add filter when parsing source files, .xrc  .xml files were not parsed.
5, real-time parsing does not parse system header files.
6, optimize the ui performance when opening several editors, special handling for wx2.8.11.
7, re-factor the CC search function, (use SearchData type instead of cbEditor)
8, optimize the UI performance after batch parse finishes, some tasks were moved from main thread to child thread.
9, add an menu entry of "Reparse this file"
10, add an menu entry of "Reparse current project", and improve Re-parsing project functionality
11, change the short-key to do the codecompletion from Ctrl+SPACE to Shift+SPACE only for Chinese,Japanese or Korean system, because in Chinese,Japanese or Korean System, Ctrl+SPACE is always used to switch IME.
12, fix switch parser delay when editor actived
13, improve switch parser
14, fix crash when show call tip in *NONE* project file.
15, fix global scope update error
16, improve system header search thread

2010-09-12 11:45:12  Update: delete the attachment.
« Last Edit: September 12, 2010, 05:49:21 am by Loaden »

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: some issues and requests
« Reply #38 on: September 12, 2010, 04:30:57 am »
I  will dig into it this weekend。

I just dig into iterator definiton.and it is quite complicate. so I think our first job is to make cc support template inheritance.

such as
Code
class MyClass : public TempClass<wxString> {
T* getStr() { return m_string; }
};
tempate <typename T>
class TempClass {
T m_string;
};
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #39 on: September 12, 2010, 05:51:13 am »
I just dig into iterator definiton.and it is quite complicate. so I think our first job is to make cc support template inheritance.
Agree.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: some issues and requests
« Reply #40 on: October 23, 2010, 01:50:39 am »
Here are some problems I've found after I've tested the changes to the CC (I'm testing the debuggers branch)

1. "typedef struct { } struct_name;"  is parsed as __UNAMED_STRUCT_XXXX
2. __cplusplus and/or _GLIBCPP_USE_NAMESPACES are not define while parsing, so __BEGIN_NAMESPACE_STD is not defined correctly (see cdefs.h)
3. Add workspace symbols in the Symbols browser view combo
4. The class combo in the toolbar has :: at the end of the strings... pretty wrong!
5. Goto declaration goes to the start of the line not the start of the token
6. Goto declaration goes to the { of a function, when the declaration is an argument, should go to the start of the token
7. Combine 'Goto declaration and goto implementation' into one option and display popup menu with the possibilities (see Visual Assist)
8. Sometimes 'goto declaration' works but 'goto implementation' doesn't
9. No support for iterators' ->
9.1. No support for my custom smart pointer ->
10. No support for #define FACTORY_DECLARE(type, factory_typename)   typedef CFactory<type> factory_typename
11. No template parameters for templated classes in the Symbol Browser
12. Call tip for constructors still not working
13. Call tip sometimes don't show (pretty random)
14. There is no highlighted parameter in the calltip (sometimes)
15. Symbols browser is not updated after some text is typed and "Update parser when typing" = on (when probably, should be replace with while (native speaker correct me please))
16. namespace {} is not added to the Symbols browser

Have fun and good luck :)
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: some issues and requests
« Reply #41 on: October 23, 2010, 03:20:30 pm »
Also, I think the SDK versions should be increased...
(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 Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #42 on: October 23, 2010, 04:33:23 pm »
1. "typedef struct { } struct_name;"  is parsed as __UNAMED_STRUCT_XXXX
2. __cplusplus and/or _GLIBCPP_USE_NAMESPACES are not define while parsing, so __BEGIN_NAMESPACE_STD is not defined correctly (see cdefs.h)
3. Add workspace symbols in the Symbols browser view combo
1. This is the right way.
2. We can not distinguish between  C or C++, but __cplusplus just needed by C++, not C. We can not find the best way.
3. This is impossible! Because in current, a project per to a parser.
 :)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: some issues and requests
« Reply #43 on: October 23, 2010, 04:43:35 pm »
4. The class combo in the toolbar has :: at the end of the strings... pretty wrong!
5. Goto declaration goes to the start of the line not the start of the token
6. Goto declaration goes to the { of a function, when the declaration is an argument, should go to the start of the token
7. Combine 'Goto declaration and goto implementation' into one option and display popup menu with the possibilities (see Visual Assist)
4. Could you give me more explain?
5. In current, we record only the line number, but not the position.
6. Sorry, do not understood.
7. e.g. How to decision? void tes|t() { /* implement*/ }

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: some issues and requests
« Reply #44 on: October 23, 2010, 05:14:04 pm »
Quote
No support for my custom smart pointer ->

this should be supported now.
@oBFusCATed

can you give some test codes??
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?