nagyistoce / cardpeek

Automatically exported from code.google.com/p/cardpeek
Other
1 stars 0 forks source link

nil value in en1545.lua #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to read TBC Pass from Bordeaux (Calypso network 921)
2. I got this crash in en1545.lua

Here is the debug output:

0214 ERROR   ./lib/en1545.lua:114: attempt to index local 'source' (a nil value)
0215 ERROR   backtrace: called from ?() in ./lib/en1545.lua[114]
0216 ERROR   backtrace: called from en1545_parse_item() in ./lib/en1545.lua[176]
0217 ERROR   backtrace: called from en1545_parse_item() in ./lib/en1545.lua[161]
0218 ERROR   backtrace: called from en1545_parse() in ./lib/en1545.lua[194]
0219 ERROR   backtrace: called from en1545_map() in ./lib/en1545.lua[225]
0220 ERROR   backtrace: called at calypso/c250.lua
0221 ERROR   backtrace: called from dofile()
0222 ERROR   backtrace: called from calypso_process() in [string 
"calypso.lua"][255]
0223 ERROR   backtrace: called at [string "calypso.lua"]

I'm using 0.8.2 under latest Ubuntu.

Please provide any additional information below.

I use a specific network file to decode this network, but I hadn't this problem 
with the previous version of cardpeek, and furthermore the problem doesn't seem 
to come from it.

Please find the card replay attached, and feel free to ask any questions.

Original issue reported on code.google.com by kalonbun...@gmail.com on 18 Feb 2014 at 10:50

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the CLF file, I was able to reproduce the bug. A few minor 
changes were made in cardpeek 0.8.2 to address the VIVA card in Lisbon. These 
modifications may explain why it worked in 0.8.1 and not in 0.8.2...

I will try to provide a corrective solution in the next few days.

If you have create a network descriptor for Bordeaux, it would be nice to share 
it with the community and contribute it to cardpeek! :-)

Original comment by L...@gmx.com on 19 Feb 2014 at 9:13

GoogleCodeExporter commented 9 years ago
I didn't know how to do it, but the easiest (and fastest way for me) I think is 
to provide a .diff file here. It is based on latest 0.8.2 release.

I'm not that used to lua so feel free to correct the code if it does something 
in the wrong way (or the wrong coding style) but this patch provides:

- Support holder birthdate (using the appropriate descriptor in en1545.lua)
- Support for TBC network (Bordeaux urban community network)
- Preliminary support for Transgironde (Bus network through gironde, only a few 
stops known).
- (Very) preliminary support for Grenoble (only a few stops and lines known)

Enjoy :)

Thanks for your awesome software which opens lots of possibilities.

Original comment by kalonbun...@gmail.com on 19 Feb 2014 at 10:36

Attachments:

GoogleCodeExporter commented 9 years ago
Many thanks! I will check it out.

In the mean time, the problem in en1545.lua you identified can be remedied by 
using the following version of en1545.lua:
https://code.google.com/p/cardpeek/source/browse/trunk/dot_cardpeek_dir/scripts/
lib/en1545.lua

There is a more general problem: in France each city/area seems to use a 
specific format for contracts and Cardpeek only attempts to use the one for 
Paris, which probably means that the output is meaningless in other places...

Original comment by L...@gmx.com on 21 Feb 2014 at 7:46

GoogleCodeExporter commented 9 years ago
I will close this issue since it seems to be fixed now in SVN and will be 
corrected in the next release of card peek

Original comment by L...@gmx.com on 27 Apr 2014 at 2:10