News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Merging Standard 112.x into Experimental

Started by Bernd Gabriel, November 03, 2012, 05:04:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sdog


jamespetts

Quote from: Bernd Gabriel on February 22, 2013, 11:41:35 PM
@Milko: thats for spotting that issue. Gcc now always uses malloc.

Oh? Does this mean that all the instances of "alloca" in the Simutrans code will cause it to fail to compile under GCC? There's quite a lot of "alloca" in Standard, isn't there? Alloca can be much faster than "malloc", so this is potentially an issue. I wonder why it didn't fail at other instances of "alloca"?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


Bernd Gabriel

about alloca():

there is no alloca() in GNU C++, but in C/clang. The commonly used simutrans macro ALLOCA covers the absence of alloca() by defining a local variable on the stack. But this "workaround" (which actually is the nicer way) does not work with clang, as it does not allow to declare variable length arrays. Thats the issue in http://forum.simutrans.com/index.php?topic=10477.msg100025.

ALLOCA does not work in the modified freight_list_sorter_t::sort_freight() as occasinally we want to allocate from heap to avoid stack overflow.

@sdog:

Yes, it is in my https://github.com/BerndGabriel/simutrans-experimental/tree/112.x-merge


The journey is the reward!

jamespetts

Ahh, I see! Thank you for explaining that.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello

I obtain a compiling error (look the attach).

I'm compiling branch 112.Xmerge (on jamespetts github), update today.

Giuseppe

jamespetts

Hmm - I am suspecting that the makefile might be missing some things, but am not sure what. Some things that I had to add to my MSVC++ project to get it to compile were:

simunits.cc
simloadingscreen.cc/.h
script/api/api_gui.cc
gui/convoy_item.cc/.h

Try adding these to the makefile to see whether this helps.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello James

These files have been added recently? I remember that two / three months ago I could compile the project without any problems ....

Giuseppe

jamespetts

Yes, a number of new files have been added from Standard.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I should note that I have just released a new version of the Release Candidate (Windows binaries only), incorporating all of the latest work on the merge branch, which is mainly Bernd's. All testing is most welcome.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Carl

Does this RC require new config files? I'm getting an error that I don't have the "pthreadVCE2.dll" file. But when I google this file, I get ambiguous results and it's not straightforward to find a genuine-looking download site.

Junna

Quote from: Carl on March 03, 2013, 09:51:38 AM
Does this RC require new config files? I'm getting an error that I don't have the "pthreadVCE2.dll" file. But when I google this file, I get ambiguous results and it's not straightforward to find a genuine-looking download site.

I found one.

http://www.mediafire.com/?f3p9a2co0029vfd

Carl

Thanks Junna!

Hmm, now I'm getting a crash immediately after the pakset has loaded. This is only occurring with paksets that I've modified, though.


For instance, this pakset will not load: https://dl.dropbox.com/u/61716/pak.ee.rar

Junna

Quote from: Carl on March 03, 2013, 09:56:02 AM
Thanks Junna!

Hmm, now I'm getting a crash immediately after the pakset has loaded. This is only occurring with paksets that I've modified, though.


For instance, this pakset will not load: https://dl.dropbox.com/u/61716/pak.ee.rar

This is because of the default demo.sve not being compatible, it seems. Loading a pak that has the pak.britain demo.sve works because this save is different. You can get those paks to load, I'd suggest, by renaming one of your saves from it as demo.sve.

Carl

Ah, of course. I had forgotten to try that.


However -- neither of the paksets which crash seem to contain demo.sve files at all. Is this a matter of the game expecting to find one there, where previously it did not?

jamespetts

Thank you for pointing out the issue with pthreadVCE2.dll - that is the .dll file necessary to make multi-threading work. Multi-threading (for limited purposes, such as graphics) is used in the latest versions of Standard, and is also incorporated into the RC, which is why you need the additional file.

As to the issues with starting games - I have not encountered that. Can you let me know precisely the conditions in which this does and does not occur?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Carl

The key condition seems to be that a crash will occur if no demo.sve is present in the pakset folder. Previously the game would generate something small in place of the demo.sve.

jamespetts

Thank you for that report - now found and fixed on the 112.x-merge branch.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

asaphxiix

Hi,

Where should I put the pthread file? I tried in the game dir, also in windows\system32 and systemWOW64, also tried using regsvr32 on it, but got a DllRegisterServer missing. The game still reports the dll missing, in any case.

Junna

Quote from: asaphxiix on March 03, 2013, 03:24:59 PM
Hi,

Where should I put the pthread file? I tried in the game dir, also in windows\system32 and systemWOW64, also tried using regsvr32 on it, but got a DllRegisterServer missing. The game still reports the dll missing, in any case.

It goes in game main directory. I had no problems once I had put it there.

asaphxiix

thanks! So far it doesn't work on my windows 8. Is there anything else that should go in there, different from the regular release 10.27?

Junna

Quote from: asaphxiix on March 03, 2013, 03:36:43 PM
thanks! So far it doesn't work on my windows 8. Is there anything else that should go in there, different from the regular release 10.27?


I don't know - do you have the other dll, pthreadgc2.dll from standard 112? It's also required (in addition to pthreadvec2.dll).

asaphxiix

yep that fixed it, thanks a bunch!

I haven't tried the RC's yet, it seems to be much faster!

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

asaphxiix

Is it not faster than the releases? At least in loading...

jamespetts

It ought to be - but you said that you hadn't tried it yet, so I was wondering how you knew...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Junna

Will the compile be updates so that the platforms become usable? I can't really play it when it doesn't work right.

jamespetts

If you compile it now, the platform issues should be fixed.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

RC-10.9029 doesn't work for me in Win7, gives error after reading pak data. I don't have any demo.sve, so I tried to add one but same error. Debugger info says:

Excepción no controlada en 0x00515eac en Simutrans-Experimental-10.9029.exe: 0xC0000005: Infracción de acceso al leer la ubicación 0x00000a78.

That means something like Unexpected exception blah blah: Access violation reading ....
RC-10.9019 works fine. Any advice?

jamespetts

An access violation is the error that one gets when loading a pakset without a demo.sve. May I ask - would you be able to try Pak128.Britain-Ex 0.8.4, which does have a demo.sve?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

Quote from: jamespetts on March 03, 2013, 07:05:11 PM
May I ask - would you be able to try Pak128.Britain-Ex 0.8.4, which does have a demo.sve?
Sure. Got a link for 0.8.4?

Btw, does the demo.sve need to be anything special? I used a "fake" one instead and doesn't work either :(

Junna

Quote from: Zeno on March 03, 2013, 07:11:45 PM
Sure. Got a link for 0.8.4?

Btw, does the demo.sve need to be anything special? I used a "fake" one instead and doesn't work either :(

http://forum.simutrans.com/index.php?topic=10144.msg96323#msg96323

/
I don't know how to compile programs. If anyone else can compile it, it'd be good.

Zeno


Bernd Gabriel

There is a fix for the access violation in my "112.x merge" branch.
The journey is the reward!

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.