[Top][All Lists]

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

[Texmacs-dev] QT interactive prompt bug (EXC_BAD_ACCESS) + solution

From: Miguel de Benito Delgado
Subject: [Texmacs-dev] QT interactive prompt bug (EXC_BAD_ACCESS) + solution
Date: Sat, 6 Nov 2010 19:20:46 +0100

It looks like I'm on a roll! ;) First the fix, in case you don't have time to waste on my ramblings:

File qt_dialogues.cpp, line 718 onward, change to:

  QTMInteractivePrompt* _prompt = new QTMInteractivePrompt(label, items, to_qstring(it->type), tm_mainwindow());

  if (_prompt->exec() == QDialog::Accepted) {

    QString text = _prompt->currentText();

    ((qt_input_text_widget_rep*) int_input.rep) -> text = scm_quote (from_qstring (text));

    ((qt_input_text_widget_rep*) int_input.rep) -> cmd ();

  } else {

    // ((qt_input_text_widget_rep*) int_input.rep) -> text="#f";


  delete _prompt;


And here's the bug: 
  1. Take any document and manually create a fake autosave file (i.e. with the trailing tilde) which is newer.
  2. Open the document in TeXmacs QT (svn), with the new interactive prompt and the option to show interactive messages on the status bar.
  3. The shiny new interactive prompt kicks in, asks whether you want to load the newer autosaved file.
  4. Say whatever you want, it crashes on you.
Seems like qt_tm_widget_rep::write is doing tw->removeWidget(old_canvas); and this kills because the QTMInteractivePrompt had been created on the stack and someone is trying to delete it. Or that's my guess.

Kind regards,
Miguel de  Benito.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]