aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs103
-rw-r--r--bin/OpenSim.Grid.AssetServer.exe.config35
-rw-r--r--bin/OpenSim.Grid.InventoryServer.exe.config35
4 files changed, 74 insertions, 102 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index f6ae639..912cbf1 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1664,6 +1664,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1664 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8; 1664 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
1665 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0]; 1665 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
1666 enablesimpacket.SimulatorInfo.Port = neighbourPort; 1666 enablesimpacket.SimulatorInfo.Port = neighbourPort;
1667
1668 enablesimpacket.Header.Reliable = true; // ESP's should be reliable.
1669
1667 OutPacket(enablesimpacket, ThrottleOutPacketType.Task); 1670 OutPacket(enablesimpacket, ThrottleOutPacketType.Task);
1668 } 1671 }
1669 1672
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index cb5664b..5a94957 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -542,11 +542,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
542 break; 542 break;
543 case enumCompileType.cs: 543 case enumCompileType.cs:
544 case enumCompileType.lsl: 544 case enumCompileType.lsl:
545 lock (CScodeProvider) 545 bool complete = false;
546 bool retried = false;
547 do
546 { 548 {
547 results = CScodeProvider.CompileAssemblyFromSource( 549 lock (CScodeProvider)
548 parameters, Script); 550 {
551 results = CScodeProvider.CompileAssemblyFromSource(
552 parameters, Script);
553 }
554 // Deal with an occasional segv in the compiler.
555 // Rarely, if ever, occurs twice in succession.
556 // Line # == 0 and no file name are indications that
557 // this is a native stack trace rather than a normal
558 // error log.
559 if (results.Errors.Count > 0)
560 {
561 if (!retried && (results.Errors[0].FileName == null || results.Errors[0].FileName == String.Empty) &&
562 results.Errors[0].Line == 0)
563 {
564 // System.Console.WriteLine("retrying failed compilation");
565 retried = true;
566 }
567 else
568 {
569 complete = true;
570 }
571 }
572 else
573 {
574 complete = true;
575 }
549 } 576 }
577 while(!complete);
550 break; 578 break;
551 case enumCompileType.js: 579 case enumCompileType.js:
552 results = JScodeProvider.CompileAssemblyFromSource( 580 results = JScodeProvider.CompileAssemblyFromSource(
@@ -567,17 +595,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
567 // 595 //
568 // WARNINGS AND ERRORS 596 // WARNINGS AND ERRORS
569 // 597 //
570 int display = 5; 598 bool hadErrors = false;
599 string errtext = String.Empty;
600
571 if (results.Errors.Count > 0) 601 if (results.Errors.Count > 0)
572 { 602 {
573 string errtext = String.Empty;
574 foreach (CompilerError CompErr in results.Errors) 603 foreach (CompilerError CompErr in results.Errors)
575 { 604 {
576 // Show 5 errors max
577 //
578 if (display <= 0)
579 break;
580 display--;
581 605
582 string severity = "Error"; 606 string severity = "Error";
583 if (CompErr.IsWarning) 607 if (CompErr.IsWarning)
@@ -587,36 +611,51 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
587 611
588 KeyValuePair<int, int> lslPos; 612 KeyValuePair<int, int> lslPos;
589 613
590 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column); 614 // Show 5 errors max, but check entire list for errors
615
616 if (severity == "Error")
617 {
618 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column);
619 string text = CompErr.ErrorText;
620
621 // Use LSL type names
622 if (lang == enumCompileType.lsl)
623 text = ReplaceTypes(CompErr.ErrorText);
624
625 // The Second Life viewer's script editor begins
626 // countingn lines and columns at 0, so we subtract 1.
627 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n",
628 lslPos.Key - 1, lslPos.Value - 1,
629 CompErr.ErrorNumber, text, severity);
630 hadErrors = true;
631 }
632 }
633 }
591 634
592 string text = CompErr.ErrorText; 635 if (hadErrors)
636 {
637 throw new Exception(errtext);
638 }
593 639
594 // Use LSL type names 640 // On today's highly asynchronous systems, the result of
595 if (lang == enumCompileType.lsl) 641 // the compile may not be immediately apparent. Wait a
596 text = ReplaceTypes(CompErr.ErrorText); 642 // reasonable amount of time before giving up on it.
597 643
598 // The Second Life viewer's script editor begins 644 if (!File.Exists(OutFile))
599 // countingn lines and columns at 0, so we subtract 1. 645 {
600 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", 646 for (int i=0; i<20 && !File.Exists(OutFile); i++)
601 lslPos.Key - 1, lslPos.Value - 1, 647 {
602 CompErr.ErrorNumber, text, severity); 648 System.Threading.Thread.Sleep(250);
603 } 649 }
604 650 // One final chance...
605 if (!File.Exists(OutFile)) 651 if (!File.Exists(OutFile))
606 { 652 {
653 errtext = String.Empty;
654 errtext += "No compile error. But not able to locate compiled file.";
607 throw new Exception(errtext); 655 throw new Exception(errtext);
608 } 656 }
609 } 657 }
610 658
611 //
612 // NO ERRORS, BUT NO COMPILED FILE
613 //
614 if (!File.Exists(OutFile))
615 {
616 string errtext = String.Empty;
617 errtext += "No compile error. But not able to locate compiled file.";
618 throw new Exception(errtext);
619 }
620// m_log.DebugFormat("[Compiler] Compiled new assembly "+ 659// m_log.DebugFormat("[Compiler] Compiled new assembly "+
621// "for {0}", asset); 660// "for {0}", asset);
622 661
@@ -629,7 +668,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
629 668
630 if (fi == null) 669 if (fi == null)
631 { 670 {
632 string errtext = String.Empty; 671 errtext = String.Empty;
633 errtext += "No compile error. But not able to stat file."; 672 errtext += "No compile error. But not able to stat file.";
634 throw new Exception(errtext); 673 throw new Exception(errtext);
635 } 674 }
@@ -644,7 +683,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
644 } 683 }
645 catch (Exception) 684 catch (Exception)
646 { 685 {
647 string errtext = String.Empty; 686 errtext = String.Empty;
648 errtext += "No compile error. But not able to open file."; 687 errtext += "No compile error. But not able to open file.";
649 throw new Exception(errtext); 688 throw new Exception(errtext);
650 } 689 }
diff --git a/bin/OpenSim.Grid.AssetServer.exe.config b/bin/OpenSim.Grid.AssetServer.exe.config
deleted file mode 100644
index 58404fd..0000000
--- a/bin/OpenSim.Grid.AssetServer.exe.config
+++ /dev/null
@@ -1,35 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<configuration>
3 <configSections>
4 <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
5 </configSections>
6 <appSettings>
7 </appSettings>
8 <log4net>
9 <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
10 <layout type="log4net.Layout.PatternLayout">
11 <conversionPattern value="%date{HH:mm:ss} - %message%newline" />
12 </layout>
13 </appender>
14 <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
15 <file value="OpenSim.Grid.AssetServer.log" />
16 <appendToFile value="true" />
17 <layout type="log4net.Layout.PatternLayout">
18 <conversionPattern value="%date %-5level - %logger %message%newline" />
19 </layout>
20 </appender>
21
22 <!-- if you'd like to know what NHibernate is doing more set value="DEBUG" -->
23 <logger name="NHibernate" additivity="false">
24 <level value="INFO"/>
25 <appender-ref ref="NHibernateFileLog"/>
26 </logger>
27
28
29 <root>
30 <level value="DEBUG" />
31 <appender-ref ref="Console" />
32 <appender-ref ref="LogFileAppender" />
33 </root>
34 </log4net>
35</configuration>
diff --git a/bin/OpenSim.Grid.InventoryServer.exe.config b/bin/OpenSim.Grid.InventoryServer.exe.config
deleted file mode 100644
index b1315c1..0000000
--- a/bin/OpenSim.Grid.InventoryServer.exe.config
+++ /dev/null
@@ -1,35 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<configuration>
3 <configSections>
4 <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
5 </configSections>
6 <appSettings>
7 </appSettings>
8 <log4net>
9 <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
10 <layout type="log4net.Layout.PatternLayout">
11 <conversionPattern value="%date{HH:mm:ss} - %message%newline" />
12 </layout>
13 </appender>
14 <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
15 <file value="OpenSim.Grid.InventoryServer.log" />
16 <appendToFile value="true" />
17 <layout type="log4net.Layout.PatternLayout">
18 <conversionPattern value="%date %-5level - %logger %message%newline" />
19 </layout>
20 </appender>
21
22 <!-- if you'd like to know what NHibernate is doing more set value="DEBUG" -->
23 <logger name="NHibernate" additivity="false">
24 <level value="INFO"/>
25 <appender-ref ref="NHibernateFileLog"/>
26 </logger>
27
28
29 <root>
30 <level value="DEBUG" />
31 <appender-ref ref="Console" />
32 <appender-ref ref="LogFileAppender" />
33 </root>
34 </log4net>
35</configuration>