[FIX] qAnimation plugin crash OSX
[FIX] qAnimation plugin crash OSX
Hi everyone
I want to share my fix for the qAnimation plugin crash OSX which is described in the those topics:
http://www.danielgm.net/cc/forum/viewto ... tion#p7628
http://www.danielgm.net/cc/forum/viewto ... tion#p8504
http://www.danielgm.net/cc/forum/viewto ... tion#p9065
The last few hours I've investigated that crash and found out that the ffmpeg libraries caused the problem. I replaced the necessary libraries with newer versions an now it worked!
FFMPEG Library source: HOMEBREW ( brew install ffmpeg ) on 25.01.2018 Simply copy an replace the files from CC_ffmpeg_57_osx.zip to /Applications/CloudCompare.app/Contents/Frameworks
Files: http://ul.to/nx4zw7yx
Working libraries used on OSX Sierra 10.12.6 with CloudCompare 2.9.1
(Don't switch between windows during rendering. In my case it will result in an error)
Cheers Bruzzlee
I want to share my fix for the qAnimation plugin crash OSX which is described in the those topics:
http://www.danielgm.net/cc/forum/viewto ... tion#p7628
http://www.danielgm.net/cc/forum/viewto ... tion#p8504
http://www.danielgm.net/cc/forum/viewto ... tion#p9065
The last few hours I've investigated that crash and found out that the ffmpeg libraries caused the problem. I replaced the necessary libraries with newer versions an now it worked!
FFMPEG Library source: HOMEBREW ( brew install ffmpeg ) on 25.01.2018 Simply copy an replace the files from CC_ffmpeg_57_osx.zip to /Applications/CloudCompare.app/Contents/Frameworks
Files: http://ul.to/nx4zw7yx
Working libraries used on OSX Sierra 10.12.6 with CloudCompare 2.9.1
(Don't switch between windows during rendering. In my case it will result in an error)
Cheers Bruzzlee
Re: [FIX] qAnimation plugin crash OSX
Thanks Bruzzlee.
This will only work until you change/modify/update/move the homebrew ffmpeg libs on your machine.
All of those dylibs have hard-coded paths to the homebrew-installed versions. So you'll get the one in the homebrew install, not the one right next to it.
For example, on my machine, homebrew's libavcodec.57.107.100.dylib includes paths to:
So once those files are moved or changed, you'll crash again.
To create a distributable application, all these paths must be changed to be relative to where they are installed. So in the example, they will become:
Because CC includes so many libs it's easy to miss things and - since I only have dev machines - I won't see the problem immediately. I do have a script to do this and then I go through and manually check all the paths since I know this is an issue.
I've checked what I released w/2.9.1 and I don't yet see the problem, but I'll let you know if I find it.
This will only work until you change/modify/update/move the homebrew ffmpeg libs on your machine.
All of those dylibs have hard-coded paths to the homebrew-installed versions. So you'll get the one in the homebrew install, not the one right next to it.
For example, on my machine, homebrew's libavcodec.57.107.100.dylib includes paths to:
Code: Select all
/Users/maloney/dev/Cellar/ffmpeg/3.4.1/lib/libswresample.2.dylib
/Users/maloney/dev/Cellar/ffmpeg/3.4.1/lib/libavutil.2.dylib
To create a distributable application, all these paths must be changed to be relative to where they are installed. So in the example, they will become:
Code: Select all
@executable_path/../Frameworks/libswresample.2.dylib
@executable_path/../Frameworks/libavutil.2.dylib
I've checked what I released w/2.9.1 and I don't yet see the problem, but I'll let you know if I find it.
Re: [FIX] qAnimation plugin crash OSX
Bruzzlee:
I can't reproduce a crash with the animation plugin in 2.9.1.
I tried it on a machine with homebrew installed in a different path and it works fine for me.
Can you please try the unmodified 2.9.1 again and tell me what the crash report says? It is easier for me to track if you can report it as a GitHub issue.
Thanks.
I can't reproduce a crash with the animation plugin in 2.9.1.
I tried it on a machine with homebrew installed in a different path and it works fine for me.
Can you please try the unmodified 2.9.1 again and tell me what the crash report says? It is easier for me to track if you can report it as a GitHub issue.
Thanks.
Re: [FIX] qAnimation plugin crash OSX
First of all: Thanks for your effort to provide CC for OSX!
Report done:
https://github.com/CloudCompare/CloudCompare/issues/643
I did not do that in the first place as I thought it is not a CloudCompare problem itself.
Cheers Bruzzlee
Report done:
https://github.com/CloudCompare/CloudCompare/issues/643
I did not do that in the first place as I thought it is not a CloudCompare problem itself.
Cheers Bruzzlee
Re: [FIX] qAnimation plugin crash OSX
I've checked my .dylib's - you are right. There are some hard coded paths:asmaloney wrote:Thanks Bruzzlee.
This will only work until you change/modify/update/move the homebrew ffmpeg libs on your machine.
All of those dylibs have hard-coded paths to the homebrew-installed versions. So you'll get the one in the homebrew install, not the one right next to it.
For example, on my machine, homebrew's libavcodec.57.107.100.dylib includes paths to:
So once those files are moved or changed, you'll crash again.Code: Select all
/Users/maloney/dev/Cellar/ffmpeg/3.4.1/lib/libswresample.2.dylib /Users/maloney/dev/Cellar/ffmpeg/3.4.1/lib/libavutil.2.dylib
To create a distributable application, all these paths must be changed to be relative to where they are installed. So in the example, they will become:
Because CC includes so many libs it's easy to miss things and - since I only have dev machines - I won't see the problem immediately. I do have a script to do this and then I go through and manually check all the paths since I know this is an issue.Code: Select all
@executable_path/../Frameworks/libswresample.2.dylib @executable_path/../Frameworks/libavutil.2.dylib
I've checked what I released w/2.9.1 and I don't yet see the problem, but I'll let you know if I find it.
In my case:
/usr/local/opt/ffmpeg/lib/
/usr/local/Cellar/ffmpeg/3.4.1/lib/
In the original libraries I found this
--prefix=/Users/maloney/dev/Cellar/ffmpeg/3.4
in every library. But as you wrote that you tested it with a different path I don't think that is causing the problem.
Re: [FIX] qAnimation plugin crash OSX
Yeah - that's fine. That's just a text string storing the compile options used when building it. They do not affect the load paths.In the original libraries I found this
--prefix=/Users/maloney/dev/Cellar/ffmpeg/3.4
in every library.
For way too much info about the libs, you can play with 'otool'. For example:
Code: Select all
otool -L libavcodec.57.dylib
Code: Select all
@executable_path/../Frameworks/libavcodec.57.dylib (compatibility version 57.0.0, current version 57.107.100)
@executable_path/../Frameworks/libswresample.2.dylib (compatibility version 2.0.0, current version 2.9.100)
@executable_path/../Frameworks/libavutil.55.dylib (compatibility version 55.0.0, current version 55.78.100)
...
For way WAY too much info:
Code: Select all
otool -l libavcodec.57.dylib
-
- Posts: 5
- Joined: Mon May 14, 2018 5:23 pm
Re: [FIX] qAnimation plugin crash OSX
Hey,
Is there any progress towards an update or fix for this problem? I'm on High Sierra, I tried replacing the framework files with the ones in the OP but all that did was completely remove the qAnimation plugin button from the CloudCompare window.
Is there any progress towards an update or fix for this problem? I'm on High Sierra, I tried replacing the framework files with the ones in the OP but all that did was completely remove the qAnimation plugin button from the CloudCompare window.
Re: [FIX] qAnimation plugin crash OSX
@TheOrdinaryMan:
I was never able to reproduce this crash with the CloudCompare 2.9.1 release on macOS 10.12.
Would you please create an issue on GitHub with the details of the error you're seeing?
I was never able to reproduce this crash with the CloudCompare 2.9.1 release on macOS 10.12.
Would you please create an issue on GitHub with the details of the error you're seeing?
-
- Posts: 5
- Joined: Mon May 14, 2018 5:23 pm
Re: [FIX] qAnimation plugin crash OSX
Not much here that wasn't already stated in the other topics, but here you go:
https://github.com/CloudCompare/CloudCo ... -329214102
https://github.com/CloudCompare/CloudCo ... -329214102