zarathoustra Posted December 5, 2009 Share Posted December 5, 2009 I got this code: protected override Document OnLoad(Stream subFile) { try { MpegParser mpegParser = new MpegParser(subFile); return Document.FromImage(new Bitmap(500, 500)); } catch (Exception e) { MessageBox.Show(e.ToString(), "SubFileType OnLoad exception"); return null; } } I set 3 break points on curly braces for opening the methods's body, try, and catch. When I comment the MpegParser line, it does what expected (a 500x500 empty picture and breaks). When I don't comment that line, PDN says "The file could not be found" and it doesn't even break on my breakpoints. I thought maybe MpegParser would throw an exception, so i catched all exceptions, but nothing get catched. So I'm a bit confused. Any idea ? Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 5, 2009 Share Posted December 5, 2009 Have you tried saving the stream to a temp file and letting MpegParser read it? Quote Link to comment Share on other sites More sharing options...
zarathoustra Posted December 5, 2009 Author Share Posted December 5, 2009 No. Did that already fixed such a problem for you? I'd like to understand what's going on. I mean, even if mpegparser fails on this stream, it should throw an exception. But there's nothing. Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 5, 2009 Share Posted December 5, 2009 Is MpegParser in a third-party library? If so, are you copying it to the FileTypes folder along with your plugin? Quote Link to comment Share on other sites More sharing options...
zarathoustra Posted December 5, 2009 Author Share Posted December 5, 2009 yes, it's another class library. no, i forgot to copy the dll. :oops: Actually just this would create the problem. MpegParser mpegParser = null; Edit: Problem fixed. Thanks. Quote Link to comment Share on other sites More sharing options...
zarathoustra Posted December 5, 2009 Author Share Posted December 5, 2009 Same problem again Except now i can't see what dll is missing. Quote Link to comment Share on other sites More sharing options...
zarathoustra Posted December 5, 2009 Author Share Posted December 5, 2009 Solved! I had some dlls with platform target set to x86 a while ago, and now i'm on x64. So the dlls wouldn't load. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.