Delphi Posted August 8, 2013 Share Posted August 8, 2013 The call produces the following exception: EAccessViolation:Access violation at address 750C041F in module 'RPCRT4.dll'. Read of address 00000000 I do not attach a support.zip since this error was reported by a user (Xepg) and I could reproduce it. I think you can reproduce the error yourself by using Xepg with any XMLTV file. Let me know if you want more information. TIA Quote Link to comment
hackbart Posted August 9, 2013 Share Posted August 9, 2013 Are you sure that your IDVBViewer2 is not nil? It runs fine here and the import thread is doing its job like it should. The Adress 00000 is probably a NULL pointer you want to write to. Since the message is in english it is unlikely that it comes from the DVBViewer since our version is build with a german version of Delphi7 and you would see a Zugriffsverletzung bei Adresse 75.... instead. Tested with: var FDVBViewer: IDVBViewer2; function DVBViewer: IDVBViewer2; var Unknown: Iunknown; begin if FDVBViewer = nil then begin Unknown := nil; if GetActiveObject(CLASS_DVBViewer, nil, Unknown) <> MK_E_UNAVAILABLE then Unknown.QueryInterface(IID_IDVBViewer2, FDVBViewer); end; Result := FDVBViewer; end; ... var s: Widestring; line: TStringlist; ... line := TStringlist.Create; try line.LoadFromFile('epg.xml'); s := UTF8Decode(line.text); DVBViewer.EPGManager2.ImportEPG(s); finally line.free; end; Quote Link to comment
Delphi Posted August 9, 2013 Author Share Posted August 9, 2013 Thanks for your help. No DVBViewer is not nil, se code. I am currently using Delphi XE2 but this code has been working for years now (since Delphi 2009) with all versions of DVBViewer. I don't know exactly which one of the very latest DVBViewer versions that make it fail.Any idea? If you want I can ship you my channels.dat and needed configuration files for Xepg so you easily can test. procedure TImportEPGThread.ShipEPGChunk; var DVBViewer: IDVBViewer2; Unknown: Iunknown; begin if ItemsBuffered = 0 then Exit; if EPGDestination = edRS then begin xml := xml + '</epg>'; // xml is a Delphi 2009+ string type (=WideString, UTF-16 encoded) try httppostUTF8(GetRSBaseURL + 'cgi-bin/EPGimport', UTF8Encode(xml)); except On e:Exception do begin ThreadError := errFailedToPost; raise; end; end; CreateNewChunkStorage; end; if (EPGDestination = edDVBViewer) And (ImportMethod = imXML) then begin xml := xml + '</epg>'; Unknown := nil; DVBViewer := nil; if not (GetActiveObject(CLASS_DVBViewer, nil, Unknown) = MK_E_UNAVAILABLE) then Unknown.QueryInterface(IID_IDVBViewer2, DVBViewer); if not Assigned(DVBViewer) then begin ThreadError := errConnectToDVBViewerFailed; raise XepgException.Create(errStr(ThreadError)); end; If Not SameFileName(DVBViewer.OSD.AppDir, ExtractFilePath(DVBViewerFileName)) Then begin ThreadError := errConnectedToWrongDVBViewer; raise XepgException.Create(errStr(ThreadError)); end; try DVBViewer.EPGManager2.ImportEPG(xml); except on e:exception do begin ThreadError := errImportIntoDVBViewer; ExceptionMessage(e); //logs e.Message etc. raise XepgException.Create(errStr(ThreadError)); end; end; CreateNewChunkStorage; end; if (EPGDestination = edDVBViewer) And (ImportMethod = imItems) then pEPGAddBuffer.Commit; Sleep(GetShunkDelay); ItemsBuffered := 0; Inc(stChunksSent); end; Quote Link to comment
Delphi Posted August 9, 2013 Author Share Posted August 9, 2013 I took a disk image using Acronis, then rolled back my pc using a windows restoration point. Then I had DVBViewer 5.1. Everything works fine with 5.1 Then I immedeatly installed DVBViewer 5.2.7 (no Windows updates) and the problem went back I did install the 5.2.7 on top of the 5.1 I will try to roll back to 5.1 again and then totally remove 5.1 before intallling 5.2.7 The RPCRT4.dll is Microsoft "Running RPC (Remote Procedure Call)" support.zip here: www.a123.dk/temp/support.zip Quote Link to comment
Delphi Posted August 9, 2013 Author Share Posted August 9, 2013 I have now restored the pc back, so I had DVBViewer 5.1 Everything Works fine with that. I then uninstalled DVBViewer and Recording Service including removing all folders Then installed version 5.2.7 only (not Recording Service) Unfortunatly same problem. Tomorrow I will try on another pc. Quote Link to comment
Delphi Posted August 10, 2013 Author Share Posted August 10, 2013 I think I have found the bug! I extracted a new DVBViewerServer_TLB.Pas from DVBViewer 5.2.7 in Delphi XE2 and did a compare with my old DVBViewerServer_TLB.Pas in Delphi XE2. The only differences was adding som HbbTV stuff, but I think you do it wrong, sorry. Once you have published an interface you can't modify or expand the formal definition. You will need an IDVBViewer3 to hold the HbbTV stuff, something like the IDVBViewer2 implementation. The new DVBViewerServer_TLB.Pas Works with DVBViewer 5.2.7 but not with 5.1 Thanks for your time. Quote Link to comment
hackbart Posted August 10, 2013 Share Posted August 10, 2013 Oh yes, thats what came in my mind tonight. The problem is probably that i had to create something like dvbviewer3 and put it in there instead. Sorry for that. The dilemma right now is how to fix that - i will discuss this with the beta testers within the next days. I suppose i will move the Interface to a new IDVBViewer3 interface to keep the downward compatibility. Quote Link to comment
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.