Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsatisfiedLinkError on Windows #41

Closed
neilcsmith-net opened this issue Nov 24, 2016 · 12 comments
Closed

UnsatisfiedLinkError on Windows #41

neilcsmith-net opened this issue Nov 24, 2016 · 12 comments

Comments

@neilcsmith-net
Copy link
Member

@lafoletc Since (I think) updates in the pull request for MiniObject fixes #25 I am getting an UnsatisfiedLlinkError for g_type_name on Windows. Not sure whether the native function is mapped incorrectly, or whether there's a problem linking to GObject?! Any thoughts on this?

@neilcsmith-net
Copy link
Member Author

@lafoletc OK, I've traced the issue.

The code you introduced here is incorrect -

https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/lowlevel/GType.java#L38

Removing that interface and routing all native calls through GObjectAPI.GOBJECT_API seems to work. Note the difference in how that is loaded -

https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/lowlevel/GObjectAPI.java#L44

Do you want to fix this one or shall I? Are there any other places where you've added in an empty sub-interface like this?

Thanks, Neil

@matthiasblaesing
Copy link
Contributor

From my reading GstNative.load only works for exactly one library: gstreamer, but in this case gobject is needed. This:

GstNative.load(GObjectAPI.class)

translates to something like this:

GNative.loadLibrary("gstreamer", GObjectAPI.class, new HashMap<String, Object>() {{
        put(Library.OPTION_TYPE_MAPPER, new GTypeMapper());
        put(Library.OPTION_FUNCTION_MAPPER, new GFunctionMapper());
    }})

And that in turn calls

Native.loadLibrary("gstreamer", GObjectAPI.class, new HashMap<String, Object>() {{
        put(Library.OPTION_TYPE_MAPPER, new GTypeMapper());
        put(Library.OPTION_FUNCTION_MAPPER, new GFunctionMapper());
    }})

So in the end the gobject API is mapped onto the library gstreamer. I suspect there are different rules about symbols resolve in place, that cause this to succeed on linux, but fail on windows.

@neilcsmith-net
Copy link
Member Author

@matthiasblaesing Thanks for your comment. That's not quite what is happening here though. It'll actually pass API.class to JNA rather than the super-interface GObjectAPI.class. IIRC this may also be a problem because JNA caches things by class?! There are a few of these empty sub-classing interfaces inherited in the code base - in my opinion they need removing.

@matthiasblaesing
Copy link
Contributor

Before I answer the last question here are the two changes necessary for the unittests to work on windows (two fail on false assumptions, not on code errors) - sorry this is kind of improvised, as my main development happens on linux and starting gstreamer from a network share blocked it in native code):

ElementFactory.java (line 149 uses a wrong mapping, there different libraries are mapped onto the same interface, this is a no-no and fails on windows)

glist = GlibAPI.GLIB_API.g_list_append(glist, fact.handle());

GType.java (line 40, you already found that)

    private static final GObjectAPI gst = GObjectAPI.GOBJECT_API;

With these I get on windows 64bit and newest gstreamer:

1 Testfailure in GC tests (could be timing)
2 Testfailues in PluginTest, testGetOrigin and testGetPackage made assumptions about the values, that fail on this build


Ok - in general you can do what was done in Gstreamer, you can extend an interface to add more mapped methods. See here:

https://github.com/java-native-access/jna/blob/master/contrib/ntservice/src/jnacontrib/jna/Advapi32.java#L45

The ntservice contrib project enhances the Advapi32 that is supplied with jna-platform.

On another side is the question is this mass-mapping done in gstreamer really a good idea. You already chimed in on a bugreport in JNA about deadlocks and when I saw today how many times the same library is mapped I'm not surprised. The jna-platform bindings in general map one dll onto one java interface and delegate to that. So while the interfaces get fairly big (>> 1000 lines), the absolute count of loads is minimal.

I suggest to do the same in the gstreamer bindings. Even if you'd group by header file you'd go done with the amount of mapped interfaces you are using. For example:

ApplicationQuery
ConvertQuery
DurationQuery
FormatsQuery
LatencyQuery
PositionQuery
SeekingQuery
SegementQuery

each load their own API, instead of delegating to GstQueryAPI where most functions are already mapped or could be trivially added.

@neilcsmith-net
Copy link
Member Author

Thanks @matthiasblaesing Yes, it's a pattern we inherited from the old GStreamer 0.10 bindings which I've always disliked (it's not the only JNA project I work with). Up until this week I thought it was inefficient and a stumbling block on moving forwards with things like direct mapping - I didn't realise it was a critical bug!

So, yes agreed, time to trim the fat 😄

My own development platform is Linux also. I don't have GStreamer in my path on Windows (deliberately so I can test Praxis LIVE which uses JNA Platform to set up paths), which means I need to find a way to easily run the tests. I guess from now on we need most pull requests to pass the tests on all 3 platforms!

@lafoletc
Copy link
Contributor

lafoletc commented Nov 26, 2016

I have made a PR for GType following your propositions
My own development platform is Linux also.

@matthiasblaesing
Copy link
Contributor

Just so that the work is not doubled - I'm just looking into removing the overflous API classes. I'll stay away from GType as @lafoletc is working on that already.

@neilcsmith-net
Copy link
Member Author

@matthiasblaesing Thanks for letting us know. I was going to have a look, but can't until the end of this week, so if you can look sooner that's great!

A few thoughts on this -

  • one reason this pattern might exist is keeping the low-level proxy classes package private - they might need to become public fields (obviously static final already). We should probably do that for all if we have to.
  • the naming is a bit awkward for a public API. Would be nicer as GObject.API although the fields should probably have unique names. I'm wondering about using import static at the top of files so we can just use GOBJECT_API and also see what native API's are accessed by any file more easily?
  • Keep in mind that at some stage in the future those fields may want to become direct-mapped implementations of the interface (not sure there's anything that would not make that possible)
  • feel free to touch GType - this makes more sense as a single pull request / commit to master.

Thanks, Neil

@Abu-Abdullah
Copy link

Abu-Abdullah commented Dec 1, 2016

@neilcsmith-net still not able to compile it on Windows. is there a specific version of gst to compile with the new changes

Failed tests:
ElementFactoryTest.testGarbageCollection:163 Factory not garbage collected

"C:\Program Files\Java\jdk1.8.0_102\bin\java" -Dvisualvm.id=186167504659117 -Dmaven.multiModuleProjectDirectory=C:\Users\oracle\Desktop\gst1-java-core-master "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7535 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.3 install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GStreamer 1.x Java Core 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gst1-java-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ gst1-java-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 202 source files to C:\Users\oracle\Desktop\gst1-java-core-master\target\classes
[INFO] /C:/Users/oracle/Desktop/gst1-java-core-master/src/org/freedesktop/gstreamer/TagList.java: C:\Users\oracle\Desktop\gst1-java-core-master\src\org\freedesktop\gstreamer\TagList.java uses or overrides a deprecated API.
[INFO] /C:/Users/oracle/Desktop/gst1-java-core-master/src/org/freedesktop/gstreamer/TagList.java: Recompile with -Xlint:deprecation for details.
[INFO] /C:/Users/oracle/Desktop/gst1-java-core-master/src/org/freedesktop/gstreamer/MiniObject.java: Some input files use unchecked or unsafe operations.
[INFO] /C:/Users/oracle/Desktop/gst1-java-core-master/src/org/freedesktop/gstreamer/MiniObject.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ gst1-java-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ gst1-java-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 28 source files to C:\Users\oracle\Desktop\gst1-java-core-master\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ gst1-java-core ---
[INFO] Surefire report directory: C:\Users\oracle\Desktop\gst1-java-core-master\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.freedesktop.gstreamer.BinTest
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.016 sec
Running org.freedesktop.gstreamer.BusTest
(java.exe:8936): GLib-WARNING **: (gerror.c:514):g_error_copy: runtime check failed: (error->domain != 0)
(java.exe:8936): GLib-WARNING **: (gerror.c:515):g_error_copy: runtime check failed: (error->message != NULL)
(java.exe:8936): GLib-WARNING **: (gerror.c:514):g_error_copy: runtime check failed: (error->domain != 0)
(java.exe:8936): GLib-WARNING **: (gerror.c:515):g_error_copy: runtime check failed: (error->message != NULL)
(java.exe:8936): GLib-WARNING **: (gerror.c:514):g_error_copy: runtime check failed: (error->domain != 0)
(java.exe:8936): GLib-WARNING **: (gerror.c:515):g_error_copy: runtime check failed: (error->message != NULL)
(java.exe:8936): GLib-WARNING **: (gerror.c:514):g_error_copy: runtime check failed: (error->domain != 0)
(java.exe:8936): GLib-WARNING **: (gerror.c:515):g_error_copy: runtime check failed: (error->message != NULL)
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1 sec
Running org.freedesktop.gstreamer.CapsTest
audio/x-raw, channels=(int){ 2, 1 }
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.516 sec
Running org.freedesktop.gstreamer.ClockTimeTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
Running org.freedesktop.gstreamer.ElementFactoryTest
PlayBin factory name=playbin
Tests run: 20, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.579 sec <<< FAILURE!
testGarbageCollection(org.freedesktop.gstreamer.ElementFactoryTest)  Time elapsed: 0.265 sec  <<< FAILURE!
java.lang.AssertionError: Factory not garbage collected
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at org.freedesktop.gstreamer.ElementFactoryTest.testGarbageCollection(ElementFactoryTest.java:163)

Running org.freedesktop.gstreamer.ElementTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.922 sec
Running org.freedesktop.gstreamer.EnumTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.468 sec
Running org.freedesktop.gstreamer.event.ForceKeyUnitTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.406 sec
Running org.freedesktop.gstreamer.EventTest
Tests run: 42, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.984 sec
Running org.freedesktop.gstreamer.ExecutorServiceTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.672 sec
Running org.freedesktop.gstreamer.GarbageCollectionTest
checking if pipeline is destroyed
Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.875 sec
Running org.freedesktop.gstreamer.GhostPadTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.875 sec
Running org.freedesktop.gstreamer.GobjectSubclassTest
New type=[NewTestClass:454261776]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.844 sec
Running org.freedesktop.gstreamer.InitTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.422 sec
Running org.freedesktop.gstreamer.lowlevel.GValueTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.844 sec
Running org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSinkAPI$GstBaseSinkStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSinkAPI$GstBaseSinkAbi
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSinkAPI$GstBaseSinkClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSrcAPI$GstBaseSrcStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSrcAPI$GstBaseSrcAbi
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseSrcAPI$GstBaseSrcClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseTransformAPI$GstBaseTransformStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.BaseTransformAPI$GstBaseTransformClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GTypeClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GTypeInstance
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GObjectStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GObjectClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GTypeInfo
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpec
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecBoolean
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecChar
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecDouble
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecFloat
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecInt
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecInt64
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecLong
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecString
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecUChar
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecUInt
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GSignalAPI$GSignalQuery
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GValueAPI$GValue
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GValueAPI$GValueArray
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GValueStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GlibAPI$GList
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GlibAPI$GSList
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstAPI$GstSegmentStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstAPI$GErrorStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstBufferAPI$BufferStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstColorBalanceAPI$ColorBalanceChannelStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstControlSourceAPI$TimedValue
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstControlSourceAPI$ValueArray
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstControlSourceAPI$GstControlSourceStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstControlSourceAPI$GstControlSourceClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstElementAPI$GstElementDetails
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstElementAPI$GstElementStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstElementAPI$GstElementClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstEventAPI$EventStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstInterpolationControlSourceAPI$GstInterpolationControlSourceStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstInterpolationControlSourceAPI$GstInterpolationControlSourceClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstLFOControlSourceAPI$GstLFOControlSourceStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstLFOControlSourceAPI$GstLFOControlSourceClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstMessageAPI$MessageStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.547 sec
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstMiniObjectAPI$MiniObjectStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstObjectAPI$GstObjectStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstObjectAPI$GstObjectClass
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest testStruct
INFO: Testing org.freedesktop.gstreamer.lowlevel.GstQueryAPI$QueryStruct
Dec 01, 2016 5:04:56 PM org.freedesktop.gstreamer.lowlevel.LowLevelStructureTest runTest
WARNING: UNTESTABLE:
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecBoolean
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecChar
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecDouble
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecFloat
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecInt
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecInt64
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecLong
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecString
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecUChar
org.freedesktop.gstreamer.lowlevel.GObjectAPI$GParamSpecUInt
org.freedesktop.gstreamer.lowlevel.GstBufferAPI$BufferStruct
org.freedesktop.gstreamer.lowlevel.GstColorBalanceAPI$ColorBalanceChannelStruct
org.freedesktop.gstreamer.lowlevel.GstEventAPI$EventStruct
org.freedesktop.gstreamer.lowlevel.GstQueryAPI$QueryStruct

Running org.freedesktop.gstreamer.lowlevel.ReferenceManagerTest
(java.exe:4600): GStreamer-WARNING **: 0.10-style raw video caps are being created. Should be video/x-raw,format=(string).. now.
(java.exe:4600): GStreamer-WARNING **: 0.10-style raw video caps are being created. Should be video/x-raw,format=(string).. now.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.531 sec
Running org.freedesktop.gstreamer.MessageTest
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.015 sec
Running org.freedesktop.gstreamer.PadTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.609 sec
Running org.freedesktop.gstreamer.PipelineTest
bus ref_count=2
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.266 sec
Running org.freedesktop.gstreamer.PluginFeatureTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.797 sec
Running org.freedesktop.gstreamer.PluginTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.86 sec
Running org.freedesktop.gstreamer.QueryTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.515 sec
Running org.freedesktop.gstreamer.RegistryTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.937 sec
Running org.freedesktop.gstreamer.StructureTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.703 sec

Results :

Failed tests: 
  ElementFactoryTest.testGarbageCollection:163 Factory not garbage collected

Tests run: 225, Failures: 1, Errors: 0, Skipped: 3

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.330 s
[INFO] Finished at: 2016-12-01T17:05:07+04:00
[INFO] Final Memory: 18M/209M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on project gst1-java-core: There are test failures.
[ERROR] 
[ERROR] Please refer to C:\Users\oracle\Desktop\gst1-java-core-master\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Process finished with exit code 1

@matthiasblaesing
Copy link
Contributor

This build succeeded, only one unittest failed.

Failed tests: 
  ElementFactoryTest.testGarbageCollection:163 Factory not garbage collected

Either look into the reason why that fails or just ignore it:

http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html

I saw the test error and for me it was flaky.

@neilcsmith-net
Copy link
Member Author

Also note that if you just require a pre-built binary -

https://github.com/gstreamer-java/gst1-java-core/releases

New feature 😄

@Abu-Abdullah
Copy link

thanks for the support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants