Re: Beta 1.6: Crash on .CSV export of NULL-Values - Mailing list pgadmin-support

From Dave Page
Subject Re: Beta 1.6: Crash on .CSV export of NULL-Values
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E40154CD05@ratbert.vale-housing.co.uk
Whole thread Raw
In response to Beta 1.6: Crash on .CSV export of NULL-Values  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
List pgadmin-support
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Harald Armin Massa
Sent: 15 September 2006 13:00
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Beta 1.6: Crash on .CSV export of NULL-Values

Hello,

when exporting a query result with 1000 rows , 2 colums (int4 and text), and some NULL values within the text column, pgadmin crashes. (phone home crash)

This crash does not appear on exporting a smaller subste of the same result also with nulls and only 5, 100 or 200 rows (added a limit clause).

Also no crash with exporting ~ 4000 rows with no NULL values.
 
 Hi Harald,
 
I've managed to reproduce this - it appears to happen when wxFile::Write encounters characters that it cannot convert to the local charset (it then crashes). I've committed the following change to work around this:
 
When exporting data to the local charset wxFile::Write will crash if it can't convert the data. Check that conversion is possible before writing each row and skip if not. If any failures have occured, tell the user how many, and suggest they use UTF8 instead. Per Harald Armin Massa
 
Would you like an updated .exe to test?
 
Regards, Dave.

pgadmin-support by date:

Previous
From: "Harald Armin Massa"
Date:
Subject: Beta 1.6: Crash on .CSV export of NULL-Values
Next
From: Thomas Pundt
Date:
Subject: PgAdmin doesn't let me enter new values via table grid