Author Topic: wx2.8.12, sending event cross threads are not safe in current CB source  (Read 29911 times)

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
I still thinkthat the event does not need its own header and implementation file.sdk_events will do fine. That profiling
stuff is still not optional and please don't forget to update the other project configurations . (If you are commited to
going with a separate file please also add header file to the projects for the sake of convention.)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I still thinkthat the event does not need its own header and implementation file.sdk_events will do fine.
OK, I agree with you, and I will change the code.

Quote
That profiling
stuff is still not optional and please don't forget to update the other project configurations . (If you are commited to
going with a separate file please also add header file to the projects for the sake of convention.)
OK, I will add the preprocessor directive, and do my best, note I only have a windows and wx2.8.12, so adding to other project files may cause some build issue. :)
« Last Edit: July 23, 2013, 02:33:39 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: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
OK, this is the new patches, by using the "git rebase -i" tool, I can nicely split one commit to two. (Git is wonderful, see how to split a commit here: version control - How to split last commit into two in Git - Stack Overflow)

The first patch introduce the performance hook measurement, it use preprocessor directive now, see first attachment.
The second patch introduce the CodeBlocksThreadEvent class, and use it.

BTW: The patch is generate by GIT command like:
Code
$ git format-patch -M -C --output-directory /f/cb_sf_git/patches master...90654
dbd50701149639
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: 9702
OK, this is the new patches, by using the "git rebase -i" tool, I can nicely split one commit to two. (Git is wonderful [...]
...except that both patches (as expected) do not apply to our SVN source tree. >:(
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
OK, this is the new patches, by using the "git rebase -i" tool, I can nicely split one commit to two. (Git is wonderful [...]
...except that both patches (as expected) do not apply to our SVN source tree. >:(
OK, I will create the svn patches soon.

Question: How do you apply patches, for the git style patch, you can just run the command in your svn local copy.

patch <./xxx.patch

Note, I'm using the patch utility from MSYS.

EDIT: I'm not sure how to create two continuous patches in SVN, for example, 001.patch, 002.patch, but 002.patch can only applied after 001.patch.
« Last Edit: July 24, 2013, 07:49:55 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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Note, I'm using the patch utility from MSYS.
None of the version of patch for Windows ever worked for me. Yiannis used to send me a very old version which was working, hence it got lost on the way... (and it was incompatible with Windows Vista+ to my knowledge...)
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Note, I'm using the patch utility from MSYS.
None of the version of patch for Windows ever worked for me. Yiannis used to send me a very old version which was working, hence it got lost on the way... (and it was incompatible with Windows Vista+ to my knowledge...)
I just successfully apply the git style patches in my svn local copy, then create two svn patches, see attachment. The second patch was a combination of 0001 and 0002 patch.

You can try a modern MSYS, I suggest you can try this: http://msysgit.googlecode.com/files/PortableGit-1.8.3-preview20130601.7z, it should works fine.

EDIT: I'm not saying a standalone patch utility(I never tried it), I'm saying the patch utility in MSYS.
 
« Last Edit: July 24, 2013, 08:07:57 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: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wx2.8.12, sending event cross threads are not safe in current CB source
« Reply #22 on: September 11, 2013, 11:41:44 am »
FYI: I commit the two patches in the trunk(rev9310, rev9311).
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.