News:

SimuTranslator
Make Simutrans speak your language.

Bugs on -devel branch

Started by Carl, April 06, 2012, 09:38:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Hmm, that's very odd indeed: I can't reproduce this one, either with Pak128.Britain-Ex 0.8.3 or the current Github latest (0.8.4). Are you on a Windows or Linux system?
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.

HeinBloed

I'm on Windows, using 0.8.3.

And yes, this is odd: I started a new game, and the beaming behaviour was gone, but the Double Deck Closed-top Tram still showed that behaviour of a jumpy speed display and the dependency of speed on the time scale. However, I then saved that game, restarted Simutrans, reloaded the game, and voilà it was beaming again (save game here: http://simutrans-germany.com/files/upload/broken1.sve). You should witness the same loading my other save game.

Edit:

And I noticed that unfortunately, the recent bug fixes seem to have introduced a new bug: if you changed the time scale to 1.50 for example and do a fast-forward, after turning off fast-forward again the time scale is reset to 1.00.
Nevermind, that was rubbish. I somehow thought the time scale was preserved before.  :-X
(previously known as "tttron")

jamespetts

Hmm - this really is bizarre: loading broken.sve with my current -devel in debug mode, the tram behaves perfectly. Are you compiling debug or release builds, may I ask?
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.

HeinBloed

I'm compiling release builds, retesting everything right now.  ???
(previously known as "tttron")

jamespetts

Hmm, I've tried a release build, and it worked without difficulty. Try my compiled binary, here.
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.

HeinBloed

Ok, this is completely beyond me. I rebuilt my release binary, resulting in beaming. I ran with your release binary, resulting in beaming. I ran with a newly built debug binary, everything fine! Are you sure you tried it with your release build too?
(previously known as "tttron")

HeinBloed

#76
Aaaah I think I found the culprit: it must be the settings-experimental.xml file! If I delete it before starting the game, everything is fine. If I restart the game then, not deleting it, broken1.sve will show the beaming.

Edit:

To add to the confusion, the presence of settings-experimental-debug.xml before starting the game (i.e. the debug build) doesn't cause it.  :o
(previously known as "tttron")

jamespetts

Very curious. There must have been some errant setting in there from an earlier version of -devel, I think. Glad that it's fixed now! Does this fully fix no. 7?
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.

HeinBloed

#78
Err no, I think you got me wrong there. It's only fixed for the first start of Simutrans if I deleted the xml file before. If I close the game and re-open it so it's using the newly created xml file, the beaming is there again (but only with the release builds!).

Edit:

I forgot to say that while the beaming is absent if the xml file wasn't present before, the speed dependency of said tram on the timescale remains, but only for the release builds; the debug build is always fine

Edit 2:

This is the content of the xml file which is being created by the release build you sent me: http://pastebin.com/K8hv6k0V Maybe you can find a problem there.

Edit 3:

There's yet another oddity, which might give a hint at the solution though: I noticed the new "Minimum braking distance" display on a convoy window when running my debug build only, both your and my release build don't show it (!)
(previously known as "tttron")

jamespetts

Very, very odd. I have tried with my release build and your settings-experimental.xml, and still no beaming/teleporting.

Edit: The braking distance display showing only on debug builds is intentional.
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.

HeinBloed

Ok, so this remains mysterious.  :-[ I've uploaded my release build here: http://simutrans-germany.com/files/upload/Simutrans-Experimental_Hein.zip I noticed it's 3 KB larger than yours, the latest commit which was included is this one: "FIX: toolbars with only metatools always returned empty icon (from Standard)". But the different code size may be due to other reasons (e.g. Premium VS vs. Express Edition?). If there's anything consistent at all, you'll probably not get the beaming with my executable either.

By the way, I'm on Windows XP 32bit. I remember you were on Windows 7 64bit ... hopefully this is not a case of one of those many warnings during compilation actually turning into something bad (i.e. loss of precision ...).  ;)
(previously known as "tttron")

jamespetts

Now, this is odd - even with your binary, I get no teleporting. Could it be a pakset difference?

It won't be a loss of precision between different systems: I use Windows 7 64-bit, but compile a 32-bit binary for Windows. Also, floating point variables are not used for any code other than graphics/UI, as it is not network safe to do so.
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.

HeinBloed

#82
You followed the procedure I described, right? I.e. delete the xml file once, run the game and close it, run the game again?

I think I should record a video tomorrow, you must be thinking I'm screwing something up here. ;) But seriously, I guess we need other people testing this too. What I've been trying before is to change some of the release build parameters to match the debug build, particularly optimization or the floating-point model ("precise" vs. "fast"), but to no avail. I didn't go about it systematically though, which I could try tomorrow. Have to call it a night now.

Edit: Completely forgot to confirm that I left all the Pak128.Britain-Ex 0.8.3 (config) files untouched from the Windows Complete Binary.
(previously known as "tttron")

jamespetts

I had not hitherto tried that specific sequence as described, but, when I do, I still cannot reproduce the issue. I don't think that changing the floating point model will make any difference, however, as floating point arithmetic is not used in any critical areas.
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.

HeinBloed

James,

I found the cause of it. But what is the reason can only be determined after some code inspection I guess ...

Since Carl had mentioned a Pakset problem when he made that post I cited above, I thought I'd give it a try even though I was certain I had left all the files untouched. I unpacked the content of Simutrans-Experimental-Complete.zip to a new folder, copied your release executable into that and bang, no more teleporting or speeding trams. Needless to say, I tried it with my release executable then with the same result.

So I checked file by file in the whole Simutrans folder hierarchy to see if I could find any difference. And as I had been certain of, none of the Pak files were changed in my old installation folder, which left me even more confused at first. But then I realized that there are exactly two differences in the folder structure: 1) I had a copy of the standard Pak128 in mine and 2) I had an extra file citylist_en.txt in Pak128.Britain-Ex-0.8.3\text.

I copied the Pak128 folder to the new folder structure, and can you guess it? Speeding trams.  :o Then I removed the Pak128 folder in my old folder structure, but trams were still speeding. So I removed it from the new folder structure too, which cured it again. The only difference left was that citylist file. I'm not kidding you, having deleted it (and the Pak128 folder still gone), my old installation didn't show any speeding trams anymore ...

I made some more tests and noticed that if either the Pak128 folder or the cityfile were present, I got speeding trams, and if both were present, I got teleporting (or I guess rather infinite speed) trams. That the presence of the additional Pak folder could cause a problem seems more easy to imagine to me since you get that extra window when starting the game, asking you which Pakset to use. But that the sheer presence of an extra citylist file (which wasn't actually used by me since I only loaded the save games all the time) can cause this is quite awkward. I became a little more curious and tested with the Pak128 folder gone and different contents of the citylist file, and indeed this led to different tram behaviours. E.g. when I copied the content of citylist_dk.txt into citylist_en.txt, the tram was suddenly crawling like a snail instead of speeding. With other content, sometimes it's speeding, teleporting etc.

You should probably at first try to reproduce this.
(previously known as "tttron")

HeinBloed

And yet another update:

even though what I describe above fixed the behaviour for the Double Deck Closed-top Tram, I realized now that there are other trams which are broken instead/still. If you load http://simutrans-germany.com/files/upload/broken4.sve in your clean environment, you should see a speeding tram.

The conclusion is that it's inconsistent throughout and the presence and content of files in the Simutrans folder structure has an effect on it.

(previously known as "tttron")

jamespetts

Hmm, this is very peculiar. I tried replacing the citylist_en.txt file in my Pak128.Britain-Ex 0.8.3 folder (I usually disable it, as I find that the automatic generation of city names provides more variety if seeded with enough parts), and ran again with both broken1.sve and broken4.sve (release builds), and noticed no difficulties. I had previously tried broken4.sve with both release and debug builds without re-enabling citylist_en.txt, again without difficulties.

I already had in any case a folder structure with a very large number of different paksets, which I use for testing, and always get the pakset selector screen. Bizarely, after all this, I still cannot reproduce the tram problems at all. It is all exceptionally odd. I even tried running Dr. Memory to see whether there were any heap corruption issues, and the only errors that I could find were memory leaks (which would not create odd behaviour, and in any case originated in code unchanged from Standard) and an error from GUI code which people more familiar with these things than I had thought was nothing about which to be concerned, and was not fixable as it was caused by the compiler rather than the code itself. This is extraordinarily odd.
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.

HeinBloed

Sigh, this is frustrating indeed.  :-[

Ok, what I tested now should add another piece to the puzzle:

I ran the game on my sister's PC, which uses Win7 64bit. No problems there. Then I ran it inside a Virtual PC VM on my own computer, the OS of which is XP SP3 too like my desktop OS. Gives me the broken trams. Next was a Vista 32bit laptop, all trams going fine there. And finally, I tried it in XP mode (the one that comes with Win7 starting from the Professional edition) on my sister's PC again . Broken trams there again.

So it seems to come down to an XP-specific/compiler settings(?) problem. James, if you happen to have Win7 Professional or better, you might try it for yourself in XP mode.

Other than that, maybe someone else is willing to give it a try on XP? The instructions would be:

1. Get https://github.com/downloads/jamespetts/simutrans-pak128.britain/Simutrans-Experimental-Complete.zip, unpack into an empty folder
2. Get James' devel release build: http://simutrans-germany.com/files/upload/Simutrans-Experimental.zip and unpack the contents into the folder created in step 1, overwriting all the existing files
(3. Run Simutrans-Experimental.exe once to have the settings folders structure created in "My Documents" - only needed if a Simutrans folder there doesn't exist yet)
4. Get this save game: http://simutrans-germany.com/files/upload/broken4.sve, save it into the "save" folder of the Simutrans folder in My Documents
5. Run Simutrans-Experimental.exe, load that save game and see what's happening to the tram. If everything seems to be going fine at first, you should also try with the "Double Deck Open-top Tram", which is usually affected too
(previously known as "tttron")

HeinBloed

Update: made a release build with all the optimization settings turned off, so the options are very similar to a debug build - this is working!
(previously known as "tttron")

Milko

Hello

I hope not to create confusion, but it may be that the problem is related to this old bug? Prissi spoken word "orphans", that they can go and create our own problems?
Have you tried to see if the pak128 is plagued by the same problems?

http://forum.simutrans.com/index.php?topic=8163.msg77408#msg77408

Giuseppe

jamespetts

When you said that you tried it in XP mode, do you mean that you selected "Run this program in compatibility mode for: Windows XP (Service Pack 3)" in the "properties" box of the executable? I ask because I tried that, and still with the same result: no teleporting trams.

Edit: Giuseppe - I'm not sure how they might be related - do you care to elaborate? That bug was fixed in Standard a while ago, I think.
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.

HeinBloed

Thanks for the input Guiseppe, but I'm quite sure this is a different issue.

James, no, I was referring to the proper XP Virtual Machine which is bundled with Win7 Professional or better, as described here: http://en.wikipedia.org/wiki/XP_Mode#Windows_XP_Mode

But this may not be necessary anymore. In fact, I already managed to isolate the problematic compiler setting: it's the runtime library setting. I suspected it could be that because of the different behaviour on the different OS, which could be explained by the presence of different versions of DLLs.

If I make a release build with the runtime library setting "Multi-threaded Debug (/MTd)" instead of the currently specified "Multi-threaded DLL (/MD)" and leave all the other (optimization) settings unchanged, all the tram problems are gone. I tried to build with the simple "Multi-threaded (/MT)" too, but with that setting I get lots of unresolved external symbol errors.  ???

1>imagelist3d_reader.obj : error LNK2001: unresolved external symbol _fread
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fread
1>imagelist3d_reader.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
1>libcpmt.lib(newaop.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
1>gameinfo.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
1>gameinfo.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
1>gameinfo.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z)
1>gameinfo.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
1>gameinfo.obj : error LNK2001: unresolved external symbol _memmove
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol _memmove
1>gameinfo.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
1>gameinfo.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
1>gameinfo.obj : error LNK2001: unresolved external symbol _stricmp
1>OLDNAMES.lib(stricmp.obj) : error LNK2001: unresolved external symbol _stricmp
1>gameinfo.obj : error LNK2001: unresolved external symbol _atol
1>gameinfo.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
1>livery_scheme.obj : error LNK2001: unresolved external symbol "struct __type_info_node __type_info_root_node" (?__type_info_root_node@@3U__type_info_node@@A)
1>livery_scheme.obj : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(struct __type_info_node *)const " (?name@type_info@@QBEPBDPAU__type_info_node@@@Z)
1>network_address.obj : error LNK2001: unresolved external symbol _strchr
1>network_address.obj : error LNK2001: unresolved external symbol _atoi
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _sprintf
1>zlibstat.lib(gzlib.obj) : error LNK2001: unresolved external symbol _sprintf
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _feof
1>zlibstat.lib(zutil.obj) : error LNK2001: unresolved external symbol _free
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _free
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol _free
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _free
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _free
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _free
1>zlibstat.lib(gzlib.obj) : error LNK2001: unresolved external symbol _free
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _free
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _rewind
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _strdup
1>OLDNAMES.lib(strdup.obj) : error LNK2001: unresolved external symbol _strdup
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _remove
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _atexit
1>libcpmt.lib(iosptrs.obj) : error LNK2001: unresolved external symbol _atexit
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _atexit
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol _atexit
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol _atexit
1>libcpmt.lib(xlock.obj) : error LNK2001: unresolved external symbol _atexit
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _fopen
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fopen
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol __purecall
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol __purecall
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _ftell
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _fseek
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _fclose
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fclose
1>network_cmd_ingame.obj : error LNK2001: unresolved external symbol _chdir
1>OLDNAMES.lib(chdir.obj) : error LNK2001: unresolved external symbol _chdir
1>network_file_transfer.obj : error LNK2001: unresolved external symbol _fflush
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fflush
1>network_file_transfer.obj : error LNK2001: unresolved external symbol _printf
1>network_file_transfer.obj : error LNK2001: unresolved external symbol _strnicmp
1>OLDNAMES.lib(strnicmp.obj) : error LNK2001: unresolved external symbol _strnicmp
1>network_file_transfer.obj : error LNK2001: unresolved external symbol _fwrite
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fwrite
1>display_settings.obj : error LNK2001: unresolved external symbol _strncat
1>server_frame.obj : error LNK2001: unresolved external symbol _strncmp
1>server_frame.obj : error LNK2001: unresolved external symbol _strstr
1>server_frame.obj : error LNK2001: unresolved external symbol _fgets
1>simsys.obj : error LNK2001: unresolved external symbol _mkdir
1>OLDNAMES.lib(mkdir.obj) : error LNK2001: unresolved external symbol _mkdir
1>simsys_w.obj : error LNK2001: unresolved external symbol ___argv
1>simsys_w.obj : error LNK2001: unresolved external symbol ___argc
1>zlibstat.lib(zutil.obj) : error LNK2001: unresolved external symbol _malloc
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _malloc
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol _malloc
1>simsys_w32_png.obj : error LNK2001: unresolved external symbol _malloc
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _malloc
1>zlibstat.lib(gzlib.obj) : error LNK2001: unresolved external symbol _malloc
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _malloc
1>cbuffer_t.obj : error LNK2001: unresolved external symbol __vsprintf_p
1>einstellungen.obj : error LNK2001: unresolved external symbol _sscanf
1>einstellungen.obj : error LNK2001: unresolved external symbol _memchr
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _memchr
1>fahrplan.obj : error LNK2001: unresolved external symbol _isdigit
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _isdigit
1>font.obj : error LNK2001: unresolved external symbol _calloc
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol ___iob_func
1>font.obj : error LNK2001: unresolved external symbol ___iob_func
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol ___iob_func
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol ___iob_func
1>libbz2.lib(decompress.obj) : error LNK2001: unresolved external symbol ___iob_func
1>font.obj : error LNK2001: unresolved external symbol _strtol
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol _fprintf
1>font.obj : error LNK2001: unresolved external symbol _fprintf
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fprintf
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol _fprintf
1>libbz2.lib(decompress.obj) : error LNK2001: unresolved external symbol _fprintf
1>font.obj : error LNK2001: unresolved external symbol _getc
1>gebaeude.obj : error LNK2001: unresolved external symbol _strrchr
1>gebaeude.obj : error LNK2001: unresolved external symbol _toupper
1>gui_component_table.obj : error LNK2001: unresolved external symbol ___RTtypeid
1>gui_flowtext.obj : error LNK2001: unresolved external symbol _strncpy
1>loadsave.obj : error LNK2001: unresolved external symbol _fputc
1>loadsave.obj : error LNK2001: unresolved external symbol _strerror
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _strerror
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _strerror
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol _strerror
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __errno
1>loadsave.obj : error LNK2001: unresolved external symbol __errno
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol __errno
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol __errno
1>libcpmt.lib(xwctomb.obj) : error LNK2001: unresolved external symbol __errno
1>loadsave.obj : error LNK2001: unresolved external symbol _ferror
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _ferror
1>loadsave_frame.obj : error LNK2001: unresolved external symbol _tolower
1>loadsave_frame.obj : error LNK2001: unresolved external symbol _strftime
1>loadsave_frame.obj : error LNK2001: unresolved external symbol __localtime64
1>loadsave_frame.obj : error LNK2001: unresolved external symbol __stat64i32
1>float32e8_t.obj : error LNK2001: unresolved external symbol _memmove_s
1>float32e8_t.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ)
1>float32e8_t.obj : error LNK2001: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z)
1>float32e8_t.obj : error LNK2001: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z)
1>float32e8_t.obj : error LNK2001: unresolved external symbol _sprintf_s
1>float32e8_t.obj : error LNK2001: unresolved external symbol _localeconv
1>float32e8_t.obj : error LNK2001: unresolved external symbol _strcspn
1>log.obj : error LNK2001: unresolved external symbol _abort
1>libcpmt.lib(iosptrs.obj) : error LNK2001: unresolved external symbol _abort
1>log.obj : error LNK2001: unresolved external symbol _vsprintf
1>log.obj : error LNK2001: unresolved external symbol _fputs
1>log.obj : error LNK2001: unresolved external symbol _vfprintf
1>log.obj : error LNK2001: unresolved external symbol _puts
1>obj_reader.obj : error LNK2001: unresolved external symbol _fgetc
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fgetc
1>savegame_frame.obj : error LNK2001: unresolved external symbol __findnext64i32
1>savegame_frame.obj : error LNK2001: unresolved external symbol __findclose
1>savegame_frame.obj : error LNK2001: unresolved external symbol __findfirst64i32
1>simgraph16.obj : error LNK2001: unresolved external symbol _access
1>OLDNAMES.lib(access.obj) : error LNK2001: unresolved external symbol _access
1>simgraph16.obj : error LNK2001: unresolved external symbol _exit
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _exit
1>simmain.obj : error LNK2001: unresolved external symbol _getcwd
1>OLDNAMES.lib(getcwd.obj) : error LNK2001: unresolved external symbol _getcwd
1>simmem.obj : error LNK2001: unresolved external symbol _realloc
1>sprachen.obj : error LNK2001: unresolved external symbol _atof
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _read
1>OLDNAMES.lib(read.obj) : error LNK2001: unresolved external symbol _read
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol _memcpy
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol _memcpy
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _memcpy
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _memcpy
1>zlibstat.lib(inflate.obj) : error LNK2001: unresolved external symbol _memcpy
1>zlibstat.lib(deflate.obj) : error LNK2001: unresolved external symbol _memcpy
1>zlibstat.lib(gzread.obj) : error LNK2001: unresolved external symbol _close
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _close
1>OLDNAMES.lib(close.obj) : error LNK2001: unresolved external symbol _close
1>zlibstat.lib(gzlib.obj) : error LNK2001: unresolved external symbol _lseek
1>OLDNAMES.lib(lseek.obj) : error LNK2001: unresolved external symbol _lseek
1>zlibstat.lib(gzlib.obj) : error LNK2001: unresolved external symbol _open
1>OLDNAMES.lib(open.obj) : error LNK2001: unresolved external symbol _open
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _write
1>OLDNAMES.lib(write.obj) : error LNK2001: unresolved external symbol _write
1>libbz2.lib(decompress.obj) : error LNK2001: unresolved external symbol _memset
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol _memset
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol _memset
1>zlibstat.lib(deflate.obj) : error LNK2001: unresolved external symbol _memset
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _memset
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol _memset
1>zlibstat.lib(gzwrite.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _ungetc
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fdopen
1>OLDNAMES.lib(fdopen.obj) : error LNK2001: unresolved external symbol _fdopen
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _setmode
1>OLDNAMES.lib(setmode.obj) : error LNK2001: unresolved external symbol _setmode
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol _fileno
1>OLDNAMES.lib(fileno.obj) : error LNK2001: unresolved external symbol _fileno
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>libbz2.lib(decompress.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libbz2.lib(decompress.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>libbz2.lib(bzlib.obj) : error LNK2001: unresolved external symbol __chkstk
1>libbz2.lib(huffman.obj) : error LNK2001: unresolved external symbol __chkstk
1>libbz2.lib(compress.obj) : error LNK2001: unresolved external symbol __fltused
1>libbz2.lib(blocksort.obj) : error LNK2001: unresolved external symbol __fltused
1>libcpmt.lib(xthrow.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
1>libcpmt.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ____mb_cur_max_l_func
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ____mb_cur_max_l_func
1>libcpmt.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ____lc_codepage_func
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ____lc_codepage_func
1>libcpmt.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ____lc_handle_func
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ____lc_handle_func
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol _strlen
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol __EH_epilog3
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol __EH_epilog3
1>libcpmt.lib(syserror.obj) : error LNK2001: unresolved external symbol __EH_prolog3_catch
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol __EH_prolog3
1>libcpmt.lib(locale0.obj) : error LNK2001: unresolved external symbol _setlocale
1>libcpmt.lib(uncaught.obj) : error LNK2001: unresolved external symbol "bool __cdecl __uncaught_exception(void)" (?__uncaught_exception@@YA_NXZ)
1>libcpmt.lib(stdhndlr.obj) : error LNK2001: unresolved external symbol "int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int)" (?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z)
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __create_locale
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __ui64toa_s
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_locale
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_crt
1>libcpmt.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___pctype_func
1>OLDNAMES.lib(stricmp.obj) : error LNK2001: unresolved external symbol __stricmp
1>OLDNAMES.lib(strdup.obj) : error LNK2001: unresolved external symbol __strdup
1>OLDNAMES.lib(chdir.obj) : error LNK2001: unresolved external symbol __chdir
1>OLDNAMES.lib(strnicmp.obj) : error LNK2001: unresolved external symbol __strnicmp
1>OLDNAMES.lib(mkdir.obj) : error LNK2001: unresolved external symbol __mkdir
1>OLDNAMES.lib(access.obj) : error LNK2001: unresolved external symbol __access
1>OLDNAMES.lib(getcwd.obj) : error LNK2001: unresolved external symbol __getcwd
1>OLDNAMES.lib(read.obj) : error LNK2001: unresolved external symbol __read
1>OLDNAMES.lib(close.obj) : error LNK2001: unresolved external symbol __close
1>OLDNAMES.lib(lseek.obj) : error LNK2001: unresolved external symbol __lseek
1>OLDNAMES.lib(open.obj) : error LNK2001: unresolved external symbol __open
1>OLDNAMES.lib(write.obj) : error LNK2001: unresolved external symbol __write
1>OLDNAMES.lib(fdopen.obj) : error LNK2001: unresolved external symbol __fdopen
1>OLDNAMES.lib(setmode.obj) : error LNK2001: unresolved external symbol __setmode
1>OLDNAMES.lib(fileno.obj) : error LNK2001: unresolved external symbol __fileno
1>.\simutrans\Simutrans-Experimental.exe : fatal error LNK1120: 132 unresolved externals


I'm not sure what to make of those results. Just accepting that it is like this and switching to "Multi-threaded Debug (/MTd)" doesn't seem to be satisfactory to me because ignorance about the true reason could lead to other problems. Maybe there's an expert who has some ideas about this? I should add that I'm compiling with VS2010 (Premium), James with the Express edition as far as I remember, but since his executable caused the same problems, it can't be a matter of different editions.
(previously known as "tttron")

jamespetts

Hmm - I wonder, then, whether the problem is caused by bad DLLs? The complete package and executable zip file come with some DLLs, some for XP and some for 7/Vista. Have you tried unpacking those into your simutrans directory (where the executable is) and seeing whether that makes a difference?
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.

HeinBloed

#93
Yes, I've always extracted the whole content of the complete package, including those two DLLs.

However, I've noticed this: I removed the DLLs from the folder, but the dynamically linked executable was still working, which has to be because I had installed the "Microsoft Visual C++ 2010 Redistributable Package" some time before already so the DLL instances from System32 are apparently used.

I'm looking into the different versions of those DLLs which are available, for example I'm not sure if I installed the SP1 for that (software administration remains unclear). My version of both msvcr100.dll and msvcp100.dll in System32 is 10.0.40219.325.

Edit: Indeed, if I rename the two DLLs in System32 and delete the DLLs in the folder too, when I'm trying to run the dynamically linked executable, I'm getting the error that the DLLs are missing. But adding the DLLs from the complete package to the folder again doesn't solve the tram problem ... so this could still be a version conflict
(previously known as "tttron")

jamespetts

Thank you for your work in looking into this - much appreciated! If you can find a version of the .DLL files that do not cause the problems, that would be extremely helpful.

Edit: Do you still get the problem if you remove the .DLLs in the folder but keep the system copies?
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.

HeinBloed

#95
Unfortunately, no version of the DLLs I tried fixes it.  :-[

I have 10.0.40219.325 (both msvcp and msvcr) from System32, which apparently is the SP1 version. I have 10.0.40219.1 (both msvcp and msvcr) which is in Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT, and the version bundled with the Experimental complete package is 10.0.30319.1 for msvcr100.dll respectively 10.0.30128.1 for msvcp100.dll.

Only the statically linked executable is working fine. Since the DLL version doesn't seem to make a difference, it only seems to be the difference of statical (combined with debug cf. above /MT option not working) vs. dynamical linking. Anyone has an idea?

Edit: It makes no difference either if the DLLs are used from System32 or the game folder (tested by deleting them in the other place each time)
(previously known as "tttron")

jamespetts

This is very odd, and rather beyond me, I'm afraid. Do you want to test whether performance is affected on a big map by comparing the statically linked and dynamically linked versions? I should be very grateful if you could.
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

Hmm - it seems that I can reproduce the bug using the XP Mode emulator available with Windows 7 Professional. The only thought that I have at present as to how to solve it is to use static linking henceforth. Does anyone have any other ideas? Thanks particularly to Hein for all the work in tracking down the bug.
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.

HeinBloed

I had some time to test the static linking. In order for the release build (option /MT) to work, I removed libcmt.lib from %(IgnoreSpecificDefaultLibraries), as discussed here: http://forum.simutrans.com/index.php?topic=9888.0, which solved all the unresolved external symbol errors.

BUT the bad news is that the same tram physics bugs exist with that build. So in order to having tested with all the options, I also made a dynamically linked debug build (option /MDd), for which I had to add libcmt.lib to the list of ignored libraries again due to some conflicts, and sure enough, no physics bug can be observed with that. Which means that it's not the static vs. dynamic linking which makes the difference but linking against the release or the debug version of the runtime libraries. I can only guess that the debug version might use some additional measurements against memory-related (stack/heap) bugs, but I have no experience at all with that. And I couldn't find anything on the web after a quick search either.

When I have some more time, I'll try to track down the commit after which this bug occurs first. Since after all, the official 10.11 release doesn't show it.
(previously known as "tttron")

Markohs

debug libraries uses to use safer heaps (reserving extra memory before and after the bock), and uses to initialize memory. I think the behaviour you describe is caused by a corrupted/misaligned/uninitialized pointer in the code, a programming bug.

But this is just a guess by me. :)

wlindley

Just checked out and compiled the current version.  Using pak128.britain-experimental: houses that should have level 1, instead demand 0 passengers and 0 mail.  This occurs both with newly checked-out and newly-compiled pakset and with an old existing one (so it's not makeobj).

Milko

Hello

Quote from: wlindley on May 09, 2012, 01:26:08 PM
Just checked out and compiled the current version.  Using pak128.britain-experimental: houses that should have level 1, instead demand 0 passengers and 0 mail.  This occurs both with newly checked-out and newly-compiled pakset and with an old existing one (so it's not makeobj).

I believe that this phenomenon is due to the parameter "passenger_factor" (simuconf.tab) which is currently set to a value below 16.
The formula works roughly like this: Passenger_generation = passenger_factor * building level / 16
We do not know if in this case the passengers are actually generated 0 or 0.8 ...

Giuseppe

jamespetts

Hein and Markohs,

thank you both for your input - that is most helpful. I shall have to ask Bernd to look into this issue. Do either of you have any idea as to why such memory corruption would not be spotted in Dr. Memory?

James.

Edit: Hmm - this doesn't really explain why it does not occur in dynamically linked builds for Windows 7 or Vista, however. Does anyone have any ideas?
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.

wlindley

Quote from: Milko on May 09, 2012, 01:39:46 PM
I believe that this phenomenon is due to the parameter "passenger_factor" (simuconf.tab) which is currently set to a value below 16.
The formula works roughly like this: Passenger_generation = passenger_factor * building level / 16

Surely that should be: Passenger_generation = (passenger_factor * building level + 8) / 16 ...which would properly round 0.8 up to 1, as well as 1.6 up to 2...?

Carl

One consequence of that is presumably that passenger generation would go up. There are already few low passenger levels to choose from, and this would reduce them further.

IMO we need a greater fineness of grain at lower passenger_factor levels -- there are situations where one would want to go as low as 1 or 2 for passenger_factor. Any simulation with a realistic frequency of service would have to go for a very low passenger factor.