Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#274 closed defect (released)

crash when missing unitMember id

Reported by: Henri Owned by:
Priority: minor Milestone: WarFoundry 0.1
Component: WarFoundry-API Version: Trunk
Keywords: Cc:
Blocked By: Blocking: #290

Description

If the datafile refers to an unitMemebr id that does not exist, e.g. due to a typo then the program crashes.

It states something like a "null pointer error" or whatever.

Change History (14)

comment:1 Changed 10 years ago by ibboard

Status: newconfirmed

Looks like we need better validation, as it should already pull it in as an ID reference. Probably occurs because the typo was a different ID elsewhere in the file.

comment:2 Changed 10 years ago by ibboard

(In r555) Re #274: crash when missing unitMember id

  • Add test data and unit test for error

Also:

  • Refactor out common test code (setting up system)

comment:3 Changed 10 years ago by ibboard

(In r556) Re #274: crash when missing unitMember id

  • Try to update schema to require appropriate validation

Also:

  • Remove unused log4net DLL

comment:4 Changed 10 years ago by ibboard

Validation isn't working for some reason. key/keyref pair should enforce correct referencing, where as ID and IDREF as type just requires reference to any ID anywhere in the document. Still investigating.

comment:5 Changed 10 years ago by ibboard

(In r560) Re #274: crash when missing unitMember id

  • Tests and test data for unit member crash. Schema should be able to validate using key/keyref, but can't get it working at the moment.

comment:6 Changed 10 years ago by ibboard

(In r561) Re #274: crash when missing unitMember id

  • Fix test data to match current schema (typeID was alternate attribute name that was tried)

comment:7 Changed 10 years ago by ibboard

Problem all seems to be down to the fact that the schema validation will happily reject invalid files based on unexpected tags, but document.SchemaInfo.Validity is NotKnown.

comment:8 Changed 10 years ago by ibboard

Not useful - the MSDN example reports Valid on Windows and NotKnown on Mono. More investigation is required.

comment:9 Changed 10 years ago by ibboard

(In r589) Re #274: crash when missing unitMember id

  • Add NUnit config to allow for stand-alone NUnit testing in Windows (because Microsoft won't let you do it from VS Express)
  • Update test data to remove rogue unnecessary "lang" attribute
  • Remove unnecessary .csproj.user file from source control

comment:10 Changed 10 years ago by ibboard

Blocking: 290 added

comment:11 Changed 10 years ago by ibboard

(In r590) Re #274: Crash when missing unit member ID

  • Add key and keyref for member type

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Move keyref and key for equipment slot to correct place to be valid
  • Add aliased xmlns for schema to allow for use in XPath, which doesn't use default namespace
  • Disable warning reporting until Mono Bug 613684 is fixed (https://bugzilla.novell.com/show_bug.cgi?id=613684)

comment:12 Changed 10 years ago by ibboard

(In r591) Re #274: Crash when missing unit member ID

  • Add more specific tests for key and keyref for member type
  • Remove ExpectedException with unknown message

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add explanation of why tests aren't as perfect as they could be

comment:13 Changed 10 years ago by ibboard

Resolution: fixed
Status: confirmedclosed

Fixed in r591

comment:14 Changed 9 years ago by ibboard

Resolution: fixedreleased

Retro-actively tag RC1 releases as released

Note: See TracTickets for help on using tickets.