Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 2 [3]

Author Topic: Mac version Error jsonobject ["contrailangularevelocitymult"] is not a number  (Read 2125 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile

Nice!!! So glad that worked.

(I'd keep the file around, juuust in case it turns out to be needed to make something else work.)
Logged

AlienCheekClapper

  • Ensign
  • *
  • Posts: 22
    • View Profile

will do. thanks again
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile

@Alex With a small change to the relevant ClassLoader's findClass or loadClass method, it might be possible to detect these kinds of class version conflicts at runtime.

Admittedly I've never tried this myself, but something like this: ?

Code
{
Class c = super.findClass(name);
URL codeLocation = c.getProtectionDomain().getCodeSource().getURL();
if(!isValidStarsectorLibraryURL(codeLocation)) throw new ClassNotFoundException("Incorrect library on classpath " + codeLocation);
return c;
}

Should create a 'Fail Fast' behaviour for much easier diagnosis & correction.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile

Thanks for the suggestion! I'll keep it in mind.

Some potential issues here re: performance etc that would at least need testing, and some potential for unintended side effects. (Also, offhand I'm not sure if the extension class loader can be replaced or not.) Still, something to consider.
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile

On second thoughts it's probably a lot simpler (and with zero performance impact) if you just alter the system class loader so it ignores whatever environment variables are causing the problem.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile

Yeah, but in this case, it didn't appear that any were in fact set. My guess is it'll load stuff from the extensions folder regardless of that. Not something I dug into, though.
Logged
Pages: 1 2 [3]