Skip to content

Wrong data type of MIDINotificationMessageID enum #373

@davidgiga1993

Description

@davidgiga1993

Issue details

When calling getMessageID() of MIDINotification the app crashes with the following stack trace:

java.lang.IllegalArgumentException: No constant with value 103079215108 (0x1800000004) found in org.robovm.apple.coremidi.MIDINotificationMessageID	
at org.robovm.rt.bro.ValuedEnum$AsLongMarshaler.toObject(ValuedEnum.java:142)	
at org.robovm.rt.bro.ValuedEnum$AsMachineSizedSIntMarshaler.toObject(ValuedEnum.java:157)	
at org.robovm.apple.coremidi.MIDINotification.getMessageID(MIDINotification.java)	

The root cause is an invalid data type in MIDINotificationMessageID.
According to the documentation it's an Int32 but in the binding it's declared as long which causes issues on 64bit devices.

Would it be sufficient to remove the marshal parameter in the yaml configuration?

Reproduction steps/code

class Test implements MIDINotifyProc {
	public Test() {
		MIDIClient.create("SomeClient", this);
	}

	@Override
	public void notify(MIDINotification message)
	{
		// Crashes here
		message.getMessageID();
	}
}
...
Test test = new Test();
// Plugin a new midi devices to the ios device
// -> App crashes with the given stacktrace

Configuration

Not sure if this is relev

Build Tools:

  • Gradle plugin

Please provide the version of RoboVM, XCode and JDK used

  • Robovm: 2.3.7-SNAPSHOT
  • XCode: 10.2.1
  • JDK: 1.8.0_181

Build Targets:
iOS 12 (64 bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions