Opened 8 years ago

Closed 8 years ago

#2879 closed bug (Fixed)

Opening a file from a finished torrent causes a dyld error

Reported by: Gregorio Litenstein Owned by:
Priority: major Milestone: 1.3.14
Component: Packaging Version: 1.3.13
Keywords: dyld, environment, lib Cc:

Description

I just noticed this bug, which appears to be present at least since 1.3.12 (haven't tested with prior versions) in OSX.

If you try to open a file from inside a finished torrent, occasionally you get a dyld error because for some reason whichever app tries to load with DYLD_LIBRARY_PATH=/Applications/Deluge.app/Contents/Resources/lib

Change History (5)

comment:1 by Calum, 8 years ago

I cannot replicate on my osx virtualbox. Do you have a specific file type and application?

Does it work if you modify /Applications/Deluge.app/Contents/MacOS/Deluge:

- export DYLD_LIBRARY_PATH = $bundle_lib
+ export DYLD_LIBRARY_PATH = $bundle_lib:$DYLD_LIBRARY_PATH

comment:2 by Calum, 8 years ago

Milestone: needs verified1.3.14

in reply to:  2 comment:3 by Gregorio Litenstein, 8 years ago

Nope, that doesn't fix it. Although I think I have some more info on the particular circumstances that might trigger the bug.

It doesn't occur with everything, I was originally (and am still) seeing it when trying to open a video that would launch mpv.app, and I noticed the particular error is caused by mpv trying to use libfreetype and instead finding Deluge.app's own libfreetype (which is an earlier, thus deemed incompatible, version)

Obviously the root of the issue would appear to be the same thing; for some reason it is trying to launch mpv.app with its own DYLD_LIBRARY_PATH.

I attempted both the fix you suggested and also inverting $bundle_lib and $DYLD_LIBRARY_PATH but $DYLD_LIBRARY_PATH is empty at that point in the script so it's the same as doing nothing.

Tampering around with your idea though; I HAVE found a fix, although I don't know if it will have any ramificatons.

- export DYLD_LIBRARY_PATH = $bundle_lib
+ export DYLD_FALLBACK_LIBRARY_PATH = $bundle_lib

comment:4 by Calum, 8 years ago

Thanks that is a useful update. We might have to just go with that as I am not entirely sure atm what the correct way to do this is.

This might explain why modifying DYLD_LIBRARY_PATH didn't work if it contains an absolute path: http://stackoverflow.com/a/41072072/175584

OSX is such a headache... do you feel like switching to Ubuntu? ;)

comment:5 by Calum, 8 years ago

Resolution: Fixed
Status: newclosed

Fixed 1.3-stable [7f01dc909] develop [011afe3e8]

Note: See TracTickets for help on using tickets.