Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
29th January 2022, 23:41 | #1 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Import script in c++ code fails for 32bit, works for 64bit
I got the following code (on github):
which works fine when used with 64bit AviSynth.dll (3.7.1) Code:
try { // always fails for 32bit WTF?! std::cout << "Importing " << qPrintable(m_currentInput) << std::endl; const char* infile = m_currentInput.toLocal8Bit(); //convert input name to char* AVSValue arg(infile); m_res = m_env->Invoke("Import", AVSValue(&arg, 1)); } catch (AvisynthError &err) { //catch AvisynthErrors std::cout << "Failed importing " << qPrintable(m_currentInput) << std::endl; std::cerr << "-> " << err.msg << std::endl; return false; } catch (...) { //catch everything else std::cerr << "-> invoking Import for " << qPrintable(m_currentInput) << " failed!" << std::endl; return false; } Output I get is: Code:
loaded avisynth dll,..(I:/workspace/avsInfo/debug/AviSynth.dll) loaded CreateScriptEnvironment definition from dll,.. loaded IScriptEnvironment using AVISYNTH_INTERFACE_VERSION,.. (9) getting avs linkage from environment Importing c:\Users\Selur\Desktop\version.avs The code itself should be fine as it works fine with the 64bit AviSynth.dll. Got the dlls from the AviSynthPlus_3.7.1_20211231-filesonly.7z package. (same with 'Avisynth+ 3.7.2 test 1 (20220113)') According to the debug output the error seems to be in AviSynth!avs_is_yuv420ps which seems to loop. Cu Selur Last edited by Selur; 30th January 2022 at 11:25. |
30th January 2022, 14:07 | #3 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
My problem is with AviSynth not Vapoursynth, so not sure how this is related.
hmm,... when using AviSynthPlus_3.7.1_20211231-filesonly.7z + Code:
version() return last same when using the files from Avisynth_3.7.2_20220113_test1 it seems to die in avs_clip_get_error. No clue why this is happening and only with the 32bit versions. Cu Selur |
31st January 2022, 17:52 | #5 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
I mean the whole project isn't large ( see: https://github.com/Selur/avsInfo/) and I don't see anything that uses the c interface calls. (I include the avisynth.h and not the avisynth_h.h headers,..) Also why does it work with 64bit and not with 32bit is really beyond me. :/ Cu Selur |
|
31st January 2022, 21:25 | #6 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
I've been seeing strange results with FFmpeg and avs2yuv (which do use the C interface) - some combinations of 32-bit builds of AviSynth+ and FFmpeg work, but not other combinations. 64-bit is completely unaffected.
Rolling 32-bit AviSynth+ all the way back to 3.5.1 (or even back to classic 2.6.1) was able to confirm that something probably came in during the Neo merge that is messing with 32-bit builds on Windows. Whatever it is, it affects both MSVC and GCC builds, may or may not affect Debug builds of AviSynth+, and may be a problem in FFmpeg or one of its dependencies (because I was seeing weird references to videolan and Java in one of the backtraces, and to my knowledge, the only thing that would probably refer to that inside of FFmpeg is libbluray, but libbluray shouldn't be screwing with AviSynth). That it could be a dependency chain issue would point to a problem potentially in MinGW-w64, except that it's also on the MSVC side as well. If the problem exists in normal 32-bit builds but not XP 32-bit builds, that would point to possibly being an issue in the Windows 10 SDK in MSVC 2019 (if it exists in the XP builds it would be a general issue with the cl compiler in MSVC 2019). 32-bit builds on other OSes are fine (tested with VMs of both Debian 10/i386 as well as OS X Tiger/PPC), so it's not even universally a GCC problem, just a Windows problem.
__________________
AviSynth+ native Linux/macOS/BSD support | AviSynth+ utilities and plugins for non-Windows and non-x86(-64) Last edited by qyot27; 31st January 2022 at 21:34. |
31st January 2022, 21:53 | #7 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Now that I'm reminded of how similar this is appearing, I certainly hope this isn't something caused by having fixed 64-bit GCC builds back in October:
https://github.com/AviSynth/AviSynthPlus/issues/237 It appears almost like the inverse of that, except even the MSVC builds are giving us problems. |
1st February 2022, 10:25 | #8 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
4th February 2022, 14:13 | #10 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Then these sentences need a bit more clarification:
"it dies in avs_is_yuv420ps." "same when using the files from Avisynth_3.7.2_20220113_test1 it seems to die in avs_clip_get_error." What does "dies" mean and which software is giving the error messages if there is an error message at all? Since they are C interface functions, obviously something is using C interface in your chain, e.g. an ffmpeg, an ffms C plugin or I don't know. |
4th February 2022, 17:19 | #11 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
I run the avsViewer in debug mode through QtCreator set ip to open the version.avs on my desktop and see this:
I uninstalled and reeinstalled the msvc 32bit run time files in hope that would help, which it did not. First I thought I messed up the code somewhere, but like I wrote if I compile it with 64bit, everything works fine. (you can see the whole code I use over at the github, see link in first post) version.avs just contains: Code:
version() return last Code:
ClearAutoloadDirs() version() return last Cu Selur |
5th February 2022, 08:55 | #13 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
sadly:
Code:
#ClearAutoloadDirs() version() #return last Code:
ClearAutoloadDirs() version() #return last Cu Selur Ps.: same with Avisynth_3.7.2_20220201_test2 and Avisynth+ 3.7.2 test 3 (20220208) Last edited by Selur; 8th February 2022 at 17:58. |
|
|