octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #55139] m-editor locale failure caused crash


From: John Donoghue
Subject: [Octave-bug-tracker] [bug #55139] m-editor locale failure caused crash
Date: Fri, 30 Nov 2018 13:03:02 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134

URL:
  <https://savannah.gnu.org/bugs/?55139>

                 Summary: m-editor locale failure caused crash
                 Project: GNU Octave
            Submitted by: lostbard
            Submitted on: Fri 30 Nov 2018 06:03:00 PM UTC
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: JohnD
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Any

    _______________________________________________________

Details:

Mainy a window issues, but could happen in Linux:

In /libgui/src/m-editor/file-editor-tab.cc file_editor_tab::load_file (const
QString& fileName)

The codec is gotten using:

 QTextCodec *codec = QTextCodec::codecForName (_encoding.toLatin1 ());

However the returned value is never checked but used as is, so if returns 0,
causes a crash.

The default values in Windows is "System" which according to Qt [1] is not
guarenteed to be available, and indeed isnt if compiled with ICU.

The return code should be changed and a default used when it didnt load?
Perhaps the codec from QTextCodec::codecForLocale(); ?

In addition, on init of the preference dialog, the available codecs are added
to the locale combox box, it also adds "System" for windows.


Perhaps the default should be the name from QTextCodec::codecForLocale() as
well.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55139>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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