Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wx2.8.12, sending event cross threads are not safe in current CB source

<< < (2/5) > >>

MortenMacFly:

--- Quote from: golgepapaz on June 21, 2013, 03:55:31 pm ---Won't it be proper that defining the event in sdk_events.h and sdk_events.cpp instead of
cclogger.cpp and it's own header?

--- End quote ---
Its not meant to be captured form outside. CC is a plugin, not the SDK. So the event is in the correct place.


--- Quote from: golgepapaz on June 21, 2013, 03:55:31 pm ---Also about that profiling stuff, I don't want to pay for something that I don't need. This should be
optional.

--- End quote ---
Its only for debugging atm and surely will be in #defines to be explicitly compiled in or even removed after all. Patches posted here are fr playing with and will be cleaned-up before application. Don't you worry...

golgepapaz:

--- Quote from: MortenMacFly on June 21, 2013, 04:17:42 pm ---Its not meant to be captured form outside. CC is a plugin, not the SDK. So the event is in the correct place.

--- End quote ---
I think it more of a general-purpose event than something exclusive to CC as the name
and the purpose suggest. Since we are stuck with wx2.8.12 for some time, I consider it a utility for
for developers who cannot use wxThreadEvent (I myself need it for example). There are many utility classes in the sdk like nullptr_t
cbThreadPool, cbAssert etc. I don't see why this should be different.

ollydbg:
Note my patch is only a draft patch, which show the direction, but it surely need all your comments. So, thanks for all your comments.
@golgepapaz
I think a good place to put the new event in sdk_events.h and sdk_events.cpp. But for me, I just put it in a new file, because once I change the sdk_events.h, then I need to rebuild all my targets..... That's some times waste a lot of time.

I believe that sending event cross thread not only happens in CC.
About the performance measure on the event hooks, that's my direction to find a "hang" bug, because sometimes, my Codeblocks will hang for 2 or 3 seconds, so I would like to see which cause this hang issue. :)

@Morten, this is the patch against SVN.

MortenMacFly:

--- Quote from: ollydbg on June 21, 2013, 05:34:54 pm ---@Morten, this is the patch against SVN.

--- End quote ---
OK, thanks for that - it applied safely.

However, having this applied the Spellchecker plugin does not compile anymore. The reason is that is derives directly from HookFunctorBase and therefore your newly introduced method "GetTypeName2 is not implemented as it is pure virtual.

This is (however) most likely a design issue in the SpellChecker plugin. I don't know the rationale for deriving directly from this class (probably due to the need to override "Call"?!), but IMHO that should not be done and needed.

Maybe danselmi can enlighten us...?! ;-)

EDIT: And its the same for the OccurrenceHighlighter plugin... :-/

oBFusCATed:
Is OccurrenceHighlighter still needed? I don't see in the contrib subdir...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version