Closed lewinpauli closed 6 months ago
i will check the muster tickets you provided later on. but i've checked my personal Deutschland ticket in a quick debugging session with ticket-analyzer by placing it in front of the camera. and I've seen the U_FLEX record of my ticket is of version "03", but my current implementation supports "13" only. so I guess when the problem is not related to failing aztec decoding (this can be solved sometimes by rotating the image slightly, you can try easily in ticket-analyzer and pressing "r" or "R" when your tickets are available in image path), the issue is most probably because of an currently unsupported U_FLEX version (RecordU_FLEX.cpp).
thank you for your quick response
the ticket-analyzer crashes when it can read the "Deutschland Ticket" qr code (looks like U_FLEX 03 is the problem as you mentioned)
I zoomed out via 0 "reset" with the following output:
[2024-04-06T18:19:49 INFO Loader] Loaded 2 image(s) from directory asynchronously: "images" [2024-04-06T18:19:51 INFO KeyMapper] Handling key '0': reset: terminate called after throwing an instance of 'std::runtime_error' what(): Unsupported header: U_FLEX, 03 Aborted (core dumped)
And I used 4 a couple of times to see the full qrcode and rotated the image but when the full qrcode is visible the program crashes:
[2024-04-06T18:34:10 INFO Loader] Loaded 1 image(s) from directory asynchronously: "images" [2024-04-06T18:34:14 INFO KeyMapper] Handling key '4': split 4: 4/3 [2024-04-06T18:34:14 INFO KeyMapper] Handling key '4': split 4: 4/4 [2024-04-06T18:34:15 INFO KeyMapper] Handling key '4': split 4: 2/0 [2024-04-06T18:34:17 INFO KeyMapper] Handling key 'r': rotate: 5 [2024-04-06T18:34:18 INFO KeyMapper] Handling key 'r': rotate: 6 [2024-04-06T18:34:19 INFO KeyMapper] Handling key 'R': ROTATE: 5 [2024-04-06T18:34:19 INFO KeyMapper] Handling key 'R': ROTATE: 4 [2024-04-06T18:34:20 INFO KeyMapper] Handling key 'R': ROTATE: 3 [2024-04-06T18:34:20 INFO KeyMapper] Handling key 'R': ROTATE: 2 [2024-04-06T18:34:20 INFO KeyMapper] Handling key 'R': ROTATE: 1 [2024-04-06T18:34:21 INFO KeyMapper] Handling key 'R': ROTATE: 0 terminate called after throwing an instance of 'std::runtime_error' what(): Unsupported header: U_FLEX, 03 Aborted (core dumped)
I now checked all 22 Muster files with ticket-decoder from https://www.bahn.de/angebot/regio/barcode and
only the 2 "Deutschland Tickets" and additionally the "Muster 918-9 BahnCard 25.png"
only output {}
the ticket-analyzer has the following output for the "Muster 918-9 BahnCard 25.png" file:
./build/Release/bin/ticket-analyzer [2024-04-06T19:51:43 INFO Loader] Loaded 1 image(s) from directory asynchronously: "images" [2024-04-06T19:51:45 INFO KeyMapper] Handling key '0': reset: [2024-04-06T19:51:45 WARNING RecordU_FLEX] Unimplemented transport document data type: 6 [2024-04-06T19:51:46 WARNING RecordU_FLEX] Unimplemented transport document data type: 6 [2024-04-06T19:51:46 WARNING RecordU_FLEX] Unimplemented transport document data type: 6
looks to me like U_Flex 6 could also be needed
but BahnCard 25 is probably a different format anyway
i've checked the tickets crashing with unsupported U_FLEX record or unimplemented transport document data type. I think there are some overlapping issues right now.
anyway, I tried also just to add "03" to supported versions in RecordU_FLEX.cpp in ctor to see what happens. there are follow-up errors but the app keeps running at least and the other records are decoded. so when it is enough right now, this could be a hacky hot-fix.
Thank you again for you time, effort and your quick response
I tried the current "13-cant-read-uic-918-9-deutschland-ticket" branch with the following result:
I can only compile the branch "13-cant-read-uic-918-9-deutschland-ticket" with conan version 1.64.0 because of some wayland dependency
when I compile 8 tests are failing:
[==========] 140 tests from 43 test suites ran. (1291 ms total)
[ PASSED ] 125 tests.
[ SKIPPED ] 7 tests, listed below:
[ SKIPPED ] EUR9_Ticket.Metadata
[ SKIPPED ] EUR9_Ticket.Record_U_HEAD
[ SKIPPED ] EUR9_Ticket.Record_0080BL
[ SKIPPED ] EUR9_Ticket.Record_U_TLAY
[ SKIPPED ] EUR9_Ticket.Record_0080VU
[ SKIPPED ] BVG_4Fahrtenkarte.Metadata
[ SKIPPED ] Unknown_Ticket1.Metadata
[ FAILED ] 8 tests, listed below:
[ FAILED ] Base64EncodedRawInResult.Metadata
[ FAILED ] UIC918_9_Laenderticket_Rheinland_Pfalz.Metadata
[ FAILED ] UIC918_9_Laenderticket_Sachsen_Anhalt.Metadata
[ FAILED ] UIC918_9_Laenderticket_Sachsen_Anhalt.Record_U_HEAD
[ FAILED ] UIC918_9_Laenderticket_Sachsen_Anhalt.Record_U_TLAY
[ FAILED ] UIC918_9_Laenderticket_Sachsen_Anhalt.Record_U_FLEX
[ FAILED ] UIC918_9_Laenderticket_Sachsen_Anhalt.Record_0080VU
[ FAILED ] UIC918_9_Laenderticket_Schleswig_Holstein.decode
8 FAILED TESTS
the 2 deutschland muster tickets still output {} but the other muster tickets are working
and when I want to run the the ticket-decoder with a bash script it outputs:
Fontconfig error: Cannot load default config file: No such file: (null)
some note related to building the applications, maybe some are not relevant for you, so just skip if so:
notes related to testing:
notes on ticket decoding:
notes on fontfonfig:
Muster 918-9 CityTicket.pdf from
https://www.bahn.de/angebot/regio/barcode
or to be specific https://assets.static-bahn.de/dam/jcr:95540b93-5c38-4554-8f00-676214f4ba76/Muster%20918-9.zip
works fine with ticket-decoder but "Muster 918-9 Deutschland-Ticket.png" & "Muster 918-9 Deutschland-Jobticket.png" just output {}