#911 Uncaught IllegalCharsetNameEx when restoring module infos

1.4.5
closed-fixed
nobody
None
5
2009-05-02
2009-04-30
No

I notice logged errors like the one below. Those break processing of InterpreterObserver.notifyProjectPythonpathRestored() because REF.getValidEncoding() does not handle this and propagates this unchecked exception. BTW: the idea that it can be thrown is lost in REF.getCustomReturnFromFile().

!MESSAGE Problem parsing the file :... .py.
!STACK 0
java.nio.charset.IllegalCharsetNameException: utf-8-*-
at java.nio.charset.Charset.checkName(Charset.java:285)
at java.nio.charset.Charset.lookup2(Charset.java:459)
at java.nio.charset.Charset.lookup(Charset.java:438)
at java.nio.charset.Charset.isSupported(Charset.java:480)
at org.python.pydev.core.REF.getValidEncoding(REF.java:878)
at org.python.pydev.core.REF.getPythonFileEncoding(REF.java:853)
at org.python.pydev.core.REF.getPythonFileEncoding(REF.java:777)
at org.python.pydev.core.REF.getCustomReturnFromFile(REF.java:652)
at com.python.pydev.analysis.additionalinfo.builders.InterpreterObserver.restoreInfoForModuleManager(InterpreterObserver.java:176)
at com.python.pydev.analysis.additionalinfo.builders.InterpreterObserver.notifyProjectPythonpathRestored(InterpreterObserver.java:240)
at org.python.pydev.plugin.nature.PythonNature$RebuildPythonNatureModules.run(PythonNature.java:141)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Patch attached with some casting error fixed too.

Discussion

  • Radim Kubacki

    Radim Kubacki - 2009-04-30

    patch against 1.4.5

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-05-02
    • status: open --> closed-fixed
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-05-02

    Thanks for the patch.

    Applied for 1.4.6 (svn: 2755)