Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+20 votes

When loading the JSON file, the video shows up at frame 0 but whenever we try to start autotracking or move the slide bar the whole program crashes and we get a weird error message:

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff8313d0335, pid=12416, tid=7824

JRE version: Java(TM) SE Runtime Environment (10.0.2+13) (build 10.0.2+13)

Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0.2+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)

Problematic frame:

C [opencv_java342.dll+0x1620335]

No core dump will be written. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

H:\git\FrigatebirdRepo\ProjectFrigateBird\hs_err_pid12416.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Anyone know what's going on here?
Think it's related to the slide bar but not sure

asked in CSC285_Fall2018 by (1 point)

1 Answer

+6 votes

This may have happened because you forgot to add the transient modifier in front of your VideoCapture field inside of the Video class. (See the code in the SharedClassRepo for an example of doing that.)

Basically, the error happens because GSON can't serialize a native (C++ code) object like VideoCapture. Making that field "transient" causes GSON to skip serializing it. (Skipping it also means that we need to make sure we initialize it properly back when you load the object from JSON, which is what the connectVideoCapture() method is about...)

answered by (5.7k points)
0

Our project is getting this same error when loading and we have the transient modifier and the connectVideoCapture() method in our code. Is there another place where this issue could be coming from?

...