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 |
9th May 2015, 16:15 | #1 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
CAVIStreamSynth: System exception - Access Violation at ...
I'm calling a function named SMDegrain() in StaxRip x64 using avifile API, when I load the same script in VirtualDub x64 I don't see this problem.
Does VirtualDub x64 interface with AviSynth via avifile API or like most applications directly? How can I find out which module is causing this exception and in particular where in the source code. I've not really experience with native coding so could use some hints, there are issues with nnedi3 and DGDecNV and it all might relate, I'm sure I can get to the bottom of this, question is only how long will it take... |
9th May 2015, 16:48 | #2 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
When you search the forum for "CAVIStreamSynth" it seems that several people had problems with exceptions/access violations.
Maybe it's time to start using the native Avisynth interface. If you can't implement that in Basic there is possibly code for a wrapper somewhere. As far as I know, VirtualDub uses it's own wrapper involving AVIFile API, have a look at the source.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 9th May 2015 at 16:57. |
9th May 2015, 17:25 | #4 | Link | ||
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Quote:
Quote:
Last edited by videoh; 9th May 2015 at 18:41. |
||
9th May 2015, 18:03 | #5 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
How would you know the bug is in my code? Years ago when MediaInfo crashed StaxRip but not VirtualDub the bug wasn't in StaxRip. Actually I have a theory and I could search or ask about the technical background, my theory is there is a bad pointer trying to access managed memory, it might as well be my code, the thing is nobody knows anything at this point and asking for samples, scripts and VirtualDub simply does not help, for debugging you need:
Win8/Win10 x64 AviSynth+ x64 .NET AviSynth client x64 using avifile API Within in hour I could find out if MeGUIs completely different interop layer yields also to this problem, it's only like 50 lines code, even if it succeeds the bug is still unknown, why do 15 plugins work and only 2 don't, isn't this a indication there might be something wrong with this 2 plugins? I work since 15 years on StaxRip and have at least done a couple small C++ applications and some of these C++ applications where using different interop techniques, C, COM+, I've even written a C++/CLR application so I have some C++ and native/managed interop knowledge. You are hardly qualified to tell me where the bug is if you've not done native/managed interop. |
9th May 2015, 18:47 | #6 | Link | |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Quote:
If you have an access violation did you do some code stepping through your app to see when it occurs? That seems to me to be the obvious place to start. Also, how are you invoking Avisynth? Can you show us your code for that? Last edited by videoh; 9th May 2015 at 19:12. |
|
9th May 2015, 18:50 | #7 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
What is so difficult to understand that the only thing you need is a x64 .NET client and what is so difficult to understand that the fact that the bug surfaces only with a .NET client doesn't necessarily mean the bug is in the .NET client?
|
9th May 2015, 19:13 | #8 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
I understand perfectly.
I asked you some questions to try to help you. Do you want to answer them? Here are the questions again: Exactly what problem do you have with DGDecNV 64-bit? Do you have a crash dump to show us or something similar? If you have an access violation did you do some code stepping through your app to see when it occurs? That seems to me to be the obvious place to start. Also, how are you invoking Avisynth? Can you show us your code for that? |
9th May 2015, 21:13 | #9 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 9th May 2015 at 21:16. |
|
9th May 2015, 21:16 | #10 | Link | ||||
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Quote:
http://www.mediafire.com/download/1j...5wb281p/avs.7z the layer is completely different interfacing with AviSynth directly with a native wrapper library and not using avifile API. avifile API might be old but it works perfectly, is blazing fast and requires 5 times less code and no wrapper library. My experience told me it won't help and MPC crashes as well and I verified with ProcessExplorer the CLR isn't loaded into MPC process space by a shell extension or something. Quote:
Quote:
Quote:
Last edited by stax76; 9th May 2015 at 21:19. |
||||
9th May 2015, 21:28 | #11 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
here is the avifile sample application and code I posted at DGs board:
http://www.mediafire.com/download/tr...pplication1.7z |
9th May 2015, 21:57 | #12 | Link | |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Quote:
Some people may not want to install a .NET development environment and then build and debug your application to help with interfacing properly to Avisynth. Last edited by videoh; 9th May 2015 at 22:08. |
|
9th May 2015, 22:32 | #13 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
With DGDecNV I get the error message:
System exception - Access Violation (D:\Temp\test temp files\test.avs, line 2) LoadPlugin("D:\Software\Medien\DGDecNV\DGDecodeNV.dll") DGSource("D:\Temp\test temp files\test.dgi") both sample applications and MPC-BE show this error, the only plugins with this problem is DGDecNV and nnedi3, nnedi3 work with opt=1 disabling asm, on Win7 everything works if I remember right, before this mess started I was on Win7, now I'm on Win10, I had a few pointer related bugs in my interop code that surfaced only on Win8/Win10 so I migrated to Win10. |
9th May 2015, 22:36 | #14 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Are you able to run your code in the VB .NET debugger? If so, you can break on the access violation and see what's going on. Just start debugging and make the error happen. When you get the access violation popup, tell it to break. You will be right at the call to the faulting module, can see who called it, etc.
You can get crash dumps various ways. Dr Watson is one popular choice. Last edited by videoh; 10th May 2015 at 01:10. |
10th May 2015, 01:27 | #19 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
I was debugging nnedi3 and I know the line causing the access violation, first I thought my crop dialog works so I thought there is something in my code but I forgot that the crop dialog uses only the source filter so it did not use nnedi3 or DGindexNV. DG can download both super simple test projects for visual studio and debug his code, it's not my problem any longer.
|
10th May 2015, 01:34 | #20 | Link | |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Quote:
If you give Graft a simple C++ based project I'm sure he will be able to help you. But if you give him VB .NET + avifile + "reflection hack", he is not going to be interested, and you'll have to debug that stuff yourself. Last edited by videoh; 10th May 2015 at 16:48. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|