I started getting spice extractions that seem to d...
# magic
l
I started getting spice extractions that seem to disagree with what magic is showing me in the window (or with
what
and
getnode
). I had a handful of segfaults in the last few hours. Maybe the .mag file is corrupted? It looks ok when I scroll through it in a text editor... Any advice? Any way to check if the `rect`s are screwed up or something? Error exists between keyboard and chair?
t
Segfaults should never be considered a user error. That's entirely on the programmer. If it is segfaulting frequently, then I suggest running a debugger while you're using magic so that you can send me a stack trace next time it happens. What I usually do is just to run
ps aux | grep magic
to get the process number of the running process, then do
gdb program <pid>
(which I think is syntactically incorrect but somehow works anyway---I think you can also do something like "connect <pid>" from the gdb command line). Once
gdb
is running, type
cont
to keep the program going. If it segfaults, then it will dump back to the gdb command line, and you can issue the command
bt
to get a backtrace of the program stack at the point of failure, and send that to me.
I have been getting some segfaults recently, too. I seem to come from doing a lot of changes in parameterized cells. Maybe something like deleting a parameterized cell and replacing it after changing parameters loses some important information that doesn't get recorded by the "undo" function, so that when you try to "undo" past that change, the database gets corrupted. But that's just a guess after having it happen several times in a row to me, and I didn't get the chance to debug it. Of course when I ran the debugger and repeated the steps, it wouldn't crash. I have been working on many different layouts over the past two weeks, and the segfaulting happened on just one of them. All the others, I had no problems at all. Your problem may not be related to that at all, but I thought I'd mention in in case it is.
FYI, magic does save work periodically, and
magic -r
should read back the last saved file and put you back within striking distance of where you were when the crash occurred. However, the last time I suffered a crash, the backup file was nowhere to be seen and I lost a lot of work (another unreproducible result). Always good to do "writeall" reasonably often.
l
Thanks yes I'll try to do a debug run after the weekend. I save and commit and push pretty often so I definitely have a good version, just not sure how far to roll back. Thanks for the info.