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

URGENT! HELP!

7 posts, 869 views
Post comment
Filter:    Player:  
sort
Lynx
Can't login to Zero-K lobby under linux again.

http://pastebin.com/CXR8U0Q1

Renaming .spring doesn't resolve.

Update: running with sudo, i.e. root privileges, means lobby runs. Not a solution though.

Further update:

using System;
using System.Diagnostics;

namespace test
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello Svatopluk!");
foreach (Process p in Process.GetProcesses())
{
Console.WriteLine("Process with id " + p.Id);
Console.WriteLine(p.ProcessName);
Console.WriteLine(); }

}
}
}

This code gives same error.

Conclusion? The line:

if (Process.GetProcesses().Any(x => x.ProcessName.StartsWith("spring_"))) return; // dont start if started from installer

Is not a good idea for linux users, since ProcessName fails without root privilege for certain processes, see:

http://answers.unity3d.com/questions/541990/processgetprocessesbynamestring-str-not-working.html

The alternative test code functions without crash:

using System;
using System.Diagnostics;


namespace test
{

class MainClass
{
private static string GetProcNameSafe(Process p) { try { return p.ProcessName; } catch (Exception ex) { return ""; } }

public static void Main (string[] args)
{
Console.WriteLine ("Hello Svatopluk!");
foreach (Process p in Process.GetProcesses())
{
Console.WriteLine("Process with id " + p.Id);
Console.WriteLine(GetProcNameSafe(p));
Console.WriteLine(); }

}
}
}

+0 / -0
Lynx
9 years ago
[21:23] Svatopluk if (Process.GetProcesses().Any(x => x.ProcessName.StartsWith("spring_"))) return; // dont start if started from installer
[21:23] DeinFreund back..
[21:23] Svatopluk Lynx there is your problem right there
[21:24] Svatopluk it needs to put x.ProcessName in try-catch block
[21:24] Lynx I am starting using "mono Zero-K.exe|
[21:24] BigMac what is happening in multiplayer?
[21:24] DeinFreund nothing currently..
[21:25] SmokeDragon i just got mine working
[21:25] Svatopluk the correct code would have helper function such as "private static String GetProcessNameSafely(Process p) { try { return p.ProcessName; } catch (Exception ex) { return null; } }
[21:25] SmokeDragon on linux mint
[21:26] Lynx Svatopluk might I ask - how did you determine the line giviing problem from my pastebin output?
[21:26] Svatopluk if (Process.GetProcesses().Any(x => { var name = GetProcessNameSafely(x); return name.StartsWith("spring_")); }) return; // dont start if started from installer
[21:26] BigMac what is going on???
[21:27] SmokeDragon the end of the internet is upon us
[21:27] Svatopluk Lynx from stack trace, it doesn't call Process.ProcessName nowhere else in main
[21:27] BigMac server is starting and closing battles
[21:27] tomicaST bad bad server
[21:28] tomicaST wht nw
[21:28] tomicaST now
[21:28] Svatopluk Lynx if you find somebody that develops zklobby and puts fix as i described above, it will stop throwing that error for you
+0 / -0
It's unfortunate that ZKL doesn't build on Linux without pulling in xponen's barely-working adaptations. I would happly join a group of Linux testers to catch things like this before they get released or something.
+0 / -0
Lynx
Yes. Surely Zero-K lobby updates should be tested before release, to ensure that new users are not put off by the game stopping working randomly. I also sometimes have to manually remove cache files otherwise it crashes. Not good.
+0 / -0


9 years ago
If your commit is merged to "master" lobby is available at test.zero-k.info and can be tested on linux before making stable giving some heads up...
+0 / -0


9 years ago
Oh and btw you can delete that line zkl does not come in spring installer anymore afaik..
+0 / -0
Lynx
Ok, I think I made my first github pull request. Hope that's correct procedure. In any case, please urgently incorporate this change and build and upload new Zero-K.exe for download ASAP; Zero-K is currently broken for some linux users!

https://github.com/ZeroK-RTS/Zero-K-Infrastructure/pull/428
+0 / -0