Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Internal error: pc 0x0 in read in psymtab, but not in symtab (solved?)
Forum Updated to NodeBB v4.3 + New Features

Internal error: pc 0x0 in read in psymtab, but not in symtab (solved?)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 14.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rutger
    wrote on last edited by
    #1

    I use extensively QMdiSubWindow with a central widget, QDockWidget with a database connection in my application. The QSortFilterProxyModel is shared between the subwindows and the dockwidgets. The data of the model is shown in the dockwidget sometimes with QTreeView and sometimes with QTableView and in the subwindows also with QDataWidgetMapper.

    For some MDI windows I get many times the warning while debugging: 'Internal error: pc 0x0 in read in psymtab, but not in symtab' and now occasionally a crash with ASSERT failure in QVector<T>::operator[]: "index out of range", file etc.

    I looked on the Internet to find an answer but could not come up with a solution. A struggled a few days and made the crash go away but I am not sure whether my solution is the real source of the problem

    The model (a subclassed QSortFilterProxyModel) creates the QDataWidgetMapper which is used by the subwindow. The subwindow has the tag Qt::WA_DeleteOnClose. In the destructor the model is not deleted when a dockwidget is still using the model. Due to that reason also the datawidgetmapper is not deleted. This seemed to be the problem. The datawidgetmapper is apparently trying to reference the mapped widgets which have been deleted with the subwindow.

    I solved the problem by calling the deleteMapper() function of the model when the subwindow is closed. Funny enough, this was not a problem earlier upto Qt 4.6 and also my models were smaller (less amount of columns in a table).

    Hope this helps others who might have come across the same problem.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gmaro
      wrote on last edited by
      #2

      Hi Rutger,

      Can't tell exactly whats going wrong in you'r code but I've been having similar problem long time ago with random crashes in some moment of development. In my case it turned out that I had some wrong memory/parentship management of widgets and some problems pointers stored in QList.
      Effect was that my project worked in debug mode (with same errors as you have), and crashed in release mode.
      When I've cleaned up my code and set up memory management properly everything started to work well without any debug errors and crashes.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved