How do I locate the object causing an error
Apologies for asking a question previously answered. Someone asked this about a year ago, and Stacho or Martin provided an answer, unfortunately I can not find it in the forum archives. The partial log file transcript below suggests to me that there is a minor problem with my wall drawing in or after [181] and a fatal problem with something in or after [186]. How do I locate the objects referred to by the numbers in square brackets? (This particular one is odd, 'cos it worked fine yesterday, and all my th-config files that compile individual components of this master file still compile perfectly - must be an inadvertent change I made somewhere.) Thanks Bruce [173] [174] [175] [176] [177] [178] [179] [180] [181] [Warning: scrap outline intersects itself in scrap Late08ROPlan_s2@Late08.Bulme r] [182] [183] [184] [185] [186] ! angle(0,0) is taken as zero. l_arrow_SKBB->....rotated(angle(thdir((EXPR0),0))+ 90)shifted(point0of(EXPR0)... l_mapconnection->....PenB);l_arrow_SKBB((EXPR0),3) ;thdrawoptions(); l.18855 ...ion(((229.38,96.96) -- (229.38,96.96))) ; The `angle' between two identical points is undefined. I'm zeroing this one. Proceed, with fingers crossed. ! angle(0,0) is taken as zero.
Ah ha! I have solved the problem that prompted me to ask the above question. The problem was that I had duplicate selection of the same map in my thconfig file. A result of my idle double-clicking in the Map Structure pane in the XTherion compiler, and thinking I had removed the spurious entries so created. For the TO DO list: Maybe it would be a good idea to test for duplicate map selection and report. The errors that eventually occurred made me think there was an error in a scrap drawing. Still, I'd like to know how to identify the objects referred to by the bracketed numbers, so I can tidy up the few "scrap outline intersects itself" errors that I get. Bruce
Still, I'd like to know how to identify the objects referred to by the bracketed numbers, so I can tidy up the few "scrap outline intersects itself" errors that I get.
"Scrap outline intersects itself" warning gives the scrap reference, so look at the walls in that scrap. In some older thread (or wiki perhaps?) there are examples of some weird self-intersections. Anyway, after some fixes in PDF processing this warning is not so critical as it used to be and the map usually looks fine. For real errors it is not easy to give a convenient reference, because MetaPost does not offer any exception catching facilities. Currently you can look at the line starting with 'l.<number>' (in your case l.18855) -- the number is the line number in the metapost file data.mp where the error occured. In this file you can find the name of problematic scrap (look for current_scrap definition preceding the line with error). The file data.mp is located in temporary directory thTMPDIR, which is created if therion is run with -d option. Bracketed numbers are MetaPost figures (the number is displayed after the figure is processed). Each figure contains some part of some scrap. In data.mp each figure starts with "beginfig(<number>)". Martin P.S. The most common source of errors are lines with zero-length segments. We need to fix therion so that it would not export them for metapost -- than the errors could be much less frequent.
participants (2)
-
Bruce Mutton -
Martin Budaj