News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Simutrans crash at start

Started by Akip Tsaqif, March 14, 2017, 05:04:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Akip Tsaqif

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:

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

Combuijs

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



Frank

added file good.Kohle.pak in the pak directory

you can create this or copie from other pakset

Leartin

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.

Ters

Quote from: Leartin on March 14, 2017, 05:29:22 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.

Frank

Quote from: Leartin on March 14, 2017, 05:29:22 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

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.

Leartin

Quote from: Frank on March 14, 2017, 06:47:29 PM
ok, than add to compat.tab

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.

Quote from: Ters on March 14, 2017, 06:41:56 PM
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.

Ters

Ah, yes. Vehicles usually operate on goods categories. An add-on "Kohle" mine or "Kohle" power plant would be useless, though.

Akip Tsaqif

Hi, thanks for the replies  ;D

Quote from: Leartin on March 14, 2017, 05:29:22 PM
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

Leartin

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.

Ters

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.

Leartin

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.

An_dz

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

Ters

Quote from: Leartin 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.

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.

Quote from: An_dz 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.

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.

An_dz

Quote from: Ters on March 15, 2017, 05:50:40 PM
Quote from: An_dz 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.
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:
Quote from: Leartin 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.

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.