HomeOfAviSynthPlusEvolution / neo_DFTTest

GNU General Public License v2.0
7 stars 2 forks source link

memory access violation with dfttest from master #1

Open Garretiko opened 3 years ago

Garretiko commented 3 years ago

When trying to run a script via ./ffplay -i script.avs I get a memory access violation as long as libneo-dfttest.so is located in any autoload directory of Avisynth 3.7 on Linux Mint 20.1. It doesn't matter if dfttest itself is called in the script or not. As soon as I delete libneo-dfttest.so from e.g. $USER/.avisynth, the memory fault is gone.

This is true for dfttest compiled from Master. When going back to r7, everything works.

msg7086 commented 3 years ago

Can you try to bisect commits between r7 and master?

Thanks.

Garretiko commented 3 years ago

I tried to compile every revision between r7 and master but only the first (cleanup unused files) and the last (master) would compile. The first still runs ok. Everything after that from June 22 (except master) gave me the following error (Fehler):

In file included from /home/meiner/source/neo_DFTTest/main.cpp:5: /home/meiner/source/neo_DFTTest/src/neo_dfttest.hpp: In member function ‘virtual void DFTTest::Initialize(InDelegator, DSVideoInfo, FetchFrameFunctor)’: /home/meiner/source/neo_DFTTest/src/neo_dfttest.hpp:324:55: error: ‘_aligned_free’ was not declared in this scope 324 | auto dftgr_smart = std::shared_ptr(dftgr, &_aligned_free); | ^~~~~ make[2]: [CMakeFiles/neo-dfttest.dir/build.make:63: CMakeFiles/neo-dfttest.dir/main.cpp.o] Fehler 1 make[1]: [CMakeFiles/Makefile2:76: CMakeFiles/neo-dfttest.dir/all] Fehler 2 make: *** [Makefile:84: all] Fehler 2

So I fear there is not much I can actually test to narrow it down for you.

Garretiko commented 3 years ago

When trying to run a script with dfttest-master I get the following syslog:

Jan 31 11:48:54 HAL9000 kernel: [102084.045890] read_thread[56100]: segfault at 320 ip 00007f53dae76ea5 sp 00007f5385ff6e50 error 4 in ld-2.31.so[7f53dae60000+23000] Jan 31 11:48:54 HAL9000 kernel: [102084.045895] Code: 08 31 c0 48 8d 3d f3 06 01 00 e9 f6 aa ff ff 66 0f 1f 44 00 00 f3 0f 1e fa 55 48 89 fd 48 8d 3d c9 6a 01 00 ff 15 c3 70 01 00 <80> bd 1f 03 00 00 00 75 47 8b 95 18 03 00 00 85 d2 74 78 48 b8 ff Jan 31 11:48:54 HAL9000 systemd[1]: Created slice system-systemd\x2dcoredump.slice. Jan 31 11:48:54 HAL9000 systemd[1]: Started Process Core Dump (PID 56113/UID 0). Jan 31 11:48:54 HAL9000 systemd-coredump[56114]: Process 56075 (ffplay) of user 1000 dumped core.#012#012Stack trace of thread 56100:#012#0 0x00007f53dae76ea5 _dl_close (ld-linux-x86-64.so.2 + 0x17ea5)#012#1 0x00007f53d95328b8 __GI__dl_catch_exception (libc.so.6 + 0x1638b8)#012#2 0x00007f53d9532983 __GI__dl_catch_error (libc.so.6 + 0x163983)#012#3 0x00007f53daba6b59 _dlerror_run (libdl.so.2 + 0x1b59)#012#4 0x00007f53daba6468 __dlclose (libdl.so.2 + 0x1468)#012#5 0x00007f53ac1903ab n/a (/home/meiner/.avisynth/libneo-dfttest.so + 0x833ab)#012#6 0x00007f53ac1906d2 n/a (/home/meiner/.avisynth/libneo-dfttest.so + 0x836d2)#012#7 0x00007f53ac1961b1 n/a (/home/meiner/.avisynth/libneo-dfttest.so + 0x891b1)#012#8 0x00007f53ac198ee3 n/a (/home/meiner/.avisynth/libneo-dfttest.so + 0x8bee3)#012#9 0x00007f53ac189905 n/a (/home/meiner/.avisynth/libneo-dfttest.so + 0x7c905)#012#10 0x00007f5385088ff2 _ZN13PluginManager10TryAsAvs26ER10PluginFileP8AVSValue (libavisynth.so + 0x2c3ff2)#012#11 0x00007f5385088028 _ZN13PluginManager10LoadPluginER10PluginFilebP8AVSValue (libavisynth.so + 0x2c3028)#012#12 0x00007f5385086d9f _ZN13PluginManager15AutoloadPluginsEv (libavisynth.so + 0x2c1d9f)#012#13 0x00007f53850ab86b _ZN17ScriptEnvironment6LookupEPKcPK8AVSValuemRbmPKS1_P19IScriptEnvironment2 (libavisynth.so + 0x2e686b)#012#14 0x00007f53850abd76 _ZN17ScriptEnvironment7Invoke_EP8AVSValueRKS0_PKcPK8FunctionS3_PKS5_P19InternalEnvironmentb (libavisynth.so + 0x2e6d76)#012#15 0x00007f53850b7f1e _ZN23ThreadScriptEnvironment7Invoke_EP8AVSValueRKS0_PKcPK8FunctionS3_PKS5_ (libavisynth.so + 0x2f2f1e)#012#16 0x00007f538510d776 _ZN15ExpFunctionCall8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x348776)#012#17 0x00007f5385109fa7 _ZN22ExpExceptionTranslator8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x344fa7)#012#18 0x00007f538510a33f _ZN7ExpLine8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x34533f)#012#19 0x00007f5385109efc _ZN11ExpSequence8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x344efc)#012#20 0x00007f5385109ea3 _ZN11ExpSequence8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x344ea3)#012#21 0x00007f5385109ea3 _ZN11ExpSequence8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x344ea3)#012#22 0x00007f5385109d93 _ZN12ExpRootBlock8EvaluateEP18IScriptEnvironment (libavisynth.so + 0x344d93)#012#23 0x00007f5385110c32 _Z4Eval8AVSValuePvP18IScriptEnvironment (libavisynth.so + 0x34bc32)#012#24 0x00007f538507207f _ZNK17FilterConstructor17InstantiateFilterEv (libavisynth.so + 0x2ad07f)#012#25 0x00007f53850acd64 _ZN17ScriptEnvironment7Invoke_EP8AVSValueRKS0_PKcPK8FunctionS3_PKS5_P19InternalEnvironmentb (libavisynth.so + 0x2e7d64)#012#26 0x00007f53850b7839 _ZN23ThreadScriptEnvironment6InvokeEPKc8AVSValuePKS1_ (libavisynth.so + 0x2f2839)#012#27 0x00007f5385111cdd _Z6Import8AVSValuePvP18IScriptEnvironment (libavisynth.so + 0x34ccdd)#012#28 0x00007f538507207f _ZNK17FilterConstructor17InstantiateFilterEv (libavisynth.so + 0x2ad07f)#012#29 0x00007f53850acd64 _ZN17ScriptEnvironment7Invoke_EP8AVSValueRKS0_PKcPK8FunctionS3_PKS5_P19InternalEnvironmentb (libavisynth.so + 0x2e7d64)#012#30 0x00007f53850b7839 _ZN23ThreadScriptEnvironment6InvokeEPKc8AVSValuePKS1_ (libavisynth.so + 0x2f2839)#012#31 0x00007f53850df9ea avs_invoke (libavisynth.so + 0x31a9ea)#012#32 0x0000557e3c96b6a6 n/a (/home/meiner/bin/ffplay + 0x13d6a6)

Maybe that helps?

Garretiko commented 3 years ago

Is anybody actually using this filter in its current state on Linux? For me the only two versions I can successfully build (master and r7) are practically unusable. Master will immediatly crash any attempt to run a script. And with r7 I get approx. 0.5fps on a Ryzen 5 2600x on SD video material. The dfttest-filter for Vapoursynth gives me more than 25fps on the same footage.

kedaitinh12 commented 3 years ago

Can you check again with new commit? https://github.com/HomeOfAviSynthPlusEvolution/neo_DFTTest/commit/d7cca46c0ebb1aca099b36355db518bee365cd90

Asd-g commented 2 years ago

Tested on Debian "bullseye" and it runs fine.