Blender crashes under TravisCI windows VM

I am trying to get blender working under TravisCI. So far I have been successful in getting linux to work. However when I try and get blender to work under the windows VM environment it crashes out with this complaint:

C:/Users/travis/build/douglaskastle/blender-2.82-nightly/blender.exe: error while loading shared libraries: libsndfile-1.dll: cannot open shared object file: No such file or directory

Has any one seen this before and do you know how to either fix it or bypass it? I am trying to run blender in batch mode so I have no need for the GUI interface or any sound.

I think I have seen this before when I have tried to X forward a linux session of blender back to a windows machine that was running a cygwin X server.

guessing you missed the ‘INSTALL’ stage of building that copies all the required dlls next to the blender binary.

I don’t build blender, just download the base windows release from the website and unzip it.

oh allright, hmmm … can you validate it unpacked properly? the sndfile dll should be sitting right next to the blender.exe file

Let me check, it’s a bit indirect to check these things.

yeah… environments like that generally time vampires to setup, i have a blender build on azure… oh man that was horrid to setup

build for 1.5 hour… oh crap… a typo in my script…
fix… restart build…
1.5 hours later #@%#@ missed a second typo…

OK i did that and it appears that libsndfile-1.dll is side by side with the blender file I use. I also reverted to just called blender to return its version, which should only be a command-line only option, no GUI required.

https://travis-ci.org/douglaskastle/blender-fake-addon/builds/608736558

$ ls ../blender-${BLENDER_VERSION}

1892.80

190BlendThumb64.dll

191GPL-license.txt

192GPL3-license.txt

193LICENSE-bfont.ttf.txt

194LICENSE-bmonofont-i18n.ttf.txt

195LICENSE-droidsans.ttf.txt

196OpenAL32.dll

197Python-license.txt

198SDL2.dll

199api-ms-win-core-console-l1-1-0.dll

200api-ms-win-core-console-l1-2-0.dll

201api-ms-win-core-datetime-l1-1-0.dll

202api-ms-win-core-debug-l1-1-0.dll

203api-ms-win-core-errorhandling-l1-1-0.dll

204api-ms-win-core-file-l1-1-0.dll

205api-ms-win-core-file-l1-2-0.dll

206api-ms-win-core-file-l2-1-0.dll

207api-ms-win-core-handle-l1-1-0.dll

208api-ms-win-core-heap-l1-1-0.dll

209api-ms-win-core-interlocked-l1-1-0.dll

210api-ms-win-core-libraryloader-l1-1-0.dll

211api-ms-win-core-localization-l1-2-0.dll

212api-ms-win-core-memory-l1-1-0.dll

213api-ms-win-core-namedpipe-l1-1-0.dll

214api-ms-win-core-processenvironment-l1-1-0.dll

215api-ms-win-core-processthreads-l1-1-0.dll

216api-ms-win-core-processthreads-l1-1-1.dll

217api-ms-win-core-profile-l1-1-0.dll

218api-ms-win-core-rtlsupport-l1-1-0.dll

219api-ms-win-core-string-l1-1-0.dll

220api-ms-win-core-synch-l1-1-0.dll

221api-ms-win-core-synch-l1-2-0.dll

222api-ms-win-core-sysinfo-l1-1-0.dll

223api-ms-win-core-timezone-l1-1-0.dll

224api-ms-win-core-util-l1-1-0.dll

225api-ms-win-crt-conio-l1-1-0.dll

226api-ms-win-crt-convert-l1-1-0.dll

227api-ms-win-crt-environment-l1-1-0.dll

228api-ms-win-crt-filesystem-l1-1-0.dll

229api-ms-win-crt-heap-l1-1-0.dll

230api-ms-win-crt-locale-l1-1-0.dll

231api-ms-win-crt-math-l1-1-0.dll

232api-ms-win-crt-multibyte-l1-1-0.dll

233api-ms-win-crt-private-l1-1-0.dll

234api-ms-win-crt-process-l1-1-0.dll

235api-ms-win-crt-runtime-l1-1-0.dll

236api-ms-win-crt-stdio-l1-1-0.dll

237api-ms-win-crt-string-l1-1-0.dll

238api-ms-win-crt-time-l1-1-0.dll

239api-ms-win-crt-utility-l1-1-0.dll

240avcodec-58.dll

241avdevice-58.dll

242avformat-58.dll

243avutil-56.dll

244blender.exe

245blender_debug_gpu.cmd

246blender_debug_gpu_glitchworkaround.cmd

247blender_debug_log.cmd

248blender_factory_startup.cmd

249concrt140.dll

250copyright.txt

251jemalloc-license.txt

252libsndfile-1.dll

253msvcp140.dll

254ocio-license.txt

255python37.dll

256readme.html

257swresample-3.dll

258swscale-5.dll

259ucrtbase.dll

260vcomp140.dll

261vcruntime140.dll

262The command "ls ../blender-${BLENDER_VERSION}" exited with 0.

2630.12s$ ../blender-${BLENDER_VERSION}/blender --version

264The command "../blender-${BLENDER_VERSION}/blender --version" exited with 127.

cache.2

265store build cache

2661.28sC:/Users/travis/build/douglaskastle/blender-2.80/blender.exe: error while loading shared libraries: libsndfile-1.dll: cannot open shared object file: No such file or directory

267

hmm what happens if you try

cd  ../blender-${BLENDER_VERSION}
blender --version 

Fails but different message on failure

> $ cd ../blender-${BLENDER_VERSION}
> 
> The command "cd ../blender-${BLENDER_VERSION}" exited with 0.
> 
> $ ./blender --version
> 
> The command "./blender --version" exited with 127.
> 
> cache.2
> 
> store build cache
> 
> The script chardetect.exe is installed in 'C:\Users\travis\.cache\blender\blender-2.80-windows64\2.80\python\Scripts' which is not on PATH.
> 
> Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
> 
> C:/Users/travis/build/douglaskastle/blender-2.80/blender.exe: error while loading shared libraries: AVIFIL32.dll: cannot open shared object file: No such file or directory
> 
> nothing changed

That’s a system dll which should be available on windows 2000 and up , weird that it is not found

lets try

dir C:\Windows\System32\\avifil32.dll  

to validate the dll exists

echo %path%

to see if the system folders are in the search path

set path=%path%;C:\Windows\System32\

to add it to the path anyhow

cd  ../blender-${BLENDER_VERSION}
blender --version 

same as before

It looks like it is run in powershell mode, the regular windows commands don’t work as is, echo %path% just returns %path%

$ dir C:\Windows\System32\\avifil32.dll

The command "dir C:\Windows\System32\\avifil32.dll" exited with 2.

prefix all commands with cmd /c and quote them, so instead of echo %path% use cmd /c "echo %path%"

Is it possible it fell through to prompt? I looks like is is awaiting commands, but it is in remote session I can’t background it.

$ cmd /c "dir C:\\Windows\\System32\\avifil32.dll"

Microsoft Windows [Version 10.0.17134.1006]

(c) 2018 Microsoft Corporation. All rights reserved.



C:\Users\travis\build\douglaskastle\blender-2.80>

yeah… i’m gonna give up, it’s clearly environment related but i lack the time to figure out what is making things unhappy sadly.

No worries, as you said time vampire, I think I am a little further along than when I started. Thanks for the pointers.

one last, try if launching just blender with the cmd /c blender.exe command works

so

cd  ../blender-${BLENDER_VERSION}
cmd /c "blender --version"

Same:

cmd /c "blender --version"

Microsoft Windows [Version 10.0.17134.1006]

(c) 2018 Microsoft Corporation. All rights reserved.



C:\Users\travis\build\douglaskastle\blender-2.80>

Those i did try using the powershell way:

powershell Start-Process 'blender.exe --version'

It does seem to run, without hanging, but doesn’t return anything to the console. I need to get sysexit’s returned to have my system to work.

I suspect that the travisCI setup for windows is not fit for purpose here yet, shame :frowning:

perhaps

powershell Start-Process -NoNewWindow 'blender.exe --version'

?

It seems to run, doesn’t hang, but does not return any information to the logging console:

https://travis-ci.org/douglaskastle/blender-fake-addon/builds/608784381

The command "cd ../blender-${BLENDER_VERSION}" exited with 0.

$ powershell Start-Process -NoNewWindow "blender --version"

The command "powershell Start-Process -NoNewWindow "blender --version"" exited with 0.

Feels like it is closer to the answer, but not all the way there

when i run it locally initially it popped up a new window that disappeared in under 200ms, when i added --NoNewWindow the output stayed in my terminal i ran the command from.

this thread on stack overflow may have some more ideas you can try.