Sketchup crash when i use thread
-
Hi,
I excuse me in advance for my bad english .
I develop a GCODE plugin for sktchup.
I use threads in order to not freeze the UI on my treatment.But sometimes, sketchup crash and make a dump file.
How i can read this file in order to find the cause of my problem.Thanks in advance.
Best regards.
-
Ruby threads? They will not work under SketchUp. (search the forum and you see lots of topics detailing all the issues.) Ruby threads, in Ruby 1.8 which SketchUp uses isn't real threads.
-
@thomthom said:
Ruby threads? They will not work under SketchUp. (search the forum and you see lots of topics detailing all the issues.) Ruby threads, in Ruby 1.8 which SketchUp uses isn't real threads.
Hi,
I search on the forum.
But i don't find result about thread.
Have you any link on thread using under sketchup?Thanks in advance.
-
Basically, threads under SketchUp Ruby is a no-go. They still block SketchUp from being responsive.
-
@thomthom said:
Basically, threads under SketchUp Ruby is a no-go. They still block SketchUp from being responsive.
I noticed that, that's why i create a web dialog with a javascript setTimeout which call a method Thread.join() with a parameter in order to run my thread.
But sometimes, i don't know for what sketchup crash.And i don't understand why.
-
Because it isn't designed to work that way. Splat.
-
@chris fullmer said:
Because it isn't designed to work that way. Splat.
Hi,
How i can make a process which not freeze the UI?
My process can take a very long time.But if not use thread, the UI freeze.
Have you any solution to solve my problem?
I search on the forum but i don't found a solution.Thanks in advance.
-
It's something many people have tried to find a solution for - some uses timers to slice up the work, but each tiny slice still blocks SketchUp UI so it does affect performance. And the task itself will take longer time.
I think the only proper solution is to make a Ruby C Extension and use C to create a native thread. But I don't think you can access the SketchUp model from a separate thread so it'd only work if you where doing calculations or other operations that doesn't need interaction with the model.
-
@thomthom said:
It's something many people have tried to find a solution for - some uses timers to slice up the work, but each tiny slice still blocks SketchUp UI so it does affect performance. And the task itself will take longer time.
I think the only proper solution is to make a Ruby C Extension and use C to create a native thread. But I don't think you can access the SketchUp model from a separate thread so it'd only work if you where doing calculations or other operations that doesn't need interaction with the model.
Damn, my treatment change the model.
I have really no possibility to not freeze the UI.Actually my code make this but if i click on a web dialog, sketchup crash.
You know how read a sketchup dump file, may be the cause of my problem is in this file.Thanks in advance.
-
No, I'm afraid I don't know how to read the dump file. I wish I did because there are times I would liked to get some clue myself.
-
Have you tried using UI.start_timer
I show an example HERE
Advertisement