Unfaithful
Joined: 11 Jun 2007 Posts: 38
|
Posted: Sat Jun 23, 2007 4:16 am Post subject: 096.6 Linux another crash |
|
|
Another crash :/
Log File and Lst file
on 107 there is SaveWorldState(); - whats wrong... with it
| Code: | 06/23 09:00:02] [pkg/systems/Unlogic-sys/save-sys/permsave.ecl]: [Zapisuje Stan Swiata]
[06/23 09:00:04] Caught SIGSEGV (Segfault). Please mail the following to pol-core-test:
=== CUT ===
Build: POL096.6-2007-04-15 Vestal Virgin (gentoo)
Last Script: pkg/systems/Unlogic-sys/save-sys/permsave.ecl PC: 107
Stack Backtrace:
[0x822fd5e]
[0xffffe420]
[0x8088685]
[0x815f5dc]
[0x81643f9]
[0x8177e19]
[0x81fdc3c]
[0x81fef86]
[0x81fcbd7]
[0x8133d8f]
[0x8134429]
[0x80fbea2]
[0x82347b9]
[0x8234afb]
[0x827d60a]
[0x82c74be]
=== CUT ===
[06/23 09:05:55] Logfile opened.
|
lst file
| Code: | /home/users/pol/clres/pkg/systems/Unlogic-sys/save-sys/permsave.src, Line 11
program pers()
syslog("PermSavy nastepuja co " + ( Cint(ODSTEP / 60) + 1) + " minut.");
0: "PermSavy nastepuja co "
1: 16L
2: Func(0,0): CInt
3: 1L
4: +
5: +
6: " minut."
7: +
8: Func(3,0): SysLog
9: #
sleep(120);
10: 120L
11: Func(3,1): Sleep
12: #
while(1)
13: 1L
14: if false goto 53
sleep(60);
15: 60L
16: Func(3,1): Sleep
17: #
var lastsejw := Cint(GetGlobalProperty("ostatnisejw"));
18: decl local #0
19: "ostatnisejw"
20: Func(2,1): GetGlobalProperty
21: Func(0,0): CInt
22: :=
23: #
if(Cint(lastsejw + ODSTEP) < ReadGameClock())
24: local #0
25: 1000L
26: +
27: Func(0,0): CInt
28: Func(2,2): ReadGameClock
29: <
30: if false goto 51
if(!GetGlobalProperty("unsave"))
31: "unsave"
32: Func(2,1): GetGlobalProperty
33: if true goto 51
SetGlobalProperty("unsave",1);
34: "unsave"
35: 1L
36: Func(2,3): SetGlobalProperty
37: #
SetGlobalProperty("ostatnisejw",Cint(ReadGameClock()+60));
38: "ostatnisejw"
39: Func(2,2): ReadGameClock
40: 60L
41: +
42: Func(0,0): CInt
43: Func(2,3): SetGlobalProperty
44: #
sejwnow();
45: makelocal
46: jmp userfunc @54
47: #
EraseGlobalProperty("unsave");
48: "unsave"
49: Func(2,4): EraseGlobalProperty
50: #
51: leave block(1)
52: goto13
53: progend
/home/users/pol/clres/pkg/systems/Unlogic-sys/save-sys/permsave.src, Line 34
function sejwnow()
var ile := 0;
54: decl local #0
55: 0L
56: :=
57: #
foreach gracze in enumerateonlinecharacters()
58: Func(2,5): EnumerateOnlineCharacters
59: initforeach @64
ile := ile + 1;
60: local #0
61: 1L
62: +
63: local0 :=
64: stepforeach @60
65: leave block(3)
LogToFile("online.log", "[ONLINE: "+cstime()+" ] ILOSC POSTACI: "+ile);
66: "online.log"
67: "[ONLINE: "
68: makelocal
69: jmp userfunc @157
70: +
71: " ] ILOSC POSTACI: "
72: +
73: local #0
74: +
75: 0L
76: Func(4,0): LogToFile
77: #
start_script(":save-sys:ztp");
78: ":save-sys:ztp"
79: 0L
80: Func(3,2): Start_Script
81: #
Broadcast("Za minute zapisze stan swiata.", font:=3, color:=140);
82: "Za minute zapisze stan swiata."
83: 3L
84: 140L
85: Func(2,6): Broadcast
86: #
sleep(30);
87: 30L
88: Func(3,1): Sleep
89: #
Broadcast("Za 30 sekund zapisze stan swiata, prosze zakonczyc bezpieczny handel
90: "Za 30 sekund zapisze stan swiata, prosze zakonczyc bezpieczny handel."
91: 3L
92: 140L
93: Func(2,6): Broadcast
94: #
sleep(30);
95: 30L
96: Func(3,1): Sleep
97: #
syslog("[Zapisuje Stan Swiata]");
98: "[Zapisuje Stan Swiata]"
99: Func(3,0): SysLog
100: #
Broadcast("Zapisuje stan swiata", font:=3, color:=140);
101: "Zapisuje stan swiata"
102: 3L
103: 140L
104: Func(2,6): Broadcast
105: #
var res := SaveWorldState();
106: decl local #1
107: Func(2,7): SaveWorldState
108: :=
109: #
if (res)
110: local #1
111: if false goto 143
if(res.ElapsedMilliseconds)
112: local #1
113: get member 'ElapsedMilliseconds'
114: if false goto 129
SetGlobalProperty("unsavetime",res.ElapsedMilliseconds);
115: "unsavetime"
116: local #1
117: get member 'ElapsedMilliseconds'
118: Func(2,3): SetGlobalProperty
119: #
syslog( "[Zapisano stan swiata w " + res.ElapsedMilliseconds + " ms]" );
120: "[Zapisano stan swiata w "
121: local #1
122: get member 'ElapsedMilliseconds'
123: +
124: " ms]"
125: +
126: Func(3,0): SysLog
127: #
128: goto132
syslog( "[Zapisano stan swiata]");
129: "[Zapisano stan swiata]"
130: Func(3,0): SysLog
131: #
Broadcast( "Zapisano stan swiata w " + res.ElapsedMilliseconds + " ms [ps]" );
132: "Zapisano stan swiata w "
133: local #1
134: get member 'ElapsedMilliseconds'
135: +
136: " ms [ps]"
137: +
138: 3L
139: 1000L
140: Func(2,6): Broadcast
141: #
142: goto155
Broadcast( "Blad zapisu!" );
143: "Blad zapisu!"
144: 3L
145: 1000L
146: Func(2,6): Broadcast
147: #
syslog( "[UWAGA] : Blad zapisu : " + res +"[ps]");
148: "[UWAGA] : Blad zapisu : "
149: local #1
150: +
151: "[ps]"
152: +
153: Func(3,0): SysLog
154: #
155: 0L
156: return
/home/users/pol/clres/scripts/include/stime.inc, Line 143
function cstime()
return stime(polcore().systime);
157: Func(2,0): POLCore
158: get member 'systime'
159: makelocal
160: jmp userfunc @162
161: return
/home/users/pol/clres/scripts/include/stime.inc, Line 104
function stime(time)
162: pop param 'time'
var str;
163: decl local #1
164: #
var t := unpacktime(time);
165: decl local #2
166: local #0
167: makelocal
168: jmp userfunc @272
169: :=
170: #
str := "[" + t.year;
171: "["
172: local #2
173: get member 'year'
174: +
175: local1 :=
if (t.month < 10)
176: local #2
177: get member 'month'
178: 10L
179: <
180: if false goto 186
str := str + "-0";
181: local #1
182: "-0"
183: +
184: local1 :=
185: goto190
str := str + "-";
186: local #1
187: "-"
188: +
189: local1 :=
str := str + t.month;
190: local #1
191: local #2
192: get member 'month'
193: +
194: local1 :=
if (t.mday < 10)
195: local #2
196: get member 'mday'
197: 10L
198: <
199: if false goto 205
str := str + "-0";
200: local #1
201: "-0"
202: +
203: local1 :=
204: goto209
str := str + "-";
205: local #1
206: "-"
207: +
208: local1 :=
str := str + t.mday + " / ";
209: local #1
210: local #2
211: get member 'mday'
212: +
213: " / "
214: +
215: local1 :=
if (t.hour < 10)
216: local #2
217: get member 'hour'
218: 10L
219: <
220: if false goto 225
str := str + "0";
221: local #1
222: "0"
223: +
224: local1 :=
str := str + t.hour;
225: local #1
226: local #2
227: get member 'hour'
228: +
229: local1 :=
if (t.min < 10)
230: local #2
231: get member 'min'
232: 10L
233: <
234: if false goto 240
str := str + ":0";
235: local #1
236: ":0"
237: +
238: local1 :=
239: goto244
str := str + ":";
240: local #1
241: ":"
242: +
243: local1 :=
str := str + t.min;
244: local #1
245: local #2
246: get member 'min'
247: +
248: local1 :=
if (t.sec < 10)
249: local #2
250: get member 'sec'
251: 10L
252: <
253: if false goto 259
str := str + ":0";
254: local #1
255: ":0"
256: +
257: local1 :=
258: goto263
str := str + ":";
259: local #1
260: ":"
261: +
262: local1 :=
str := str + t.sec + "]";
263: local #1
264: local #2
265: get member 'sec'
266: +
267: "]"
268: +
269: local1 :=
return str;
270: local #1
271: return
/home/users/pol/clres/scripts/include/stime.inc, Line 20
function unpacktime(time)
272: pop param 'time'
var hpery;
273: decl local #1
274: #
var i;
275: decl local #2
276: #
var cumdays;
277: decl local #3
278: #
var tmX := struct;
279: decl local #4
280: struct
281: :=
282: #
var Days := {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; // const sie nie
283: decl local #5
284: array
285: 31L
286: +=
287: 28L
288: +=
289: 31L
290: +=
291: 30L
292: +=
293: 31L
294: +=
295: 30L
296: +=
297: 31L
298: +=
299: 31L
300: +=
301: 30L
302: +=
303: 31L
304: +=
305: 30L
306: +=
307: 31L
308: +=
309: :=
310: #
tmX.+sec;
311: local #4
312: "sec"
313: .+
314: #
tmX.+min;
315: local #4
316: "min"
317: .+
318: #
tmX.+hour;
319: local #4
320: "hour"
321: .+
322: #
tmX.+mday;
323: local #4
324: "mday"
325: .+
326: #
tmX.+wday;
327: local #4
328: "wday"
329: .+
330: #
tmX.+month;
331: local #4
332: "month"
333: .+
334: #
tmX.+year;
335: local #4
336: "year"
337: .+
338: #
tmX.sec := (time % 60);
339: local #4
340: local #0
341: 60L
342: %
343: set member 'sec' #
time := time / 60; /* Time in minutes */
344: local #0
345: 60L
346: /
347: local0 :=
tmX.min := (time % 60);
348: local #4
349: local #0
350: 60L
351: %
352: set member 'min' #
time := time / 60; /* Time in hours */
353: local #0
354: 60L
355: /
356: local0 :=
i := (time / (1461 * 24)); /* Number of 4 year blocks */
357: local #0
358: 35064L
359: /
360: local2 :=
tmX.year := (i * 4);
361: local #4
362: local #2
363: 4L
364: *
365: set member 'year' #
tmX.year := tmX.year + 70;
366: local #4
367: local #4
368: get member 'year'
369: 70L
370: +
371: set member 'year' #
cumdays := 1461 * i;
372: 1461L
373: local #2
374: *
375: local3 :=
time := time % (1461 * 24); /* Hours since end of last 4 year block */
376: local #0
377: 35064L
378: %
379: local0 :=
while (1)
380: 1L
381: if false goto 417
hpery := 365 * 24;
382: 8760L
383: local1 :=
if ((tmX.year & 3) == 0)
384: local #4
385: get member 'year'
386: 3L
387: &
388: 0L
389: ==
390: if false goto 395
hpery := hpery + 24;
391: local #1
392: 24L
393: +
394: local1 :=
if (time < hpery)
395: local #0
396: local #1
397: <
398: if false goto 400
break;
399: goto417
cumdays := cumdays + (hpery / 24);
400: local #3
401: local #1
402: 24L
403: /
404: +
405: local3 :=
tmX.year := tmX.year + 1;
406: local #4
407: local #4
408: get member 'year'
409: 1L
410: +
411: set member 'year' #
time := time - hpery;
412: local #0
413: local #1
414: -
415: local0 :=
416: goto380
time := time + 1;
417: local #0
418: 1L
419: +
420: local0 :=
tmX.hour := (time % 24);
421: local #4
422: local #0
423: 24L
424: %
425: set member 'hour' #
time := time / 24; /* Time in days */
426: local #0
427: 24L
428: /
429: local0 :=
cumdays := cumdays + time + 4;
430: local #3
431: local #0
432: +
433: 4L
434: +
435: local3 :=
tmX.wday := cumdays % 7;
436: local #4
437: local #3
438: 7L
439: %
440: set member 'wday' #
time := time + 1;
441: local #0
442: 1L
443: +
444: local0 :=
if ((tmX.year & 3) == 0)
445: local #4
446: get member 'year'
447: 3L
448: &
449: 0L
450: ==
451: if false goto 473
if (time > 60)
452: local #0
453: 60L
454: >
455: if false goto 461
time := time - 1;
456: local #0
457: 1L
458: -
459: local0 :=
460: goto473
if (time == 60)
461: local #0
462: 60L
463: ==
464: if false goto 473
tmX.month := 1;
465: local #4
466: 1L
467: set member 'month' #
tmX.mday := 29;
468: local #4
469: 29L
470: set member 'mday' #
return;
471: ""
472: return
for (tmX.month := 0; Days[tmX.month+1] < time; tmX.month := tmX.month+1)
473: local #4
474: 0L
475: set member 'month'
476: #
477: local #5
478: local #4
479: get member 'month'
480: 1L
481: +
482: [] 1
483: local #0
484: <
485: if false goto 513
time := time - Days[tmX.month+1];
486: local #0
487: local #5
488: local #4
489: get member 'month'
490: 1L
491: +
492: [] 1
493: -
494: local0 :=
if ((time < 0) || (tmX.month > 12))
495: local #0
496: 0L
497: <
498: local #4
499: get member 'month'
500: 12L
501: >
502: ||
503: if false goto 505
break;
504: goto513
505: local #4
506: local #4
507: get member 'month'
508: 1L
509: +
510: set member 'month'
511: #
512: goto477
tmX.mday := time;
513: local #4
514: local #0
515: set member 'mday' #
tmX.month := tmX.month + 1;
516: local #4
517: local #4
518: get member 'month'
519: 1L
520: +
521: set member 'month' #
tmX.hour := tmX.hour + 1;
522: local #4
523: local #4
524: get member 'hour'
525: 1L
526: +
527: set member 'hour' #
tmX.year := tmX.year + 1900;
528: local #4
529: local #4
530: get member 'year'
531: 1900L
532: +
533: set member 'year' #
return tmX;
534: local #4
535: return
|
|
|