User forums > Using Code::Blocks
Time used to open a file
MortenMacFly:
--- Quote from: jens on November 09, 2011, 02:26:15 pm ---Either it's a windows-special, or you need to do a really clean build, with manually removed pch's etc. .
--- End quote ---
Maybe, the crash is like:
--- Code: ---#0 BAADF00D ?? () (??:??)
#1 627FB36C wxListBox::MSWOnDraw(void**) () (C:\Devel\wxWidgets\lib\gcc_dll\wxmsw28u_gcc_custom.dll:??)
#2 0028ACA4 ?? () (??:??)
#3 ?? ?? () (??:??)
--- End code ---
Unfortunately that's all I get from the debugger session for the moment...
Notice "BAADF00D" and "MSWOnDraw". Looks like an invalid pointer access, so I suppose it's really related to the ClientData stuff... BTW I did a full re-build already.
EDIT: Reminds me: Do you actually clear the ClientData somewhere? Otherwise it's probably a memory leak, in addition...
MortenMacFly:
Sometimes...
Look here:
http://docs.wxwidgets.org/2.8/wx_wxchecklistbox.html
It states:
--- Quote ---Please note that wxCheckListBox uses client data in its implementation, and therefore this is not available to the application.
--- End quote ---
That's probably the actual issue. And it works again, if I don't set the ClientData. Surely this is not an option - looks we need another solution to store the ProjectFile pointer.
Jenna:
--- Quote from: MortenMacFly on November 09, 2011, 03:43:56 pm ---Sometimes...
Look here:
http://docs.wxwidgets.org/2.8/wx_wxchecklistbox.html
It states:
--- Quote ---Please note that wxCheckListBox uses client data in its implementation, and therefore this is not available to the application.
--- End quote ---
That's probably the actual issue. And it works again, if I don't set the ClientData. Surely this is not an option - looks we need another solution to store the ProjectFile pointer.
--- End quote ---
Unfortunately it works on linux, and so I did not stumble over it.
Thanks for finding this issue, I will look into it.
Jenna:
--- Quote from: MortenMacFly on November 09, 2011, 02:40:56 pm ---EDIT: Reminds me: Do you actually clear the ClientData somewhere? Otherwise it's probably a memory leak, in addition...
--- End quote ---
I don't think there is a need to do so.
The client-data is just a pointer to a projectfile.
The only way to "delete" it would be to set it to 0, but that needs exact the same amount of memory.
The memory the pointer points to is handled in cbproject.cpp in exactly the same way as without my patch.
By the way:
I attach a new one, which does not use the ClientData, sorts the files in the list correctly and also sorts the files in the project-files correctly.
The patch still contains some debug-code ( debug-log output).
And it is usable with TortoisSVN on windows, even if it is created with git.
[attachment deleted by admin]
MortenMacFly:
--- Quote from: jens on November 10, 2011, 11:11:27 am ---The client-data is just a pointer to a projectfile.
--- End quote ---
Ah - OK. I missed that.
--- Quote from: jens on November 10, 2011, 11:11:27 am ---I attach a new one, which does not use the ClientData, sorts the files in the list correctly and also sorts the files in the project-files correctly.
--- End quote ---
Tested and looks good. From my perspective the patch is ready to go - I clearly see speed improvements. I would commit a couple of very tiny refinements if you did afterwards.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version