[chronojump] At jumps end (write) do not prepare graph to avoid have two data readers if graph is updated by the



commit 354d470bd0567114fedc03d7e6443abb403ccdbf
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Sep 1 14:19:56 2022 +0200

    At jumps end (write) do not prepare graph to avoid have two data readers if graph is updated by the main 
gui

 src/execute/jump.cs        | 7 +++++++
 src/gui/app1/chronojump.cs | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index cd9fbd335..1b66f4938 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -582,6 +582,12 @@ public class JumpExecute : EventExecute
                }
                needShowFeedbackMessage = true;
 
+               /* 2.2.2 do not do the graph here because PrepareEventGraphJumpSimple has an SQL call with a 
reader
+                  and updateGraph can be also called by gtk thread and also call PrepareEventGraphJumpSimple,
+                  so SQL can be tried to open again, but the problem is in reader that if both run at same 
time it will crash (seen a log on 2.2.1)
+                  Note on_jump_finished (main thread) also calls updateGraphJumpsSimple(); so graph will be 
updated at end
+                  Note also the PrepareEventGraphJumpReactiveRealtimeCaptureObject has no SQL calls, and the 
PrepareEventGraphJumpReactive is not called while capture
+
                if(! avoidGraph)
                {
                        if(graphAllTypes)
@@ -595,6 +601,7 @@ public class JumpExecute : EventExecute
                        needUpdateGraphType = eventType.JUMP;
                        needUpdateGraph = true;
                }
+               */
                
                needEndEvent = true; //used for hiding some buttons on eventWindow
        }
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 921f52f6e..edc30b97d 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -5278,7 +5278,8 @@ public partial class ChronoJumpWindow
                        sensitiveGuiAutoExecuteOrWait (false);
                }
 
-               //Cairo graph is not updated if window is not resized, so force update
+               //2.2.1 Cairo graph is not updated if window is not resized, so force update
+               //since 2.2.2 graph is not updated at test end by write. is updated here to not have to 
readers on separated threads
                updateGraphJumpsSimple();
 
                //stop camera (storing value or not)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]