[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: SegFault when using enum type



On Fri, 19 Apr 2002, Pierre Pronchery wrote:
> 		Hi,
> 
> 	I'm developping with Dia CVS 20020416, and I have a problem when
> I save a diagram of my own. It's only failing when I save my diagram
> after modifying the only enum type present in my entity.
> 	I thought before it was a problem when destroying or writing the
> file, but it's not, the segfault happens after. Here is the last line
> trapped with strace:
> 
> open("/home/khorben/.dia/menus/display", O_WRONLY|O_CREAT|O_TRUNC, 0666)
> = -1 ENOENT (No such file or directory)
> --- SIGSEGV (Segmentation fault) ---
> 
> (I wonder why it's trying to open that file?)  I dunno if this is the
> cause, but it happens after the destruction. When I save the file, it is
> ok, and it happens if I close the diagram's window right after that.

That file is only opened to save the menu accellerators for the
right-button menu when a diagram is closed.  I think it may be unnecessary
even, as they seem to be saved into ~/.dia/menus anyway.

The interesting code after that is 

  open_diagrams = g_list_remove(open_diagrams, dia);
  layer_dialog_update_diagram_list();

  undo_destroy(dia->undo);
  
  diagram_tree_remove(diagram_tree(), dia);
  
  g_free(dia);

most likely it happens in one of these.

Instead of strace, try export DEBUGGER=gdb and get a backtrace (bt) from
it.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK