Today I encountered something odd with the log window - I have a quite extensive loop in my project which basically is a loop within a loop:
In essence it has this structure:
Label ‘Loop’
//initiate subvariables by case structure
Goto ‘subloop’
Label ‘subloop’
//do stuff
//end of subloop
if xx>=25 then skip next 2 rules
xx=xx+1
Goto ‘Loop’
//end of main loop
if oo=2 then exit rules, execute Outgoing Action
oo=oo+1
Goto ‘Loop’
The unsual thing is that the translator is working as intended. The output is exactly what it should be. However when analyzing the log window it seems to work OK untill about 60% of the entire process and then it just becomes a mess: I cannot make any sense of it as random rules appear to have been omitted from the log.
Is it possible to overflow the log window? I know it truncates the log at a certain point but that happens to the oldest logs first. This happens at the bottom. Additionally this process should only be about 7000 rules which AFAIK should fit completely in the log window.
I’ve included a bmtp file with the offending log window and a process log generated with it. I’ve made the looping more obvious by including Log ‘Process %oo% - Entry %xx%: Value %qq%’ between the cycles. It is logged correctly up to Process 1 - Entry 20 (Processes from 0 to 2 and Entries from 0 to 25). Then after that the log window becomes all crap.
Hi, without debugging your code, I would say indeed that the log takes up a lot of resources and if you have all logging turned on it might cause some log overflow issues.
For rules, if the rule does not evaluate to true, in fact you may not see it in the log output.
Great care must be taken to ensure you do not get into an infinite loop situation. Again I did not attempt to debug your code but in my case, it appears to be stable. The should always be an escape rule of sorts to help you jump out of the loop.
Since I use F10 for something else, I just changed the incoming to ALT-F10
If I turn off all of “Rules” check box in the log I get the following which looks reasonable.
1: IN 0.1 Keystrokes: Alt(F10)
2: OUT 0.1 One-shot timer "Change Patch - Select Patch": 1 ms delay
3: IN 1.0 On timer "Change Patch - Select Patch"
4: 1.0:75
5: 1.0:76 Process 0 - Entry 0: Value 5
6: 1.0:77
7: 1.0:75
8: 1.0:76 Process 0 - Entry 1: Value 3
9: 1.0:77
10: 1.0:75
11: 1.0:76 Process 0 - Entry 2: Value 0
12: 1.0:77
13: 1.0:75
14: 1.0:76 Process 0 - Entry 3: Value 0
15: 1.0:77
16: 1.0:75
17: 1.0:76 Process 0 - Entry 4: Value 56
18: 1.0:77
19: 1.0:75
20: 1.0:76 Process 0 - Entry 5: Value 0
21: 1.0:77
22: 1.0:75
23: 1.0:76 Process 0 - Entry 6: Value 0
24: 1.0:77
25: 1.0:75
26: 1.0:76 Process 0 - Entry 7: Value 0
27: 1.0:77
28: 1.0:75
29: 1.0:76 Process 0 - Entry 8: Value 0
30: 1.0:77
31: 1.0:75
32: 1.0:76 Process 0 - Entry 9: Value 0
33: 1.0:77
34: 1.0:75
35: 1.0:76 Process 0 - Entry 10: Value 0
36: 1.0:77
37: 1.0:75
38: 1.0:76 Process 0 - Entry 11: Value 0
39: 1.0:77
40: 1.0:75
41: 1.0:76 Process 0 - Entry 12: Value 0
42: 1.0:77
43: 1.0:75
44: 1.0:76 Process 0 - Entry 13: Value 0
45: 1.0:77
46: 1.0:75
47: 1.0:76 Process 0 - Entry 14: Value 0
48: 1.0:77
49: 1.0:75
50: 1.0:76 Process 0 - Entry 15: Value 0
51: 1.0:77
52: 1.0:75
53: 1.0:76 Process 0 - Entry 16: Value 0
54: 1.0:77
55: 1.0:75
56: 1.0:76 Process 0 - Entry 17: Value 0
57: 1.0:77
58: 1.0:75
59: 1.0:76 Process 0 - Entry 18: Value 0
60: 1.0:77
61: 1.0:75
62: 1.0:76 Process 0 - Entry 19: Value 0
63: 1.0:77
64: 1.0:75
65: 1.0:76 Process 0 - Entry 20: Value 0
66: 1.0:77
67: 1.0:75
68: 1.0:76 Process 0 - Entry 21: Value 0
69: 1.0:77
70: 1.0:75
71: 1.0:76 Process 0 - Entry 22: Value 0
72: 1.0:77
73: 1.0:75
74: 1.0:76 Process 0 - Entry 23: Value 0
75: 1.0:77
76: 1.0:75
77: 1.0:76 Process 0 - Entry 24: Value 0
78: 1.0:77
79: 1.0:75
80: 1.0:76 Process 0 - Entry 25: Value 0
81: 1.0:77
82: 1.0:91
83: 1.0:92 Process 1 - Entry 0: Value 75
84: 1.0:93
85: 1.0:91
86: 1.0:92 Process 1 - Entry 1: Value 0
87: 1.0:93
88: 1.0:91
89: 1.0:92 Process 1 - Entry 2: Value 0
90: 1.0:93
91: 1.0:91
92: 1.0:92 Process 1 - Entry 3: Value 0
93: 1.0:93
94: 1.0:91
95: 1.0:92 Process 1 - Entry 4: Value 0
96: 1.0:93
97: 1.0:91
98: 1.0:92 Process 1 - Entry 5: Value 0
99: 1.0:93
100: 1.0:91
101: 1.0:92 Process 1 - Entry 6: Value 64
102: 1.0:93
103: 1.0:91
104: 1.0:92 Process 1 - Entry 7: Value 0
105: 1.0:93
106: 1.0:91
107: 1.0:92 Process 1 - Entry 8: Value 0
108: 1.0:93
109: 1.0:91
110: 1.0:92 Process 1 - Entry 9: Value 0
111: 1.0:93
112: 1.0:91
113: 1.0:92 Process 1 - Entry 10: Value 0
114: 1.0:93
115: 1.0:91
116: 1.0:92 Process 1 - Entry 11: Value 0
117: 1.0:93
118: 1.0:91
119: 1.0:92 Process 1 - Entry 12: Value 0
120: 1.0:93
121: 1.0:91
122: 1.0:92 Process 1 - Entry 13: Value 0
123: 1.0:93
124: 1.0:91
125: 1.0:92 Process 1 - Entry 14: Value 0
126: 1.0:93
127: 1.0:91
128: 1.0:92 Process 1 - Entry 15: Value 0
129: 1.0:93
130: 1.0:91
131: 1.0:92 Process 1 - Entry 16: Value 0
132: 1.0:93
133: 1.0:91
134: 1.0:92 Process 1 - Entry 17: Value 0
135: 1.0:93
136: 1.0:91
137: 1.0:92 Process 1 - Entry 18: Value 0
138: 1.0:93
139: 1.0:91
140: 1.0:92 Process 1 - Entry 19: Value 0
141: 1.0:93
142: 1.0:91
143: 1.0:92 Process 1 - Entry 20: Value 0
144: 1.0:93
145: 1.0:91
146: 1.0:92 Process 1 - Entry 21: Value 0
147: 1.0:93
148: 1.0:91
149: 1.0:92 Process 1 - Entry 22: Value 0
150: 1.0:93
151: 1.0:91
152: 1.0:92 Process 1 - Entry 23: Value 0
153: 1.0:93
154: 1.0:91
155: 1.0:92 Process 1 - Entry 24: Value 0
156: 1.0:93
157: 1.0:91
158: 1.0:92 Process 1 - Entry 25: Value 0
159: 1.0:93
160: 1.0:106
161: 1.0:107 Process 2 - Entry 0: Value 0
162: 1.0:108
163: 1.0:106
164: 1.0:107 Process 2 - Entry 1: Value 0
165: 1.0:108
166: 1.0:106
167: 1.0:107 Process 2 - Entry 2: Value 0
168: 1.0:108
169: 1.0:106
170: 1.0:107 Process 2 - Entry 3: Value 0
171: 1.0:108
172: 1.0:106
173: 1.0:107 Process 2 - Entry 4: Value 0
174: 1.0:108
175: 1.0:106
176: 1.0:107 Process 2 - Entry 5: Value 0
177: 1.0:108
178: 1.0:106
179: 1.0:107 Process 2 - Entry 6: Value 1
180: 1.0:108
181: 1.0:106
182: 1.0:107 Process 2 - Entry 7: Value 0
183: 1.0:108
184: 1.0:106
185: 1.0:107 Process 2 - Entry 8: Value 0
186: 1.0:108
187: 1.0:106
188: 1.0:107 Process 2 - Entry 9: Value 0
189: 1.0:108
190: 1.0:106
191: 1.0:107 Process 2 - Entry 10: Value 0
192: 1.0:108
193: 1.0:106
194: 1.0:107 Process 2 - Entry 11: Value 0
195: 1.0:108
196: 1.0:106
197: 1.0:107 Process 2 - Entry 12: Value 0
198: 1.0:108
199: 1.0:106
200: 1.0:107 Process 2 - Entry 13: Value 0
201: 1.0:108
202: 1.0:106
203: 1.0:107 Process 2 - Entry 14: Value 0
204: 1.0:108
205: 1.0:106
206: 1.0:107 Process 2 - Entry 15: Value 0
207: 1.0:108
208: 1.0:106
209: 1.0:107 Process 2 - Entry 16: Value 0
210: 1.0:108
211: 1.0:106
212: 1.0:107 Process 2 - Entry 17: Value 0
213: 1.0:108
214: 1.0:106
215: 1.0:107 Process 2 - Entry 18: Value 0
216: 1.0:108
217: 1.0:106
218: 1.0:107 Process 2 - Entry 19: Value 0
219: 1.0:108
220: 1.0:106
221: 1.0:107 Process 2 - Entry 20: Value 0
222: 1.0:108
223: 1.0:106
224: 1.0:107 Process 2 - Entry 21: Value 0
225: 1.0:108
226: 1.0:106
227: 1.0:107 Process 2 - Entry 22: Value 0
228: 1.0:108
229: 1.0:106
230: 1.0:107 Process 2 - Entry 23: Value 0
231: 1.0:108
232: 1.0:106
233: 1.0:107 Process 2 - Entry 24: Value 0
234: 1.0:108
235: 1.0:106
236: 1.0:107 Process 2 - Entry 25: Value 0
237: 1.0:108
You can experiment with rules to introduce rules that do not show. In the below example the if statement will not show up in rules unless it is true
if ga==1 then Goto "stuff"
Goto "done"
Label "stuff"
Log "Log Stuff"
Label "done"
Log "Log Done"
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
From looking at your filtered proces log it is clear to me that the process is working correctly. I’ll troubleshoot such loops with more filters on to prevent overflow and clever logging as you suggested.