Bug report #2419

qgis standalone crashes when opening a vector layer with "Shift-JIS" encoding

Added by toltec77 - over 10 years ago. Updated over 10 years ago.

Assignee:nobody -
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:worksforme
Crashes QGIS or corrupts data: Copied to github as #:12479


Downloaded QGIS-1.4.0-1-No-GrassSetup.exe today. After installed and started the QGIS, A raster layer of Alaska sample data (landcover.img) opened OK, but the program shut down every time I tried to open a vector (lake.gml). Same thing happens when I tried to open my vector shapefiles.


#1 Updated by toltec77 - over 10 years ago

Update: it was related to encoding. The program works fine when encoding is "UTF-8," but fails when it is "Shift-JIS."

#2 Updated by Giovanni Manghi over 10 years ago

Hi, this is replicable with the standalone installer but not with the osego4w one.

#3 Updated by Giovanni Manghi over 10 years ago

see also #2448

#4 Updated by Charles Timko - over 10 years ago

I was able to reproduce this on Mac OS X. I think it would be best if this was definitely fixed for the 1.5 release. I am looking at a crash dump though, and it is pointing at QtCore as the culprit of the crashing [QTextCodec::toUnicode(char const*) to be more specific].

#5 Updated by Charles Timko - over 10 years ago

Looks like a general protection fault in QTextCodec::toUnicode.

#6 Updated by Charles Timko - over 10 years ago

I am unable to reproduce this error when using "System" encoding on a Mac. I can only reproduce when I change the encoding from System to Shift-JIS. toltec77, does that work for you using System over Shift-JIS?

#7 Updated by Charles Timko - over 10 years ago

Ok, I have some more data:

Debug: /Users/ctimko/Documents/workspace/qgis/src/core/qgsvectordataprovider.cpp: 144: (setEncoding) error finding QTextCodec for SHIFT-JIS

Doesn't look like QTextCodec supports Japanese. This error was created when I set the encoding within xml as shift-jis.

Now, loading the file again with the shift-jis as the XML encoding, and I told the dialog to use System, this removed the error (of course), but it's attempt at parsing the file resulted in a crash. I will try with other foreign encodings.

#8 Updated by yoichi Kayama over 10 years ago

This problem was talked in Japanese community.
This issue is due to lack of Qt codec plug-in.
OSGeo4w version has qt codec plugins at {OSGeo4w}/apps/qt4/plugins/codecs.
But standalone version has no qt plugin about codecs.
We addressed this issue by set the Qt codec plugins at the folder {QGIS}/bin/qtplugins/codecs.

To packeger, please include Qt plugins of codec to 1.5 new package.

#9 Updated by Jürgen Fischer over 10 years ago

  • Resolution set to worksforme
  • Status changed from Open to Closed

Qt packaging issue - not a QGIS problem.

Also available in: Atom PDF