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



commit 4cb3423cc06b92da36b2f660eecfdfce0cb950c6
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Sep 1 14:20:48 2022 +0200

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

 src/execute/run.cs         | 7 +++++++
 src/gui/app1/chronojump.cs | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/execute/run.cs b/src/execute/run.cs
index b9504fb26..f11517a4c 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -880,6 +880,12 @@ LogB.Information("going to call photocellWirelessCapture.CaptureStart ()");
                if(graphAllTypes)
                        type = "";
 
+               /* 2.2.2 do not do the graph here because PrepareEventGraphRunSimple has an SQL call with a 
reader
+                  and updateGraph can be also called by gtk thread and also call PrepareEventGraphRunSimple,
+                  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_run_finished (main thread) also calls updateGraphRunsSimple(); so graph will be 
updated at end
+                  Note also the PrepareEventGraphRunIntervalRealtimeCaptureObject has no SQL calls, and the 
PrepareEventGraphRunInterval is not called while capture
+
                //app1.PrepareRunSimpleGraph(time, distance/time);
                PrepareEventGraphRunSimpleObject = new PrepareEventGraphRunSimple(
                                trackTime, distance/trackTime, sessionID,
@@ -888,6 +894,7 @@ LogB.Information("going to call photocellWirelessCapture.CaptureStart ()");
 
                needUpdateGraphType = eventType.RUN;
                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 edc30b97d..2dc8f1acc 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -5711,7 +5711,8 @@ public partial class ChronoJumpWindow
                else if( currentEventExecute.ChronopicDisconnected )
                        chronopicDisconnectedWhileExecuting();
 
-               //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
                updateGraphRunsSimple();
 
                //stop camera (storing value or not)


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