Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

codecompletion plugin lead codeblocks crash, do GUI operation in worker thread

<< < (7/7)

ollydbg:
OK, four years later, and I still think I need symbol tree. So, this is the patch against the latest svn head.
I build it under 32bit gcc 7.2 under Windows with wx 3.1.1.

I think we can "disable" the option to show the whole project's tokens in the tree, because this should take too long. But for tokens in a single source file, it should be OK. I don't see time lags.



oBFusCATed:
Can you explain how this patch works and what it tries to achieve?
I've tried to look at it, but I'm not familiar with the code, so I cannot really say if it is a good idea.

Generally my understanding is that without a major redesign, the Class Browser would be a constant cause of problems. As far as I can see this is not a major redesign, but a try to workaround the problem...

ollydbg:

--- Quote from: oBFusCATed on October 14, 2018, 01:55:29 am ---Can you explain how this patch works and what it tries to achieve?
I've tried to look at it, but I'm not familiar with the code, so I cannot really say if it is a good idea.

--- End quote ---
The patch is quite simple, it just translate all the "tree building" code snippets from running in a worker thread to the main GUI thread. Those code snippets was running both from the main GUI thread and worker thread. By using this patch, a custom event is used, when we need to build the tree or operating on the tree, the event if fired, and the final operations all happens in the main GUI thread.



--- Quote ---Generally my understanding is that without a major redesign, the Class Browser would be a constant cause of problems. As far as I can see this is not a major redesign, but a try to workaround the problem...

--- End quote ---
Yes, I agree, this patch is just a workaround.

oBFusCATed:
Also I don't think it is a good idea to push this now. It will be good if you can wait a bit.

ollydbg:
Hi, @kipade, I see one issue about your patch (cc-build-symbol-tree-in-main-thread.patch), I see that the class of the current cpp/h file only shown when I collapse the root node and expand it again, see gif screen shot here: https://github.com/asmwarrior/cbdiscuss/blob/master/symbol_tree1.gif

Navigation

[0] Message Index

[*] Previous page

Go to full version