Skip to content

Crash when using a separate class-loader on Windows #49

Closed
@parg

Description

@parg

I have an application that loads different components using separate "class loaders".
When my component is loaded using the system class loader things work great.
When loaded via a separate classloader it causes a native crash.

I have reproduced the problem with some minimal classes:

bug.zip

Test2.java creates a peer connection, data channel and offer and loops printing the peer state. This should be packaged into test2.jar.

run_test2.bat invokes Test2 with the required jars on the command line.

Everything runs fine.

Test1.java creates a URLClassLoader with the jars required to run Test2 and loads and runs Test2 via the class loader. This should be packaged into test1.jar.

run_test1.bat invokes Test1

The RTCPeerConnection etc are created but then the JVM crashes while looping to print the peer state.

My guess would be that something in your JNI code is assuming that the system class loader can be used to load some webrtc-specific resource (which it can't as the system class loader doesn't know about it)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions