Deluge Windows Builds

Specific support for Deluge on Microsoft Windows OS
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

I cannot guarenti that it's yarss2 related, but just highly suspect so. There's several posts/threads around the net about this, and several having comtacted me with such deluge crashes, and so after reading up on it and asking affected if they had yarss2, then they did and e.g. one without any yarss2 errors in logs could consistently reproduce running fine for days without yarss2 and enabling yarss2 would crash deluge within max 24 hours, ussually much less than that. I've never could reproduce myself though, as stated.

A yarss2 bugtracker ticket and google-search-link:
https://bitbucket.org/bendikro/deluge-y ... luge-often
https://www.google.dk/search?q=deluge%20yarss2%20crash

The error you posted from GTK actually sounds related(some gtk errors aren't), with one thread explaining crashing in his python(2) and gtk3 app with said error, and some tips for code-fixes, but sorry it's way over my head to try fix unfortunetly and would need actually talented people in this, for looking into.

The yarss2 you used gotten from forum, I suspect is mine, and was just posted because a user had ssl verification errors and since I couldn't fix that, or even knew why happened(dll's was in place), then I suggested all I could do was to disable ssl verification if wanted, and so I made upon request, if remember right at least. Not the best workaround in the world obviously, and also what that warning you mentioned was about, but better than nothing I thought, well if accepting the security risk of-course.

Anyway, I just tested in a win10 VM that the two x64 builds of doadin does include the needed dll's, and testing with adding a yarss2 feed with a https url of 'https://expired.badssl.com' obviously didn't return any downloads, but did state that ssl verification failed as had expired certificate, showing me that the ssl dll's is found and compatible, so I don't understand why you get such message meaning they are not found or not compatible. I didn't test the x32 builds though.

I didn't wanted to answer for doadin before, and as you say hopefully he will give his input if needed, but he expressed here before that he's not interessted in making a confusing situation of which is official and which isn't(for when official release comes) - better explained than by me here :)

I honestly can't remember now and to lazy to go back and check now, but I don't think the names are wrong. It's deluge with lt1.2.x and with lt2.x, and a dev-build-number in the extracted installer-names - sorry if i'm wrong here. Nowhere is listed deluge-2.0.5 I atleast am pretty certain about(lt2.0.5 is libtorrent 2.0.5).

Last, good thinking on the minimize theory/test you explained, could be - infact now you say that, then I seem remember another user tried that too, but failed after some hours sadly he reported to me, but you could be lucky of-course.

Good luck mate, sorry cannot really help you any better.
User avatar
ambipro
Moderator
Moderator
Posts: 418
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: Deluge Windows Builds

Post by ambipro »

So while minimized to tray, it crashed again. No ERROR - but a warning. I've restarted it and minimized it back to the tray once again to try and see if it replicates the same way. Don't know if you were interested since it is above your head or whatever, but the warning is below.

Code: Select all

(deluge:5904): Gtk-WARNING **: 11:55:40.335: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators
There were no other messages before or after this, simply deluge-debug exiting and deluge crashed.

I have a copy of 2.0.5 that doesn't appear to list itself as a dev build in the about window, so I'll see if updating to that and removing py-3.9 from YaRSS's filename will work - hopefully this crash you speak of isn't ongoing, or causing the GTK errors, or who knows.

Is 2.1.x planned to be in beta/dev for the foreseeable future out of curiosity?

Thanks for your prompt responses, and I'll try and keep you posted on the experiences I'm having etc.

edit: Just a thought, but could any of this be theme specific? I'm using the Win32 theme selected at install.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

Even though I am not able to fix this, then hopefully others in the know could get some hints from it and be helpfull to them, so appreciate the debug-info/warnings etc posted.

If you do end up not using doadin's builds, then if you kindly would do me a favor and post in one of the other stickied threads, top one preferably as most up-to-date, so we don't derail the current subject of this thread. Granted the crashing info and whatnot is same with his versions, but just thought might as well keep it seperated. I say that more regarding me than you btw, as have a tendency to ramble on and so can quickly make a thread get out of hand and people later be like "do you really expect me to read xx amount of pages just to be up-to-date with current progress?" etc. Thanks in advance mate :)

Anyway, I don't know how long before a new stable release comes honestly. Deluge 2.0.5 is last stable version of deluge, so posted deluge-2.0.5 installers will identify as stable deluge 2.0.5, and is just all the releases with dev in name/version which is dev snapshots, e.g. 2.1.0-devxx is such for next comming stable deluge 2.1, and older 2.0.4-devxx for previous released deluge 2.0.4 stable etc.

About your edit, then I have suggested that before to affected users to test, but sadly didn't help switching themes reportedly. As of yet, as said, then disabling yarss2 is most likely the best workaround, as triggers such gtk crashing error, and possibly also the deamon, as said cannot remember fully, though I understand yarss2 is hard to live without, though there are e.g. flexget alternative, though harder to setup since more advanced - I know nothing about either one btw, so cannot assist with that.
doadin
Seeder
Seeder
Posts: 113
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

I know I haven't been keeping up with this, however I thought id upload new builds and clarify better what versions of which tools where used to build.
Deluge (2.1.0.dev122 the latest tag on github)
Python 3.9.13(just released 10 days ago)
gtk+-3.24.30(released 2021-Jul-08)
libtorrent 2.0.6(Released Apr 18, 2022) or 1.2.15(Released Nov 21, 2021 newest build from this branch not uploaded to pypi) according to file name.(lt2.0.6 vs lt1.2.15)
OpenSSL 1.1.1n
Python Twisted 22.4.0
deluge-py3.9-lt2.0.6-x86 5-26-22.zip(https://mega.nz/file/2gYTjATb#h9zVh28er ... Gn9ZN0V2rQ)
deluge-py3.9-lt2.0.6-x64 5-26-22.zip(https://mega.nz/file/TxoSyIhC#YLdq9wMHK ... VNo7GUv9eE)
deluge-py3.9-lt1.2.15-x86 5-26-22.zip(https://mega.nz/file/mwRnQDbQ#h_d8IirU_ ... E2QdZZfpPA)
deluge-py3.9-lt1.2.15-x64 5-26-22.zip(https://mega.nz/file/HgYGXY4Q#kepeCxqOj ... X1PvrDwkGs)

I have been building with the latest tag and yes at some point cas made a new tag for 2.1.x dev so when that happened I just continued building with latest tag, I could build with older releases/tags however they did not include fixes for crashes and would be less stable than these. And again wouldnt want my builds confused with a official release. Just have to wait for cas to be ready.

Edit: I am going to try and make another set of builds with newer GTK version soon.

Edit2: New builds with all the same build deps except gtk to gtk-3.24.34(released 2022-May-18)(and some of its deps updated)
deluge-py3.9-lt2.0.6-x86 5-27-22.zip(https://mega.nz/file/S9AVBTSR#Ug3btrlbE ... 5fTdByua6o)
deluge-py3.9-lt2.0.6-x64 5-27-22.zip(https://mega.nz/file/qhRHSRAK#qsH8_hgSk ... JpHRVgt3Tc)
deluge-py3.9-lt1.2.15-x86 5-27-22.zip(https://mega.nz/file/y1onjZqS#IYuX__IxQ ... PJkRxBiDa8)
deluge-py3.9-lt1.2.15-x64 5-27-22.zip(https://mega.nz/file/vpYzAKrS#l2Lnjncel ... U6Dm8fI1D0)
highvoltage
Leecher
Leecher
Posts: 57
Joined: Mon Apr 11, 2016 11:11 pm
Location: Brazil

Re: Deluge Windows Builds

Post by highvoltage »

doadin wrote: Fri May 27, 2022 3:33 am I know I haven't been keeping up with this, however I thought id upload new builds and clarify better what versions of which tools where used to build.
Deluge (2.1.0.dev122 the latest tag on github)
Python 3.9.13(just released 10 days ago)
gtk+-3.24.30(released 2021-Jul-08)
libtorrent 2.0.6(Released Apr 18, 2022) or 1.2.15(Released Nov 21, 2021 newest build from this branch not uploaded to pypi) according to file name.(lt2.0.6 vs lt1.2.15)
OpenSSL 1.1.1n
Python Twisted 22.4.0
deluge-py3.9-lt2.0.6-x86 5-26-22.zip(https://mega.nz/file/2gYTjATb#h9zVh28er ... Gn9ZN0V2rQ)
deluge-py3.9-lt2.0.6-x64 5-26-22.zip(https://mega.nz/file/TxoSyIhC#YLdq9wMHK ... VNo7GUv9eE)
deluge-py3.9-lt1.2.15-x86 5-26-22.zip(https://mega.nz/file/mwRnQDbQ#h_d8IirU_ ... E2QdZZfpPA)
deluge-py3.9-lt1.2.15-x64 5-26-22.zip(https://mega.nz/file/HgYGXY4Q#kepeCxqOj ... X1PvrDwkGs)

I have been building with the latest tag and yes at some point cas made a new tag for 2.1.x dev so when that happened I just continued building with latest tag, I could build with older releases/tags however they did not include fixes for crashes and would be less stable than these. And again wouldnt want my builds confused with a official release. Just have to wait for cas to be ready.

Edit: I am going to try and make another set of builds with newer GTK version soon.

Edit2: New builds with all the same build deps except gtk to gtk-3.24.34(released 2022-May-18)(and some of its deps updated)
deluge-py3.9-lt2.0.6-x86 5-27-22.zip(https://mega.nz/file/S9AVBTSR#Ug3btrlbE ... 5fTdByua6o)
deluge-py3.9-lt2.0.6-x64 5-27-22.zip(https://mega.nz/file/qhRHSRAK#qsH8_hgSk ... JpHRVgt3Tc)
deluge-py3.9-lt1.2.15-x86 5-27-22.zip(https://mega.nz/file/y1onjZqS#IYuX__IxQ ... PJkRxBiDa8)
deluge-py3.9-lt1.2.15-x64 5-27-22.zip(https://mega.nz/file/vpYzAKrS#l2Lnjncel ... U6Dm8fI1D0)
Hi doadin, thanks for post.

Please check

deluge-py3.9-lt2.0.6-x64 5-27-22.zip - not start in win11 x64



Traceback (most recent call last):
File "deluge-script.pyw", line 33, in <module>
File "deluge\ui\ui_entry.py", line 140, in start_ui
File "deluge\ui\gtk3\__init__.py", line 45, in start
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "deluge\ui\gtk3\gtkui.py", line 16, in <module>
ModuleNotFoundError: No module named 'gi'
heartdead
New User
New User
Posts: 3
Joined: Sat May 28, 2022 4:31 am

Re: Deluge Windows Builds

Post by heartdead »

just made a account to say that this does not work on my W11 either.
same message as Highvoltage

Traceback (most recent call last):
File "deluge-script.pyw", line 33, in <module>
File "deluge\ui\ui_entry.py", line 140, in start_ui
File "deluge\ui\gtk3\__init__.py", line 45, in start
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "deluge\ui\gtk3\gtkui.py", line 16, in <module>
ModuleNotFoundError: No module named 'gi'
Saloframes
New User
New User
Posts: 1
Joined: Fri May 08, 2020 11:41 pm

Re: Deluge Windows Builds

Post by Saloframes »

heartdead wrote: Sat May 28, 2022 4:32 am just made a account to say that this does not work on my W11 either.
same message as Highvoltage

Traceback (most recent call last):
File "deluge-script.pyw", line 33, in <module>
File "deluge\ui\ui_entry.py", line 140, in start_ui
File "deluge\ui\gtk3\__init__.py", line 45, in start
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "deluge\ui\gtk3\gtkui.py", line 16, in <module>
ModuleNotFoundError: No module named 'gi'
Getting the same error on Windows 10.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

@doadin,

Took a quick peek and did some testings...

If in gvsbuild not letting it install a separate "building-python-version" for you(so using '--same-python'), then I see that 'build' python module isn't installed from 'gvsbuild\tools.py'(from 'ToolPython' class). This in turn breaks pycairo/pygobject as gvsbuild uses this module now to build them, so to fix then add 'pip install build' before firering the build off and will work.

(I also had to add '--patches-root-dir' arg, though is PR submitted for that already I see. I changed to the new 'pip install .' and 'gvsbuild build xxx' way they now transformed into, in these tests, and didn't test if the deprecated old way of calling build.py directly, still worked.)

Btw, unrelated but when I previously mentioned that you didn't make a stable build, then I hope you understood that I solely meant regarding release tag specifically and not regarding stability in any way - bad wording on my part, sorry about that :)

Thanks.

Edit: Btw, I haven't bothered try investigate why(yet atleast), but pyinstaller needs downgraded 2 versions I found(pip install pyinstaller==4.10) to not quit upon a typelib not found error('gi.repository.GLib.GError: g-irepository-error-quark: Typelib file for namespace 'Gst', version '1.0' not found (0)') - strange thing is that same error is on v4.10 and down, though just not break the process. It's in gst namespace(gstreamer), so probably not important, as I don't believe we build that even(seperate project in gvsbuild if remember correct). Anyway, I here followed instructions in deluge's packaging-readme and used only upstream provided spec and rest files, in which case then need change setup-nsis.py to include ''packaging', 'win' to 'os.path.join', because of me following instructions, and also not mentioned even need running(setup-nsis.py), so should probably make PR for these things sometime, if i'm not beaten.

Edit2: Quick preliminary look shows it's drawn in from 'gi.repository' for whatever reason. Sometimes certain error's wouldn't be showstoppers in pyinstaller v4.x and so was one of the things they fixed in v5.x through some new isolated child/parent mechanism way over my head, hence last v4.x works for us - i'm thinking using 'excludes' in spec for gst-modules, or masking/delete the gst-hooks etc, but not tried yet.

Edit3: Adding these gst-modules to 'excludes' in line 153 in spec, fixes the issue with pyinstaller 5.x:

Code: Select all

excludes=['gi.repository.Gst','gi.repository.GstAudio','gi.repository.GstVideo','gi.repository.GstBase','gi.repository.GstPbutils'],
Edit4: I just thought it was the installers with newest gtk reported failing, but I now actually downloaded and checked both, and find both affected. Anyway, the fixes reported here still aplies, and just wanted to explain my confusing reply.
doadin
Seeder
Seeder
Posts: 113
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

mhertz wrote: Sat May 28, 2022 10:41 pm @doadin,

Took a quick peek and did some testings...

If in gvsbuild not letting it install a separate "building-python-version" for you(so using '--same-python'), then I see that 'build' python module isn't installed from 'gvsbuild\tools.py'(from 'ToolPython' class). This in turn breaks pycairo/pygobject as gvsbuild uses this module now to build them, so to fix then add 'pip install build' before firering the build off and will work.

(I also had to add '--patches-root-dir' arg, though is PR submitted for that already I see. I changed to the new 'pip install .' and 'gvsbuild build xxx' way they now transformed into, in these tests, and didn't test if the deprecated old way of calling build.py directly, still worked.)

Btw, unrelated but when I previously mentioned that you didn't make a stable build, then I hope you understood that I solely meant regarding release tag specifically and not regarding stability in any way - bad wording on my part, sorry about that :)

Thanks.

Edit: Btw, I haven't bothered try investigate why(yet atleast), but pyinstaller needs downgraded 2 versions I found(pip install pyinstaller==4.10) to not quit upon a typelib not found error('gi.repository.GLib.GError: g-irepository-error-quark: Typelib file for namespace 'Gst', version '1.0' not found (0)') - strange thing is that same error is on v4.10 and down, though just not break the process. It's in gst namespace(gstreamer), so probably not important, as I don't believe we build that even(seperate project in gvsbuild if remember correct). Anyway, I here followed instructions in deluge's packaging-readme and used only upstream provided spec and rest files, in which case then need change setup-nsis.py to include ''packaging', 'win' to 'os.path.join', because of me following instructions, and also not mentioned even need running(setup-nsis.py), so should probably make PR for these things sometime, if i'm not beaten.

Edit2: Quick preliminary look shows it's drawn in from 'gi.repository' for whatever reason. Sometimes certain error's wouldn't be showstoppers in pyinstaller v4.x and so was one of the things they fixed in v5.x through some new isolated child/parent mechanism way over my head, hence last v4.x works for us - i'm thinking using 'excludes' in spec for gst-modules, or masking/delete the gst-hooks etc, but not tried yet.

Edit3: Adding these gst-modules to 'excludes' in line 153 in spec, fixes the issue with pyinstaller 5.x:

Code: Select all

excludes=['gi.repository.Gst','gi.repository.GstAudio','gi.repository.GstVideo','gi.repository.GstBase','gi.repository.GstPbutils'],
Edit4: I just thought it was the installers with newest gtk reported failing, but I now actually downloaded and checked both, and find both affected. Anyway, the fixes reported here still aplies, and just wanted to explain my confusing reply.
Yea I was looking into the new build process and changes it needed. Thanks for this!
doadin
Seeder
Seeder
Posts: 113
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

mhertz wrote: Sat May 28, 2022 10:41 pm @doadin,

Took a quick peek and did some testings...

If in gvsbuild not letting it install a separate "building-python-version" for you(so using '--same-python'), then I see that 'build' python module isn't installed from 'gvsbuild\tools.py'(from 'ToolPython' class). This in turn breaks pycairo/pygobject as gvsbuild uses this module now to build them, so to fix then add 'pip install build' before firering the build off and will work.

(I also had to add '--patches-root-dir' arg, though is PR submitted for that already I see. I changed to the new 'pip install .' and 'gvsbuild build xxx' way they now transformed into, in these tests, and didn't test if the deprecated old way of calling build.py directly, still worked.)

Btw, unrelated but when I previously mentioned that you didn't make a stable build, then I hope you understood that I solely meant regarding release tag specifically and not regarding stability in any way - bad wording on my part, sorry about that :)

Thanks.

Edit: Btw, I haven't bothered try investigate why(yet atleast), but pyinstaller needs downgraded 2 versions I found(pip install pyinstaller==4.10) to not quit upon a typelib not found error('gi.repository.GLib.GError: g-irepository-error-quark: Typelib file for namespace 'Gst', version '1.0' not found (0)') - strange thing is that same error is on v4.10 and down, though just not break the process. It's in gst namespace(gstreamer), so probably not important, as I don't believe we build that even(seperate project in gvsbuild if remember correct). Anyway, I here followed instructions in deluge's packaging-readme and used only upstream provided spec and rest files, in which case then need change setup-nsis.py to include ''packaging', 'win' to 'os.path.join', because of me following instructions, and also not mentioned even need running(setup-nsis.py), so should probably make PR for these things sometime, if i'm not beaten.

Edit2: Quick preliminary look shows it's drawn in from 'gi.repository' for whatever reason. Sometimes certain error's wouldn't be showstoppers in pyinstaller v4.x and so was one of the things they fixed in v5.x through some new isolated child/parent mechanism way over my head, hence last v4.x works for us - i'm thinking using 'excludes' in spec for gst-modules, or masking/delete the gst-hooks etc, but not tried yet.

Edit3: Adding these gst-modules to 'excludes' in line 153 in spec, fixes the issue with pyinstaller 5.x:

Code: Select all

excludes=['gi.repository.Gst','gi.repository.GstAudio','gi.repository.GstVideo','gi.repository.GstBase','gi.repository.GstPbutils'],
Edit4: I just thought it was the installers with newest gtk reported failing, but I now actually downloaded and checked both, and find both affected. Anyway, the fixes reported here still aplies, and just wanted to explain my confusing reply.
From build log I am seeing patching file gi/__init__.py
Hunk #1 succeeded at 36 (offset -2 lines).
Hunk #2 succeeded at 50 with fuzz 2 (offset -3 lines).
Running build.py directly is now deprecated, please run `pip install .`
usage: build.py [-h] [-v] [-d] {build,list,outdated} ...
When using this commandline
poetry run gvsbuild build
--platform=${{ matrix.arch }}
--vs-ver=${{ matrix.vstudio }}
--same-python
--enable-gi
--py-wheel
--skip gtksourceview4,emeus,clutter
gtk3-full pycairo pygobject lz4 enchant
So not sure what is happening.
Post Reply