Opened 14 years ago

Closed 14 years ago

#2419 closed bug (worksforme)

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

Reported by: toltec77 Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.5.0
Component: Build/Install Version: Trunk
Keywords: vector Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: yes

Description

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.

Change History (11)

comment:1 by toltec77, 14 years ago

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

comment:2 by lutra, 14 years ago

Summary: unexpected shutdown when opening a vector layerqgis standalone crashes when opening a vector layer with "Shift-JIS" encoding

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

comment:3 by lutra, 14 years ago

see also #2448

comment:4 by pcav, 14 years ago

Component: Build/InstallData Provider

comment:5 by ctimko, 14 years ago

Platform: WindowsAll
Platform Version: XP service pack 3

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].

comment:6 by ctimko, 14 years ago

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

in reply to:  6 comment:7 by ctimko, 14 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?

comment:8 by ctimko, 14 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.

comment:9 by yoichi, 14 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.

comment:10 by pcav, 14 years ago

Component: Data ProviderBuild/Install

comment:11 by jef, 14 years ago

Resolution: worksforme
Status: newclosed

Qt packaging issue - not a QGIS problem.

Note: See TracTickets for help on using tickets.