Catch: "Error [PXCLib]: Required value not found"  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Thu Feb 18, 2021 10:32 am

Hi Support,

Ref: https://forum.tracker-software.com/viewtopic.php?f=62&t=35837

I have a defective document EU Editor (and SDK) cannot open with the "Error [PXCLib]: Required value not found" being displayed.

Adobe (Acrobat/Reader) can open the file.

IPXS_Document.BrokenFlags includes only SVF_MissalignedObj for the file - but from experience this should not stop the document from being loaded / displayed.

What broken flag from PXS_StructureValidationFlags is this "required value not found"?

Additionally:
Re: https://forum.tracker-software.com/viewtopic.php?f=66&t=33646&p=139241&hilit=docInfo_broken_xrefChunkNotFound#p139241

What strings are used for "SVF_IoReadFailed" and "SVF_FailLoadValidObject" ?

-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Thu Feb 18, 2021 2:21 pm

Hello zarkogajic,

These are entirely different error types.
There are errors in the physical document structure (invalid objects, cut/rewritten data etc.)
Also, there are errors in the logical document structure - for example missing page attributes, or no pages dictionary at all.
And these two types are not connected in any ways - there is no direct correlation between them.
Errors in the physical document structure can result in some errors such as some objects will not be read or will be read with some mistakes that can result in the logical structure errors (or not).
You can sometimes change 1 byte inside of the file that will crash it completely, and in other case, changing a 1MB of data will not result in any changes at all - that's the problem.

As for the flags:
SVF_IoReadFailed - is being set when the file reading resulted in an error. We react to this by suggesting to reopen the file.
SVF_FailLoadValidObject - is being set when there is a file read error and is being set only when we could not read an object that was not changed (when we need to do that). And this in many cases is a result of a SVF_IoReadFailed error.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Thu Feb 18, 2021 2:37 pm

Hi Alex,

Thanks. I do understand those are different types of errors.

The question is: can I somehow know the document will fail loading in PXV_Control from the IPXC_Document level (so without actually trying to go for IPXV_Document)?

Additionally: for the two mentioned SVFs: what are the corresponding "msg_docInfo_broken_??" ?

-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Fri Feb 19, 2021 8:58 am

Hello zarkogajic,

You can always open document on the Core level, check the HRESULT and if everything's OK, open it via he IPXV_Control.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Mon Feb 22, 2021 10:19 am

Hi Alex,

I'm opening that document via IPXC_Inst.OpenDocumentFromFile and no exception is being raised.
The same result when op.openDoc is used.

In both cases an IPXC_Document is returned - and I can query the document for stuff link annotations, pagecount, annotations, etc...

The error dialog is displayed only when an attempt to open this core doc as IPXV_Document is made, via IPXV_MainFrame.OpenDocFrom(coreDoc) ...


-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Mon Feb 22, 2021 10:23 am

Hello zarkogajic,

You mean that his does not return anything?
https://sdkhelp.tracker-software.com/vi ... rokenFlags

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Mon Feb 22, 2021 10:26 am

Alex,
IPXS_Document.BrokenFlags includes only SVF_MissalignedObj for the file - but from experience this should not stop the document from being loaded / displayed.

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Mon Feb 22, 2021 10:41 am

Hello zarkogajic,

Nope, the IPXS_Document.BrokenFlags includes all of the error codes including the SVF_IoReadFailed and SVF_FailLoadValidObject. And all of these are being detected on the Structure level.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Mon Feb 22, 2021 1:21 pm

Hi Alex,

Is this a test you did after receiving my file?

As for me, for that file, the return value of IPXS_Document.BrokenFlags is "int:2147483712" (hex:80000040).

The SVF_MissalignedObj is defined as $00000040 and that bit is set.

The other two are:

SVF_IoReadFailed = $00400000;
SVF_FailLoadValidObject = $00800000;

Are they wrongly defined?


-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Mon Feb 22, 2021 1:23 pm

Hello zarkogajic,

Have you done doc.pages.count, like I advised in a similar topic?

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Mon Feb 22, 2021 1:56 pm

Alex,

Yes.

p.s.
Btw, sorry, I based my previous post on your previous post I thought you based on you already receiving my file :)

The BrokenFlags for it contain SVF_MissalignedObj AND SVF_Corrected: $80000040.


User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Mon Feb 22, 2021 2:39 pm

Hello zarkogajic,

Nope - that file is still "in transit" - will have to obtain access to the server first :)

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Mon Feb 22, 2021 3:57 pm

Hello zarkogajic,

Just tested this - the document indeed has SVF_MissalignedObj and SVF_Corrected flags.

But here's what our expert said:
File is not only a weird one but a broken one too.
Why Adobe opens this - we can't tell. Sadly we cannot open this one as it's broken and we don't know how to recover these yet.

That file has many different versions without correct incremental updates.
Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"

Post by zarkogajic » Mon Feb 22, 2021 4:21 pm

Hi Alex,

ok, thanks.

Now: going back to my original question: is there a way to know such file might/will fail to load as IPXV_Document - without actually trying to do that (as I have no mainframe at that moment) - so from Core level ?

The error seems to be from core level: "PXCLib".

-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Tue Feb 23, 2021 9:33 am

Hello zarkogajic,

Just debugged our inner code. The check for this would be getting the Doc.Pages.Count. If it results in an exception (and it should in this case, because of the error HRESULT) or will return 0 - then the file is corrupted.
The native converter succeeds opening the IPXC_Document, but it's not valid.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

zarkogajic
User
Posts: 861
Joined: Thu Sep 05, 2019 12:35 pm

Re: Catch: "Error [PXCLib]: Required value not found"  SOLVED

Post by zarkogajic » Tue Feb 23, 2021 9:52 am

Hi Alex,

Yes, that's it, the PageCount is 0 and the HResult is the mentioned error. Thanks.

-žarko

User avatar
Sasha - Tracker Dev Team
User
Posts: 5299
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Catch: "Error [PXCLib]: Required value not found"

Post by Sasha - Tracker Dev Team » Tue Feb 23, 2021 10:53 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply