<div dir="ltr"><div>Hello all,</div><div><br></div><div>I am writing this list hoping to avoid redoing many hours worth of drafting. To be brief, xtherion has overwritten the th2 file I wasa editing. Yes, I should have done a git commit or done some other backup after that amount of work, too late now. I have seen this behavior before but it hasn't bitten me this badly until now.</div><div><br></div><div>In this case, I deleted several objects (in this case rock-border lines) and then thought better of it and hit ctrl-z several times to undo the delete. At some point I received the following error message:</div><div><br></div><div>can't read "xth(me,imgs,,XVIimg)": no such element in array<br>can't read "xth(me,imgs,,XVIimg)": no such element in array<br>    while executing<br>"if {$xth(me,imgs,$imgx,XVIimg)} continue"<br>    (procedure "xth_me_write_file" line 24)<br>    invoked from within<br>"xth_me_write_file $fname"<br>    (procedure "xth_me_save_file" line 42)<br>    invoked from within<br>"xth_me_save_file 1"<br>    invoked from within<br>".xth.tb.savasb invoke"<br>    ("uplevel" body line 1)<br>    invoked from within<br>"uplevel #0 [list $w invoke]"<br>    (procedure "tk::ButtonUp" line 22)<br>    invoked from within<br>"tk::ButtonUp .xth.tb.savasb"<br>    (command bound to event)<br></div><div><br></div><div>This may be associated with me having just added an additional sketch as a background image and dragged it into position, but I don't know if that is associated or purely circumstantial. Regardless, I am now unable to save the file, or use the 'save as' functionality. I receive the same error when I attempt to do that. When I examine the contents of the th2 file via the command line, it is empty, and indeed the file now has a size of 0 bytes.</div><div><br></div><div>However, in xtherion I can still click on objects and view their attributes, and I can drag the map around and xtherion successully redraws items in the current view. Clearly, xtherion still has some representation of the file.</div><div><br></div><div>I dumped the memory of the process into a file and then extracted the strings from it:<br>gcore -o /tmp/therion_dump 83677</div><div>strings /tmp/therion_dump.83677 > /tmp/therion_memory.txt</div><div><br></div><div>The data is definitely in there, I can grep for specific text that I know is in the th2 file, but it is pretty jumbled up. Reconstructing the th2 file from the coredump is probably viable, but I don't know that it would be any easier than simply redrafting the survey.</div><div><br></div><div>Does anyone know of a relatively straightforward way to recover data from xtherion after a soft crash? I'd absolutely love to not have to redraft all of this passage. I will be leaving xtherion open for the time being in hope a solution exists.<br><br></div><div>As an aside, when I examined the files that are currently being accessed by the xtherion process, the th2 file is listed multiple times under different file descriptors. That seems odd to me.<br><br>lsof -p 83677 | grep th2</div><div><br></div><div>COMMAND    PID    USER   FD   TYPE             DEVICE SIZE/OFF     NODE NAME<br>xtherion 83677 jprouty    6w   REG               0,49        0 13011147 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan.th2<br>xtherion 83677 jprouty    7w   REG               0,49        0 13037825 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan_2.th2<br>xtherion 83677 jprouty    8w   REG               0,49        0 13011147 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan.th2<br>xtherion 83677 jprouty    9w   REG               0,49        0 13011147 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan.th2<br>xtherion 83677 jprouty   10w   REG               0,49        0 13011147 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan.th2<br>xtherion 83677 jprouty   11w   REG               0,49        0 13011147 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan.th2<br>xtherion 83677 jprouty   12w   REG               0,49        0 13037825 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan_2.th2<br>xtherion 83677 jprouty   13w   REG               0,49        0 13037825 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan_2.th2<br>xtherion 83677 jprouty   14w   REG               0,49        0 13037825 /home/jprouty/data/caving/survey/redacted_cave/survey/20250816/F_plan_2.th2</div><div><br></div><div>Thanks very much in advance for any and all help! I really appreciate it.</div><br><div>Jonny</div></div>