Premature end of document
Shows the content of digital tachograph files
Status: Beta
Brought to you by:
evil_k
Hi,
I'm getting the message "Premature end of document" at a certain point in a file of data I downloaded from a tacho via CAN messages.
I checked the data from the CAN bus, and it's correctly written to the binary file.
Other tacho viewers (Tachosys) do not have a problem with the file, and I can't see a problem in that section of binary data, according to the standard.
If I could step through the code to work out the problem I would, but I'm new to this c++ and the environment.
Does anyone know what might be wrong with the file?
Thanks.
Ed.
Hi Everyone,
I have tracked down the problem here. Names and addresses are supposed to be left justified and padded with spaces.
THis Tachograph is padding with zeros. See screenshots. it is also inserting a 02 instead of a 01 at the start of the workshop address field.
When I replaced the zeros with spaces, and the 02 with 01, it all works fine.
Therefore, no problem with ReadESM, more a problem with the tachograph. This data may well have come directly off the workshop card itself though. I don't know how to tell.
Cheers,
Ed.
Last edit: Ed Goldstein 2016-01-07
Thank you for your detailed bug report and investigation. Your effort is appreciated.
As I am not the original author of readesm, I have no deep understanding of the standard. Even if this is not a bug in readesm, maybe it is a problem for which readesm ideally should (can?) have a workaround (and maybe display a hint to the user regarding a violation of the standard)?
Yes. I agree.
In the DataDefinitions.xml, it's specified as a cpstring, and the field sizes are specified, so unless there really is no data left in the file, it should not just give up.
I don't know if cpstring should have it's own datatype, so it can it's own toString to help with this?.
The standard says (although this is in the section for "Printing"):
Last edit: Ed Goldstein 2016-01-10
As far as I see, parsing of the data completes successfully. It is the display of the XHTML data that fails.
So, as a temporary workaround it should be possible to use the "Export as HTML" function and open it in a standalone browser. If the browser also refuses to render the page, try changing the file ending from xhtml to html.
I am not sure yet how to properly fix this.
Yes, you are right. if i convert to html on the command line, it works fine.
if I open the parser, then export to html, it just prints the same failure.
Thank you.
To: 9@bugs.readesm.p.re.sf.net
From: mranderson2010@users.sf.net
Subject: [readesm:bugs] #9 Premature end of document
Date: Sun, 26 Jun 2016 02:26:07 +0000
As far as I see, parsing of the data completes successfully. It is the display of the XHTML data that fails.
So, as a temporary workaround it should be possible to use the "Export as HTML" function and open it in a standalone browser. If the browser also refuses to render the page, try changing the file ending from xhtml to html.
I am not sure yet how to properly fix this.
[bugs:#9] Premature end of document
Status: open
Group:
Labels: Premature end of document Premature errors rendering
Created: Wed Nov 25, 2015 03:35 PM UTC by Ed Goldstein
Last Updated: Sun Jan 10, 2016 07:26 AM UTC
Owner: nobody
Attachments:
TestTachoData.esm (1.6 kB; application/octet-stream)
end_of_data.png (117.1 kB; image/png)
readesm_error.png (89.1 kB; image/png)
Hi,
I'm getting the message "Premature end of document" at a certain point in a file of data I downloaded from a tacho via CAN messages.
I checked the data from the CAN bus, and it's correctly written to the binary file.
Other tacho viewers (Tachosys) do not have a problem with the file, and I can't see a problem in that section of binary data, according to the standard.
If I could step through the code to work out the problem I would, but I'm new to this c++ and the environment.
Does anyone know what might be wrong with the file?
Thanks.
Ed.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/readesm/bugs/9/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#9I faced similar problem while downloading from Stoneridge SE5000 tachograph - some strings are null-terminated instead of being filled up with spaces (but surprisingly most strings are correct), which causes XML parser to crash. In my case it was
vuApprovalNumberfield inTechnical DataTREP). The same field downloaded from VDO tachograph is filled with spaces and thus parser works correctly.I know it's a violation of the standard, but I bet it would be easier to make workaround in ReadESM than to fix Stoneridge tachographs ;)
Yes. I have seen it in various different fields. Other readers seem to handle it.
From: Marcin Wesolowski degu-monster@users.sf.net
Sent: 30 March 2017 13:26
To: [readesm:bugs]
Subject: [readesm:bugs] #9 Premature end of document
I faced similar problem while downloading from Stoneridge SE5000 tachograph - some strings are null-terminated instead of being filled up with spaces (but surprisingly most strings are correct), which causes XML parser to crash. In my case it was vuApprovalNumber field in Technical Data TREP). The same field downloaded from VDO tachograph is filled with spaces and thus parser works correctly.
I know it's a violation of the standard, but I bet it would be easier to make workaround in ReadESM than to fix Stoneridge tachographs ;)
[bugs:#9]https://sourceforge.net/p/readesm/bugs/9/ Premature end of document
Status: open
Group:
Labels: Premature end of document Premature errors rendering
Created: Wed Nov 25, 2015 03:35 PM UTC by Ed Goldstein
Last Updated: Sun Jun 26, 2016 02:26 AM UTC
Owner: nobody
Attachments:
Hi,
I'm getting the message "Premature end of document" at a certain point in a file of data I downloaded from a tacho via CAN messages.
I checked the data from the CAN bus, and it's correctly written to the binary file.
Other tacho viewers (Tachosys) do not have a problem with the file, and I can't see a problem in that section of binary data, according to the standard.
If I could step through the code to work out the problem I would, but I'm new to this c++ and the environment.
Does anyone know what might be wrong with the file?
Thanks.
Ed.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/readesm/bugs/9/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#9Alright, after three patches, this is finally ready for testing.
Please give it a try (Subversion revision 475 or newer).
Last edit: mranderson2007 2018-06-26
Thanks for doing this fix. Is there an executable available for testing? I can't see one, and i don't think i can build it.
Sorry, no, there is no executable, yet. We are working on it, but it will take some time. (ReadESM is basically a spare time project and we need a day or two on a weekend to make things pretty and get everything wrapped up)
On which platform are you running ReadESM? Windows?
Fair enough. I understand.
Yes. I am running Windows 10.
However, if you can open the file that I attached to the bug report, then that's the test that I would run anyway.
Get Outlook for Androidhttps://aka.ms/ghei36
From: mranderson2007
Sent: Tuesday 26 June, 01:58
Subject: [readesm:bugs] Re: #9 Premature end of document
To: [readesm:bugs]
Sorry, no, there is no executable, yet. We are working on it, but it will take some time. (ReadESM is basically a spare time project and we need a day or two on a weekend to make things pretty and get everything wrapped up)
On which platform are you running ReadESM? Windows?
[bugs:#9]https://sourceforge.net/p/readesm/bugs/9/ Premature end of document
Status: closed
Group: 2018-1
Labels: Premature end of document Premature errors rendering
Created: Wed Nov 25, 2015 03:35 PM UTC by Ed Goldstein
Last Updated: Mon Jun 25, 2018 06:44 AM UTC
Owner: mranderson2007
Attachments:
TestTachoData.esmhttps://sourceforge.net/p/readesm/bugs/9/attachment/TestTachoData.esm (1.6 kB; application/octet-stream) end_of_data.pnghttps://sourceforge.net/p/readesm/bugs/9/attachment/end_of_data.png (117.1 kB; image/png) readesm_error.pnghttps://sourceforge.net/p/readesm/bugs/9/attachment/readesm_error.png (89.1 kB; image/png)
Hi,
I'm getting the message "Premature end of document" at a certain point in a file of data I downloaded from a tacho via CAN messages.
I checked the data from the CAN bus, and it's correctly written to the binary file.
Other tacho viewers (Tachosys) do not have a problem with the file, and I can't see a problem in that section of binary data, according to the standard.
If I could step through the code to work out the problem I would, but I'm new to this c++ and the environment.
Does anyone know what might be wrong with the file?
Thanks.
Ed.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/readesm/bugs/9/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#9The initial file TestTachoData.esm looks good here with the mentioned patches.