NationalSecurityAgency/ghidra · error · TypeMismatchException

Property ${propertyName} is not object type

Error message

Property ${propertyName} is not object type

What it means

Thrown as TypeMismatchException by getObjectPropertyMap when the named property's value class is not assignable to Saveable. The trace stores property maps with typed value classes; an ObjectPropertyMap requires the values to be Saveable objects. Requesting it as an object map when the property is actually a string/void/boolean/etc. map is a type mismatch.

Source

Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/DBTraceProgramViewPropertyMapManager.java:376

	}

	@Override
	public StringPropertyMap getStringPropertyMap(String propertyName) {
		TracePropertyMap<String> map = program.trace.getAddressPropertyManager()
				.getPropertyMap(propertyName, String.class);
		return map == null ? null : new DBTraceProgramViewStringPropertyMap(map, propertyName);
	}

	@Override
	@SuppressWarnings("unchecked")
	public ObjectPropertyMap<? extends Saveable> getObjectPropertyMap(String propertyName) {
		TracePropertyMap<?> map =
			program.trace.getAddressPropertyManager().getPropertyMap(propertyName);
		if (map == null) {
			return null;
		}
		if (!Saveable.class.isAssignableFrom(map.getValueClass())) {
			throw new TypeMismatchException("Property " + propertyName + " is not object type");
		}
		return new DBTraceProgramViewObjectPropertyMap<>((TracePropertyMap<? extends Saveable>) map,
			propertyName);
	}

	@Override
	public VoidPropertyMap getVoidPropertyMap(String propertyName) {
		TracePropertyMap<Boolean> map = program.trace.getAddressPropertyManager()
				.getPropertyMap(propertyName, Boolean.class);
		return map == null ? null : new DBTraceProgramViewVoidPropertyMap(map, propertyName);
	}

	@Override
	public boolean removePropertyMap(String propertyName) {
		// It would delete for entire trace, not just this view
		throw new UnsupportedOperationException();
	}

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Check the property's value class via the address property manager before requesting a specific map type.
  2. Use the correct accessor: getStringPropertyMap / getVoidPropertyMap / getObjectPropertyMap matching the actual value type.
  3. If you need an object map, ensure the property was created with a Saveable value class.

Example fix

// before
ObjectPropertyMap<?> m = propMgr.getObjectPropertyMap("myProp");

// after
TracePropertyMap<?> map = trace.getAddressPropertyManager().getPropertyMap("myProp");
if (map != null && Saveable.class.isAssignableFrom(map.getValueClass())) {
    ObjectPropertyMap<?> m = propMgr.getObjectPropertyMap("myProp");
} else {
    // use the correct typed accessor (string, void, etc.)
}
Defensive patterns

Strategy: validation

Validate before calling

// Check the property's value class before requesting an object map
TracePropertyMap<?> map = trace.getAddressPropertyManager().getPropertyMap(propertyName);
if (map != null && Saveable.class.isAssignableFrom(map.getValueClass())) {
    ObjectPropertyMap<?> om = propMgr.getObjectPropertyMap(propertyName);
}

Type guard

static boolean isObjectProperty(TracePropertyMap<?> map) {
    return map != null && Saveable.class.isAssignableFrom(map.getValueClass());
}

Prevention

When it happens

Trigger: Calling getObjectPropertyMap(propertyName) for a property whose value class is a primitive-backed type (String, Boolean, etc.) rather than a Saveable subclass.

Common situations: Assuming a property is object-typed when it was defined as a string or void property. Mismatched property-type expectations between code that writes and code that reads a custom trace property.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/5206b4ed294398de. Report an issue: GitHub.