Author Topic: Simutrans crash at start  (Read 1296 times)

0 Members and 1 Guest are viewing this topic.

Offline Akip Tsaqif

Simutrans crash at start
« on: March 14, 2017, 05:04:34 PM »
Hi.

So, recently I added some new pak files to my Pak192 collection, then suddenly the game throw an error after pressing Pak192. It says:

Code: [Select]
FATAL ERROR: obj_reader_t::resolve_xrefs - cannot resolve 'GOOD-Kohle'
Aborting program execution...

No log files generated by the game, just that.

So, how do I fix that? I don't even know what GOOD-Kohle is.

Thanks

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Simutrans crash at start
« Reply #1 on: March 14, 2017, 05:09:27 PM »
One or more of your new pak192 files contains a reference to an unknown good "Kohle"  (german for Coal). Try to find out which one and remove it.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Frank

Re: Simutrans crash at start
« Reply #2 on: March 14, 2017, 05:22:33 PM »
added file good.Kohle.pak in the pak directory

you can create this or copie from other pakset

Offline Leartin

Re: Simutrans crash at start
« Reply #3 on: March 14, 2017, 05:29:22 PM »
A while ago, we removed all the german names for goods and replaced them for english once, since it would be easier to know what's going on. Like, if that error was talking about "good-coal" you would probably know what it was ;)

Unfortunately, this means that older add-ons, which still use german names, are no longer compatible. Franks file makes it compatible, at the cost of a new good in the goods-list that is not used by anything.

If you can find out which addon it was, I might be able to update it.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Simutrans crash at start
« Reply #4 on: March 14, 2017, 06:41:56 PM »
Unfortunately, this means that older add-ons, which still use german names, are no longer compatible. Franks file makes it compatible, at the cost of a new good in the goods-list that is not used by anything.

How can it make it compatible? Doesn't it just cause the add-on to load properly, but it will still use the same goods type that isn't used by anything else? So you end up with a useless goods type and a useless add-on.

Offline Frank

Re: Simutrans crash at start
« Reply #5 on: March 14, 2017, 06:47:29 PM »
....

Unfortunately, this means that older add-ons, which still use german names, are no longer compatible. Franks file makes it compatible, at the cost of a new good in the goods-list that is not used by anything.
....

ok, than add to compat.tab

Code: [Select]
Kohle
coal



It is very impractical to constantly change objects.

This applies to older add-ons as well as to the translations, which are based on object names.

Offline Leartin

Re: Simutrans crash at start
« Reply #6 on: March 14, 2017, 07:09:51 PM »
ok, than add to compat.tab

Code: [Select]
Kohle
coal

That's in there, but it only means that you can load an old save with the new system. It does not allow you to use multiple names for the same thing.

How can it make it compatible? Doesn't it just cause the add-on to load properly, but it will still use the same goods type that isn't used by anything else? So you end up with a useless goods type and a useless add-on.
Not quite, since the specific good does not matter, only the good type does. If both Kohle and Coal are bulk goods, both can be transported in the vehicle. It would not work with any special goods, though.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Simutrans crash at start
« Reply #7 on: March 14, 2017, 07:15:09 PM »
Ah, yes. Vehicles usually operate on goods categories. An add-on "Kohle" mine or "Kohle" power plant would be useless, though.

Offline Akip Tsaqif

Re: Simutrans crash at start
« Reply #8 on: March 15, 2017, 12:57:12 AM »
Hi, thanks for the replies  ;D

If you can find out which addon it was, I might be able to update it.

I've found the pak which causes the problem. But are you serious wanna update it just for me? I'm very happy to hear that.

Thanks again all  :D

Offline Leartin

Re: Simutrans crash at start
« Reply #9 on: March 15, 2017, 05:34:46 AM »
It's not a big deal, from a technical point of view. It's likely I know the author and can get the sources, and if not, it's still rather easy to get out the graphics (pre-transparency) and recreate the dat from the data seen in the game.

It's more complicated morally/legally. Legally, if the addon is not under a license that allows changes, I'm not allowed to do any changes - even changes which are required for it to work again. Morally, the community frowns on those who try to rip pak-files. I'm inclined to do it anyway, in the firm belief that contributers want their work to be usable, but that's thin ice.

Either way, just give me the addon and ideally where it's from, and I'll see what I can (and am willing to) do.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Simutrans crash at start
« Reply #10 on: March 15, 2017, 05:47:27 AM »
If the pak is under an open license, most open licenses let you do anything as long the previous authors are credited, except in some cases sell it. Some (GPL) also forbid you from only make the binary available. These requirements are however unrelated to making modifications, and apply just as much for any kind of redistribution. So the only thing that can touch upon morality is if the original author is already working on a compatible version and you beat him to it.

Offline Leartin

Re: Simutrans crash at start
« Reply #11 on: March 15, 2017, 07:48:43 AM »
IF it's under an open license. But at the time an addon with German goods was likely created, not even the pakset itself had an open license (or any license); plus addons are not obliged to use the same license as the pakset they are used with (unless they use graphics as well, and the paksets license has a share-alike clause).
I agree that the original author shouldn't object unless they intended to do it themself, but we had cases in this community where people withdrew the rights to everything they ever made, just because they held a grudge against someone. You never know.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Simutrans crash at start
« Reply #12 on: March 15, 2017, 10:08:40 AM »
You can hex edit it to fix that, shouldn't be too hard with a good hex editor.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Simutrans crash at start
« Reply #13 on: March 15, 2017, 05:50:40 PM »
IF it's under an open license. But at the time an addon with German goods was likely created, not even the pakset itself had an open license (or any license); plus addons are not obliged to use the same license as the pakset they are used with (unless they use graphics as well, and the paksets license has a share-alike clause).
I agree that the original author shouldn't object unless they intended to do it themself, but we had cases in this community where people withdrew the rights to everything they ever made, just because they held a grudge against someone. You never know.

I was just arguing about the morality. If default copyrights apply, you are not allowed to even redistribute an unmodified pak file. And such rights once given can not be taken away, unless such action was enabled by a clause in the license to begin with.

You can hex edit it to fix that, shouldn't be too hard with a good hex editor.

That's just the technical aspect, not a legal one. Although a person may be allowed to do that to their own copies, as long as they do not share the result with anyone, I think this may vary from country to country.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Simutrans crash at start
« Reply #14 on: March 15, 2017, 08:37:45 PM »
You can hex edit it to fix that, shouldn't be too hard with a good hex editor.
That's just the technical aspect, not a legal one. Although a person may be allowed to do that to their own copies, as long as they do not share the result with anyone, I think this may vary from country to country.
I forgot to quote. I wanted to answer this post:
It's not a big deal, from a technical point of view. It's likely I know the author and can get the sources, and if not, it's still rather easy to get out the graphics (pre-transparency) and recreate the dat from the data seen in the game.

And I can teach how to do it as well, it does not infringe anything.
  • First get a hex editor. Now open the pak file with it.
  • Hex editors always have a side that shows the HEX values and the other that shows the characters.
  • In the characters area search for Kohle, it's at the very end of the file.
  • Now write over coal. You'll end up with coale. Now just delete the e. (Notice that you must delete it and not zero it)
  • You should then see in the characters view something like GOOD.coal. with the hex being 47 4F 4F 44 01 63 6F 61 6C 00.
    Notice that 47 4F 4F 44 is GOOD and 63 6F 61 6C is coal. The 01 indicates the beginning of the good/node name and 00 indicate the end of the character sequence.
    The next char either should not exist at all if it's the end of the file or a new node name like F for FSUP (Factory SUPplier). If you have two 00 hex it's wrong.