Jump to content
The Dark Mod Forums
Alberto Salvia Novella

The installer hangs if there's a transient Internet disconnection

Recommended Posts

@freyk @greebo

If while the installer is downloading files there's a transient disconnection, either by the client computer or the download mirror, the installer permanently hangs.

As result, as other people told me, users believe that the installer simply doesn't work on their systems. Additionally if you are using the installer for building a Linux package, the building process never finishes.

The installer should re-connect on connection lost, and timeout with a crash if the connection has been failing for a while. Also it currently returns exit status 1 on success, where it should be 0. Status 1 means failure.

Edited by Alberto Salvia Novella

Share this post


Link to post
Share on other sites

As side note, just in case the info is useful, the root cause of these problems probably has to do a lot with the language selection for writing the installer. C++ is very capable and performant, but is quite easy to let slip bugs on it and it's slow on developing compared with mostly any other programming language, even if you are not good at it.

Simple tools like this doesn't require such performance and tooling, and would greatly benefit from using a simpler compiled language. Go seems a good fit, since it robust against errors and was designed with networking in mind. Its binaries are cross platform compatible, and compiling them is instant.

Edited by Alberto Salvia Novella

Share this post


Link to post
Share on other sites
15 hours ago, Alberto Salvia Novella said:

@freyk @greebo

If while the installer is downloading files there's a transient disconnection, either by the client computer or the download mirror, the installer permanently hangs.

As result, as other people told me, users believe that the installer simply doesn't work on their systems. Additionally if you are using the installer for building a Linux package, the building process never finishes.

Thanks for reporting the issue. I'm not sure who's maintaining the installer at this point, but it's certainly possible that things like this could be made more robust.

15 hours ago, Alberto Salvia Novella said:

As side note, just in case the info is useful, the root cause of these problems probably has to do a lot with the language selection for writing the installer. C++ is very capable and performant, but is quite easy to let slip bugs on it and it's slow on developing compared with mostly any other programming language, even if you are not good at it.

That's not "info", it's vague guesswork based on personal opinions. Let's not start a pointless "my favourite language is better than your language" flamewar here. The experienced C++ developers on this project are not going to abandon their knowledge and jump ship to the latest new language just because some forum poster tells them that C++ is buggy and slow to develop with.

(For what it's worth, I'm actually quite interested in learning Go, and probably wouldn't choose C++ as the default language for writing something like an installer. But rewriting a project in a new language is a huge amount of work, does not magically fix bugs and is actually very likely to introduce a few more.)

Share this post


Link to post
Share on other sites

I wouldn't normally recommend changing the programming language of a software, simply because the other language is better. That's very typical, but most of the time a bad move.

On the other hand this seems the perfect situation for doing it, as the program is small and the target language much better suited. I'm not trying to convince you of anything, I'm simply speaking my mind.

Share this post


Link to post
Share on other sites

Alberto, Thank you for reporting the issue.
I would like to know at which time the installer hangs on your system.
(or is it the updater? ..I think it is)

To temporary solve your problem, download and run the latest tdm-updater from the download page.
If it hangs during the download procedure:

  • rerun the updater until all the files are downloaded.
  • Select another mirror by Change the tdm-mirrors file
  • Or download files from moddb.

For all users, it is known that the updater can crash or stand stil, when its downloading files from a slow/unstable server.
Maybe the updater on your system stands stil/crashes during downloading the files (from a unstable tdm-mirror) too, alberto?
(to me, thats normal. because how the updater reacts to the the unstable/slow tdm-downloadmirrors)

I will look into your reported download bug of my installer.
----

Quote

If while the installer is downloading files there's a transient disconnection, either by the client computer or the download mirror, the installer permanently hangs.
...
The installer should re-connect on connection lost, and timeout with a crash if the connection has been failing for a while. Also it currently returns exit status 1 on success, where it should be 0. Status 1 means failure.

My tdm installer for windows consist of the installer and the updater.

  • The installer create the tdm folder, sets permissions/shortcuts,
    generate an uninstaller and download/runs the separate tdm-updater.
  • The tdm-updater (created by the tdm team) checks and downloads the tdm-files from the tdm-filemirrors.

During my test, I Confirm that the TDM installer for windows, fails to download the tdm updater from taaki's webserver.
(Taaki location is online, but the installer fails to download it. dont know why yet)
But the installer react on it by unpacking and using an old tdm-updater.
The new and old updater runs (with his quirks) great, as it should be.

Without an internet connection, the installer does the things mentioned above.
But without an internet connection, the new and old updater crashes stops (or crashes?) immediately,
after hitting the continue-button to start the download procedure.
And it doesnt display any messages, but In the tdm-update log you will see it cannot find the list with tdm mirrors.

 

Quote

As result, as other people told me, users believe that the installer simply doesn't work on their systems
Additionally if you are using the installer for building a Linux package, the building process never finishes.

Then tell the people to only use the updater And avoid several beginner problems, by following the wiki:
http://wiki.thedarkmod.com/index.php?title=Installer_and_Manual_Installation
(The tdm installer is created to do the things mentioned in the wiki automatically.)
As far that i know of, the tdm-updater for linux doesnt build the binary, its download it.

At this moment, I only maintain sometimes the source of the tdminstaller on github.
People of the team compile the installer it and place it on the tdm website.

If you want to improve the my tdm installers, please let me know.
You can find the source of the tdm installer for windows (and others) on my github page:
https://github.com/freyk22
tdm installer for windows github info page:
https://github.com/freyk22/tdminstallerwin
tdm installer for windows source file
https://github.com/freyk22/tdminstallerwin/blob/master/src/darkmodinstaller.nsi
The source of the updater can be found on the svn-server (i think)
https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk
(more info, see tdm download page: http://www.thedarkmod.com/downloads/)

 

Edited by freyk

Share this post


Link to post
Share on other sites
4 hours ago, freyk said:

I would like to know at which time the installer hangs on your system.

I'm using a Linux system. You can reproduce the bug like this:

1. Run tdm_update.

2. Disconnect from the Internet.

3. Reconnect to the Internet.

Result: The installer permanently hangs.

4 hours ago, freyk said:

(or is it the updater? ..I think it is)

Yes, I meant tdm_update in all cases.

4 hours ago, freyk said:

To temporary solve your problem, download and run the latest tdm-updater from the download page.

Actually what I'm trying to do isn't to install the game, but to package it for Arch Linux.

And I realized that I don't even need the installer for that. I could simply download the files from a mirror, and use good Unix utils for that. Easier to code, and more reliable.

Sorry for other operating system, but supporting them on my side would require considerably more work. As you cannot compose simple commands for making a new software, but you have to code everything. Plus I don't see them as a viable future.

I will share the code when it's finished.

Share this post


Link to post
Share on other sites

When a user run the updater, the developer of the updater inspects the user that uses a stable to internet and tdm mirrors.
You could create code to download files from a mirror, change the weight of some mirrors in the the tdm-mirror  list.

Does the tdm updater for linux, generates screen-output, a tdm-mirror file and tdm-log? 
If so, check the screen output, content tdm_update.log. And change mirror selection in the tdm-mirrors.txt. (dont forget to use the startup arguments of the updater) 

My advice is to read the installation manual on the wiki, check my code on my github page for the deb/rpm packages, look at the needed dependencies & write permissions.
Compare all this with the aur (and the excistings aur's).
Also look into other archlinux topics in this subforum. 

Manual for installation tdm on linux:
http://wiki.thedarkmod.com/index.php?title=Installer_and_Manual_Installation#Linux
http://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide

I have some experience by trying to create  linux rpm/deb packages, but its not much to help you.

Edited by freyk

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...