You are not logged in.

#1 2009-09-25 19:41:00

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

vertigo - a small download manager daemon

back to the drawing board

Last edited by aev- (2010-07-31 13:40:03)

Offline

#2 2009-09-25 22:20:49

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

I cant seem to get this working, but maybe its just me.

With path variable "~/vertigo" I get segmentation fault, and with "/home/myuser/vertigo" vertigo stays running without error and newclient executes correctly, but it exactly doesnt download any file to that directory.
And yes, I have the directory "vertigo" at my ~. I did use "make nodaemon".

I tried with 2 files, running:
"./newclient ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.4.1/gcc-4.4.1.tar.gz"
and
"./newclient http://storefront.steampowered.com/download/SteamInstall.msi"

while vertigo is running.

EDIT: Im running i686 Arch. Links were okay when I pasted them to ./newclient, FluxBB just shortened them.

EDIT2: I forgot the dependency libfetch. Now after installing it, it still doesnt seem to work. I recompiled the vertigo after "pacman -S libfetch". Newclient executes correctly, but vertigo is closing with error "Segmentation fault". I also tried to add "/" to the config.h path, so it's like "/home/myuser/vertigo/" but that didnt help either.

Last edited by unideal (2009-09-25 22:31:31)

Offline

#3 2009-09-25 22:34:18

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: vertigo - a small download manager daemon

unideal wrote:

EDIT2: I forgot the dependency libfetch. Now after installing it, it still doesnt seem to work. I recompiled the vertigo after "pacman -S libfetch". Newclient executes correctly, but vertigo is closing with error "Segmentation fault". I also tried to add "/" to the config.h path, so it's like "/home/myuser/vertigo/" but that didnt help either.

Are you still using pacman 3.2.2 ? Because pacman depends on libfetch since 3.3.

Offline

#4 2009-09-25 22:36:40

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

Garns wrote:
unideal wrote:

EDIT2: I forgot the dependency libfetch. Now after installing it, it still doesnt seem to work. I recompiled the vertigo after "pacman -S libfetch". Newclient executes correctly, but vertigo is closing with error "Segmentation fault". I also tried to add "/" to the config.h path, so it's like "/home/myuser/vertigo/" but that didnt help either.

Are you still using pacman 3.2.2 ? Because pacman depends on libfetch since 3.3.

Im using Pacman v3.3.0.

Im beginner with arch though. I thought I don't have libfetch installed since "pacman -S libfetch" did the trick. But I guess it updated my libfetch?

Offline

#5 2009-09-26 06:56:48

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

Re: vertigo - a small download manager daemon

unideal wrote:

I cant seem to get this working, but maybe its just me.

With path variable "~/vertigo" I get segmentation fault, and with "/home/myuser/vertigo" vertigo stays running without error and newclient executes correctly, but it exactly doesnt download any file to that directory.
And yes, I have the directory "vertigo" at my ~. I did use "make nodaemon".

I tried with 2 files, running:
"./newclient ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.4.1/gcc-4.4.1.tar.gz"
and
"./newclient http://storefront.steampowered.com/download/SteamInstall.msi"

while vertigo is running.

EDIT: Im running i686 Arch. Links were okay when I pasted them to ./newclient, FluxBB just shortened them.

EDIT2: I forgot the dependency libfetch. Now after installing it, it still doesnt seem to work. I recompiled the vertigo after "pacman -S libfetch". Newclient executes correctly, but vertigo is closing with error "Segmentation fault". I also tried to add "/" to the config.h path, so it's like "/home/myuser/vertigo/" but that didnt help either.

Sounds bad. How were you even able to build vertigo without libfetch though?
Also, the files weren't doenloaded to something like "/home/myuser/vertigoSteamInstall.msi" by any chance?

Other than that, I have no clue at the moment. I will set up a Arch i686 on one of my machines and report back. Sorry for the inconvenience.

EDIT: When exactly does the segfault happen? After you run newclient?

Last edited by aev- (2009-09-26 07:04:36)

Offline

#6 2009-09-26 07:28:39

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

aev- wrote:
unideal wrote:

I cant seem to get this working, but maybe its just me.

With path variable "~/vertigo" I get segmentation fault, and with "/home/myuser/vertigo" vertigo stays running without error and newclient executes correctly, but it exactly doesnt download any file to that directory.
And yes, I have the directory "vertigo" at my ~. I did use "make nodaemon".

I tried with 2 files, running:
"./newclient ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.4.1/gcc-4.4.1.tar.gz"
and
"./newclient http://storefront.steampowered.com/download/SteamInstall.msi"

while vertigo is running.

EDIT: Im running i686 Arch. Links were okay when I pasted them to ./newclient, FluxBB just shortened them.

EDIT2: I forgot the dependency libfetch. Now after installing it, it still doesnt seem to work. I recompiled the vertigo after "pacman -S libfetch". Newclient executes correctly, but vertigo is closing with error "Segmentation fault". I also tried to add "/" to the config.h path, so it's like "/home/myuser/vertigo/" but that didnt help either.

Sounds bad. How were you even able to build vertigo without libfetch though?
Also, the files weren't doenloaded to something like "/home/myuser/vertigoSteamInstall.msi" by any chance?

Other than that, I have no clue at the moment. I will set up a Arch i686 on one of my machines and report back. Sorry for the inconvenience.

EDIT: When exactly does the segfault happen? After you run newclient?

Nope. They didnt come anywhere near my home, or vertigo's parent / subfolder neither sad

Yeah, segfault happens after I run newclient with some download parameter (be it FTP or HTTP link).

EDIT:
Im not that experienced on programming:
is there any way to make that program print it's output on the Terminal? I made a simple printf() "debugger" to check in which function does the error occur, but sadly it does output nothing. It doesnt seem to enter main() at all.
I assume there is some compile command or other thing I should look for?

Last edited by unideal (2009-09-26 07:41:51)

Offline

#7 2009-09-26 08:00:26

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

Re: vertigo - a small download manager daemon

It doesnt seem to enter main() at all.

Sure you didn't build it as daemon? If so, the process forks a new one and closes itself, which means ./vertigo will seem to do nothing ("ps aux | grep vertigo" can tell you that). Also, if you build it as a daemon it closes stdin, stdout and stderr. All warnings and errors are written to /var/log/daemon.log via the syslog daemon.

Offline

#8 2009-09-26 08:09:33

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

aev- wrote:

It doesnt seem to enter main() at all.

Sure you didn't build it as daemon? If so, the process forks a new one and closes itself, which means ./vertigo will seem to do nothing ("ps aux | grep vertigo" can tell you that). Also, if you build it as a daemon it closes stdin, stdout and stderr. All warnings and errors are written to /var/log/daemon.log via the syslog daemon.

Im pretty sure I built it as make nodaemon (as Ive built it many times and it sure as "make nodaemon").

There are no errors / logging at my /var/log/daemon.log either.

ps aux | grep vertigo gives me:
[myuser@Mybox ~]$ ps aux | grep vertigo
myuser 2447 0.0 0.0 3428 842pts/1 S+ 14:06 0:00 ./vertigo
myuser 2456 0.0 0.0 3616 800pts/2 R+ 14:08 0:00 grep vertigo

Last edited by unideal (2009-09-26 08:10:18)

Offline

#9 2009-09-26 08:44:26

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

Re: vertigo - a small download manager daemon

Ok, tried it on Arch i686: Segfaults. Works fine on x86_64 (my PC and a friend tried it as well).
I will fix that. Thanks for your time and again, sorry for the inconvenience.

Offline

#10 2009-09-26 09:39:18

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

aev- wrote:

Ok, tried it on Arch i686: Segfaults. Works fine on x86_64 (my PC and a friend tried it as well).
I will fix that. Thanks for your time and again, sorry for the inconvenience.

No problem. smile And that wasnt an inconvenience smile I love to test new software, and see if I can find any bugs there.

EDIT: Forgot to say that I love the concept of vertigo smile I could have a few uses for it when its ready for i686.

Last edited by unideal (2009-09-26 09:41:04)

Offline

#11 2009-09-26 09:41:51

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: vertigo - a small download manager daemon

unideal wrote:

Im beginner with arch though. I thought I don't have libfetch installed since "pacman -S libfetch" did the trick. But I guess it updated my libfetch?

Yeah it did, or it reinstalled if you were up to date already.

Offline

#12 2009-09-26 09:43:53

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

Garns wrote:
unideal wrote:

Im beginner with arch though. I thought I don't have libfetch installed since "pacman -S libfetch" did the trick. But I guess it updated my libfetch?

Yeah it did, or it reinstalled if you were up to date already.

Thanks for the info. Is there any way to check with pacman if specified package is installed?

By the way, have you thought about adding cookies support to future versions of vertigo? Some sites require login in order to access the files, and having cookie support would enable the use of vertigo on those kind of websites.

Offline

#13 2009-09-26 11:29:45

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

Re: vertigo - a small download manager daemon

Ok, got rid of the bug. fetchStat(), which is used to get the filesize, frees the url struct, thus causing a segfault whenever it is dereferenced (only on 32bit systems though!). Consequently the correct filesize can't be detected at the moment, so verm will display -0.00001 or something like that. At least it should work.
I don't know if that is a bug in libfetch or only on 32bit Arch but I've noticed that libalpm doesn't use this function.

EDIT:

EDIT: Forgot to say that I love the concept of vertigo smile I could have a few uses for it when its ready for i686.

Thanks for the kind words.

By the way, have you thought about adding cookies support to future versions of vertigo? Some sites require login in order to access the files, and having cookie support would enable the use of vertigo on those kind of websites.

I haven't thought about this before. I will note it but this is pretty low priority for me at the moment (although it sounds pretty useful for sites like rapidshare).

Last edited by aev- (2009-09-26 11:39:00)

Offline

#14 2009-09-26 11:41:14

unideal
Member
Registered: 2009-09-24
Posts: 31

Re: vertigo - a small download manager daemon

aev- wrote:

I haven't thought about this before. I will note it but this is pretty low priority for me at the moment (although it sounds pretty useful for sites like rapidshare).

No problem. smile

Yeah, I can confirm the bug is fixed. The updated version works great here!

Offline

#15 2009-09-27 09:49:29

aev-
Member
From: Tannhäuser Gate
Registered: 2009-09-25
Posts: 11
Website

Re: vertigo - a small download manager daemon

Small update:
* merged vertigo.h and list.h (vertigo.h requires list.h anyway)
* fetchStat is used on x86_64 systems
* newclient -> vc, verm -> vm (have their own Makefiles now)
* <file> is downloaded to <file>.part until the download is finished
* a patch for surf (I don't have much clue about uzbl but given that it is supposed to be configured it would be better to call vc in download.sh instead of patching it, right?)

EDIT:
* download files into subfolders of DOWNLOAD_DIRECTORY depending on their filename extension (also create these directories). see config.h.

Last edited by aev- (2009-09-27 13:15:23)

Offline

Board footer

Powered by FluxBB