Loading...
  OR  Zero-K Name:    Password:   

Post edit history

URGENT! HELP!

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
1/26/2015 10:04:52 PMLynx before revert after revert
1/26/2015 9:43:32 PMLynx before revert after revert
1/26/2015 9:17:10 PMLynx before revert after revert
Before After
1 Can't login to Zero-K lobby under linux again. 1 Can't login to Zero-K lobby under linux again.
2 \n 2 \n
3 http://pastebin.com/CXR8U0Q1 3 http://pastebin.com/CXR8U0Q1
4 \n 4 \n
5 Renaming .spring doesn't resolve. 5 Renaming .spring doesn't resolve.
6 \n 6 \n
7 Update: running with sudo, i.e. root privileges, means lobby runs. Not a solution though. 7 Update: running with sudo, i.e. root privileges, means lobby runs. Not a solution though.
8 \n 8 \n
9 Further update: 9 Further update:
10 \n 10 \n
11 using System; 11 using System;
12 using System.Diagnostics; 12 using System.Diagnostics;
13 \n 13 \n
14 namespace test 14 namespace test
15 { 15 {
16 class MainClass 16 class MainClass
17 { 17 {
18 public static void Main (string[] args) 18 public static void Main (string[] args)
19 { 19 {
20 Console.WriteLine ("Hello Svatopluk!"); 20 Console.WriteLine ("Hello Svatopluk!");
21 foreach (Process p in Process.GetProcesses()) 21 foreach (Process p in Process.GetProcesses())
22 { 22 {
23 Console.WriteLine("Process with id " + p.Id); 23 Console.WriteLine("Process with id " + p.Id);
24 Console.WriteLine(p.ProcessName); 24 Console.WriteLine(p.ProcessName);
25 Console.WriteLine(); } 25 Console.WriteLine(); }
26 \n 26 \n
27 } 27 }
28 } 28 }
29 } 29 }
30 \n 30 \n
31 This code gives same error. 31 This code gives same error.
32 \n
33 Conclusion? The line:
34 \n
35 if (Process.GetProcesses().Any(x => x.ProcessName.StartsWith("spring_"))) return; // dont start if started from installer
36 \n
37 Is not a good idea for linux users, since ProcessName fails without root privilege for certain processes, see:
38 \n
39 http://answers.unity3d.com/questions/541990/processgetprocessesbynamestring-str-not-working.html
40 \n
41 The alternative test code functions without crash:
42 \n
43 using System;
44 using System.Diagnostics;
45 \n
46 \n
47 namespace test
48 {
49 \n
50 class MainClass
51 {
52 private static string GetProcNameSafe(Process p) { try { return p.ProcessName; } catch (Exception ex) { return ""; } }
53 \n
54 public static void Main (string[] args)
55 {
56 Console.WriteLine ("Hello Svatopluk!");
57 foreach (Process p in Process.GetProcesses())
58 {
59 Console.WriteLine("Process with id " + p.Id);
60 Console.WriteLine(GetProcNameSafe(p));
61 Console.WriteLine(); }
62 \n
63 }
64 }
65 }
66 \n
67 \n