Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
SVNInside : development of another SVN plugin for CodeBlocks
thomas:
--- Quote from: killerbot on October 10, 2007, 01:33:47 pm ---I must say I have seen a ClearCase command not returning in the wxExecute call, and indeed then the GUI of CB is locked. But overall I found it working ok.
--- End quote ---
It is like everything in wxWidgets, it looks like it is working ok at first. But then, you get random crashes that you can't explain, and after weeks, you find out it only happnens when you have more than 127 commandline parameters. So you look at the code and find that wxExecute stores them in a static array that's hardcoded to 127 entries... leaving it to chance whether the 128th or 129th write will cross a page boundary and give a segfault...
JGM:
--- Quote from: thomas on October 10, 2007, 01:50:02 pm ---So you look at the code and find that wxExecute stores them in a static array that's hardcoded to 127 entries... leaving it to chance whether the 128th or 129th write will cross a page boundary and give a segfault...
--- End quote ---
Well, is good to know the perspective of someone who has a more advanced experience using this function, and knows the resulting problems from different situations.
There should be a fix then or a different way to work with the function to stop or suppress as much possible problems.
Keyla:
Wow thanks for your commitment!
orel:
--- Quote from: JGM on October 10, 2007, 02:43:42 pm ---Well, is good to know the perspective of someone who has a more advanced experience using this function, and knows the resulting problems from different situations.
--- End quote ---
I totally agree with that. It will save me a lot of troubles, trying something to get something to work when i already have a working solution for this problem, ok a windows-only one.
--- Quote from: thomas on October 10, 2007, 12:42:38 pm ---I've written a replacement class with a Windows implementation, and Jonas Thedering contributed the POSIX implementation. Somehow, nobody was really interested in it, and no one would even wager to look at it, so... that thing is still in the attic (for nearly 2 years now).
--- End quote ---
I didn'h hear about that and would be glad to look at your windows and posix substitutions for wxExecute.
--- Quote from: thomas on October 10, 2007, 12:42:38 pm ---I had implemented a Subversion plugin for RC2 that worked exactly the way Orel described
--- End quote ---
I would also be glad to look at this.
orel:
--- Quote from: MortenMacFly on October 10, 2007, 10:51:38 am ---
I have changed the code to the foillowing which works OK:
--- Code: --- // get item data
SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
if (ptr)
{
pdata = static_cast<SVNTreeItemData*>(ptr);
}
if (!pdata) return 0;
[...]
--- End code ---
This may make sense, too:
--- Code: --- // get item data
SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
if (!ptr) return 0;
else
{
pdata = static_cast<SVNTreeItemData*>(ptr);
}
if (!pdata) return 0;
[...]
--- End code ---
--- End quote ---
OOps :lol: Thank you very much.
--- Quote from: stahta01 on October 10, 2007, 08:24:10 am ---Patch to Fix compiling under Windows without using Precompiled Headers.
Also, fixes some rules that killerbot has passed on to me.
killerbot inspired ones.
1. If possible, headers should use forward declarations instead of includes.
2. Headers should never include pre-compiled headers like [sdk.h] or [wxprec.h].
Do not include sdk.h in headers
Do not include wxprec.h in headers
Do not use WX_PRECOMP in headers
Do not use CB_PRECOMP in headers
Ones I decided on by myself.
3. Used system includes in plugins for C::B SDK and wxWidgets includes.
In plugins, use [#include <sdk.h>] instead of [#include "sdk.h"]
4. Do not use [#include <wx/wx.h>] in either production headers or source code.
--- End quote ---
I will commit all of this as soon as i 'm not at work ;-)
For Biplab
I thought i had already tried that (casting to cbEditor*), but maybe i hadn't.
Thank you everybody for contributing. As soon as the project is a little bit more robust and featured, i will open my svn team for anybody who wish to contribute, either by porting SVNInside to linux or other platfroms, or by addng new features.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version