r_pankevicius

Returning long string from IObjectClassValidation Validate methods crashes ArcMap 10

Discussion created by r_pankevicius on Jan 12, 2011
Hi,

platform Win XP, ArcMap 10 without SP1 (and reproducable on ArcMap 10 SP1), ArcObjects for .NET.

Returning long string from IObjectClassValidation.ValidateField, ValidateRow crashes ArcMap 10 (needs to close). IObjectClassValidation is implemented by class extension.

String that when returned from ValidateRow was:

If 'Ledningstyp' is 'Servisledning' then 'Ursprung ledningsmaterial' cannot be ''. Valid values: 'Odef','Betong','Flexoren','Galvjärn','Gjutjärn','Polyeten tryckrör','Polyeten-hård','Plaströr polyeten','Polyeten mjuk','Polyeten','Polyvinylklorid','Segjärn'

I found that stripping string to 200 characters long is OK. (Oh yes, spent some time converting national chars to latin chars but that did not help).

Documentation says about string to be returned:
If the field or row is invalid, an appropriate error string should be returned. Otherwise, return a zero length string.

Anyone knows what "appropriate error string" is and why our string was not "appropriate" enough?

Regards,

Outcomes