Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-2136

8-bit chars break locals and watches window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 2.0.1
    • Qt Creator 2.0.0
    • Debugger
    • None
    • Windows XP
      Qt 4.7 beta 2
      Creator 2.0.80 and others
    • 2f82d775cac93401a44225c28222214abfe1bbc1

    Description

      When the locals and watchers window should include a character variable with the high-bit set, a python error is triggered and nothing is displayed in the window at all. Trivial test case below. Single-step through it. After c='\xf0' is executed, an error appears in the debugger view:

      DUMPER FAILED: 3490^error,data=

      {msg="Error occurred in Python command.", logstreamoutput="bb options:fancy vars: expanded: typeformats: formats: watchers:6865616465725f6c656e67746823746f6f6c7469702e78\n Error occurred in Python command.\n", consolestreamoutput="Traceback (most recent call last):\n File \"D:/Comp/Qt/qtcreator-2.0.80/share/qtcreator/gdbmacros/dumper.py\", line 1046, in invoke\n print('data=[' + d.output + ']')\n File \"<string>\", line 11, in write\n UnicodeEncodeError: 'ascii' codec can't encode character u'\\xf0' in position 369: ordinal not in range(128)\n"}

      and the contents of the locals and watchers pane vanishes. When c is reset to a 7-bit value, the watch pane repopulates.
      Renaming share\qtcreator\gdbmacros\dumper.py fixes the problem at the expense of losing the extra functionality dumper.py is supposed to provide.

      #include <QtCore/QCoreApplication>
      int main(int argc, char *argv[])
      	{
      	QCoreApplication a(argc, argv);
      	unsigned char c = ' ';
      	c = 'a';
      	c = '\xf0';
      	c = 'b';
      	return a.exec();
      	}
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            wssddc Bob Babcock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes