0

I am capturing packets using Jpcap and simply printing the captured packets which is working fine, but when i try to write the captured packets in dumpfile i get error message.

A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000002c29eba, pid=6892, tid=0x0000000000001afc JRE version: Java(TM) SE Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01) Java VM: Java HotSpot(TM) 64-Bit Server VM (25.144-b01 mixed mode windows-amd64 compressed oops) Problematic frame: v ~BufferBlob::jni_fast_GetLongField Failed to write core dump. Minidumps are not enabled by default on client versions of Windows An error report file with more information is saved as: C:\Users\Asim\Documents\NetBeansProjects\JavaApplication31\hs_err_pid6892.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.

JpcapWriter writer = JpcapWriter.openDumpFile(captor, "CapturedPackets");
                Packet packet = null;
                for (int j = 0; j < 10; j++){
                       packet = captor.getPacket();

                        if(packet!=null)
                        {
                           System.out.println(packet);
                           writer.writePacket(packet);         
                        }
                }
                writer.close();

`

Husam Ibrahim
  • 6,999
  • 3
  • 16
  • 28
Asim Ejaz
  • 25
  • 1
  • 8
  • Hi, welcome to StackOverflow. Does C:\Users\Asim\Documents\NetBeansProjects\JavaApplication31\hs_err_pid6892.log not help? It sounds from the error message as if that may give you some guidance. – MandyShaw Oct 24 '18 at 18:48
  • No the log file have the same error message which i have mentioned above. – Asim Ejaz Oct 24 '18 at 20:42
  • OK, we'll have to wait for someone within the SO community who is expert in this area to pick this up. – MandyShaw Oct 28 '18 at 10:54

0 Answers0