Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8193179

C2 crash in com.android.dx.dex.cf.CfTranslator::processMethods

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      Java 9.0.1

      FULL OS VERSION :
      ver Windows 7

      A DESCRIPTION OF THE PROBLEM :
      JRE version: OpenJDK Runtime Environment (8.0_152-b01) (build 1.8.0_152-release-915-b01)
      Java VM: OpenJDK 64-Bit Server VM (25.152-b01 mixed mode windows-amd64 compressed oops)
      Problematic frame:
      V [jvm.dll+0x4325de]

      Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      REGRESSION. Last worked in version 7u80

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000746525de, pid=4612, tid=0x00000000000012b8
      #
      # JRE version: OpenJDK Runtime Environment (8.0_152-b01) (build 1.8.0_152-release-915-b01)
      # Java VM: OpenJDK 64-Bit Server VM (25.152-b01 mixed mode windows-amd64 compressed oops)
      # Problematic frame:
      # V [jvm.dll+0x4325de]
      #
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #

      --------------- T H R E A D ---------------

      Current thread (0x000000001d998000): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=4792, stack(0x000000001e140000,0x000000001e240000)]

      siginfo: ExceptionCode=0xc0000005, reading address 0x000000003f65ebd0

      Registers:
      RAX=0x0000000000000001, RBX=0x0000000033d5fd80, RCX=0x000000001e23c4f0, RDX=0x000000002f65ebd0
      RSP=0x000000001e23c070, RBP=0x000000001e23c0d0, RSI=0x0000000000224520, RDI=0x0000000000000000
      R8 =0x0000000000000000, R9 =0x0000000000000e2f, R10=0x0000000004000000, R11=0x0000000000000000
      R12=0x0000000033d5fd80, R13=0x000000000000752f, R14=0x0000000074220000, R15=0x0000000000000000
      RIP=0x00000000746525de, EFLAGS=0x0000000000010202

      Top of Stack: (sp=0x000000001e23c070)
      0x000000001e23c070: 0000000035b7e030 0000000035b7e030
      0x000000001e23c080: 000000001e23c4f0 000000001e23c200
      0x000000001e23c090: 00000e3800000000 0000000000000008
      0x000000001e23c0a0: 000000001fe17580 0000000000000049
      0x000000001e23c0b0: 000000001fd16e98 0000000000000049
      0x000000001e23c0c0: 0000000035d14570 000000002d47b850
      0x000000001e23c0d0: 0000000000000000 0000000000000000
      0x000000001e23c0e0: 000000001e23c4f0 0000000074652b17
      0x000000001e23c0f0: 0000000033d5fd80 0000000033d5fd80
      0x000000001e23c100: 0000000000224520 0000000000224520
      0x000000001e23c110: 00000e3800000000 0000000000000008
      0x000000001e23c120: 000000001fe17580 0000000000000049
      0x000000001e23c130: 000000001fd16e98 0000000000000049
      0x000000001e23c140: 0000000035d14570 0000000000000000
      0x000000001e23c150: 000000002f798b08 0000000000000000
      0x000000001e23c160: 00000000000003d8 000000002f798730

      Instructions: (pc=0x00000000746525de)
      0x00000000746525be: cc cc 48 89 74 24 18 55 57 41 54 48 8b ec 48 83
      0x00000000746525ce: ec 60 4c 63 52 20 4c 8b e2 48 8b 91 08 01 00 00
      0x00000000746525de: 46 8b 0c 92 41 8b f0 48 8b f9 45 3b ca 74 3d 0f
      0x00000000746525ee: 1f 00 41 8b c9 49 63 c1 44 8b 0c 82 44 3b c9 75


      Register to memory mapping:

      RAX=0x0000000000000001 is an unknown value
      RBX=0x0000000033d5fd80 is an unknown value
      RCX=0x000000001e23c4f0 is pointing into the stack for thread: 0x000000001d998000
      RDX=0x000000002f65ebd0 is an unknown value
      RSP=0x000000001e23c070 is pointing into the stack for thread: 0x000000001d998000
      RBP=0x000000001e23c0d0 is pointing into the stack for thread: 0x000000001d998000
      RSI=0x0000000000224520 is an unknown value
      RDI=0x0000000000000000 is an unknown value
      R8 =0x0000000000000000 is an unknown value
      R9 =0x0000000000000e2f is an unknown value
      R10=0x0000000004000000 is at entry_point+10688 in (nmethod*)0x0000000003ffd210
      R11=0x0000000000000000 is an unknown value
      R12=0x0000000033d5fd80 is an unknown value
      R13=0x000000000000752f is an unknown value
      R14=0x0000000074220000 is an unknown value
      R15=0x0000000000000000 is an unknown value


      Stack: [0x000000001e140000,0x000000001e240000], sp=0x000000001e23c070, free space=1008k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0x4325de]
      V [jvm.dll+0x432b17]
      V [jvm.dll+0x4346b3]
      V [jvm.dll+0x43f19b]
      V [jvm.dll+0x441a6e]
      V [jvm.dll+0x424b32]
      V [jvm.dll+0x80fa9]
      V [jvm.dll+0x818df]
      V [jvm.dll+0x21d06f]
      V [jvm.dll+0x26d4aa]
      C [msvcr100.dll+0x21d9f]
      C [msvcr100.dll+0x21e3b]
      C [kernel32.dll+0x159cd]
      C [ntdll.dll+0x2a561]


      Current CompileTask:
      C2:7743804 30975 ! 4 com.android.dx.dex.cf.CfTranslator::processMethods (597 bytes)


      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
        0x000000002bb78800 JavaThread "ForkJoinPool.commonPool-worker-2" daemon [_thread_in_Java, id=3076, stack(0x0000000028850000,0x0000000028950000)]
        0x000000002bb7a000 JavaThread "ForkJoinPool.commonPool-worker-1" daemon [_thread_blocked, id=1832, stack(0x0000000034a20000,0x0000000034b20000)]
        0x000000002bb79000 JavaThread "ForkJoinPool.commonPool-worker-0" daemon [_thread_in_native, id=4972, stack(0x00000000348f0000,0x00000000349f0000)]
        0x000000002bb77000 JavaThread "ForkJoinPool.commonPool-worker-3" daemon [_thread_blocked, id=4844, stack(0x00000000346d0000,0x00000000347d0000)]
        0x0000000026a5e800 JavaThread "Cache worker for Java compile cache (E:\Live Project\J2W\.gradle\4.1\javaCompile)" [_thread_blocked, id=3472, stack(0x0000000034570000,0x0000000034670000)]
        0x0000000026a5a000 JavaThread "Task worker for ':' Thread 3" [_thread_blocked, id=2836, stack(0x000000002d520000,0x000000002d620000)]
        0x0000000026a59800 JavaThread "Task worker for ':' Thread 2" [_thread_blocked, id=3824, stack(0x000000002e370000,0x000000002e470000)]
        0x0000000026a58800 JavaThread "Task worker for ':'" [_thread_blocked, id=1096, stack(0x0000000033ae0000,0x0000000033be0000)]
        0x000000002c6ae000 JavaThread "Cache worker for task history cache (E:\Live Project\J2W\.gradle\4.1\taskHistory)" [_thread_blocked, id=2276, stack(0x00000000339e0000,0x0000000033ae0000)]
        0x000000002c6ad800 JavaThread "Cache worker for file content cache (E:\Live Project\J2W\.gradle\4.1\fileContent)" [_thread_blocked, id=3900, stack(0x00000000338e0000,0x00000000339e0000)]
        0x000000002c6ac800 JavaThread "build operations Thread 4" [_thread_blocked, id=4560, stack(0x0000000033510000,0x0000000033610000)]
        0x000000002c6ac000 JavaThread "build operations Thread 3" [_thread_blocked, id=1788, stack(0x000000002b220000,0x000000002b320000)]
        0x000000002c6ab000 JavaThread "build operations Thread 2" [_thread_blocked, id=4004, stack(0x0000000028390000,0x0000000028490000)]
        0x000000002c6aa800 JavaThread "build operations" [_thread_blocked, id=4508, stack(0x000000002aae0000,0x000000002abe0000)]
        0x000000002c6a9800 JavaThread "Cache worker for Artifact transforms cache (C:\Users\hp\.gradle\caches\transforms-1)" [_thread_blocked, id=568, stack(0x0000000028750000,0x0000000028850000)]
        0x000000001f186800 JavaThread "Cache worker for file hash cache (E:\Live Project\J2W\.gradle\4.1\fileHashes)" [_thread_blocked, id=2712, stack(0x0000000022f20000,0x0000000023020000)]
        0x000000002b9d2000 JavaThread "Stdin handler" [_thread_blocked, id=2224, stack(0x0000000026eb0000,0x0000000026fb0000)]
        0x000000002b9d5000 JavaThread "Asynchronous log dispatcher for DefaultDaemonConnection: socket connection from /127.0.0.1:49538 to /127.0.0.1:50003" [_thread_blocked, id=4780, stack(0x0000000024610000,0x0000000024710000)]
        0x000000002c9b4000 JavaThread "Daemon worker Thread 6" [_thread_blocked, id=3436, stack(0x0000000023020000,0x0000000023120000)]
        0x000000002c9ae000 JavaThread "Cancel handler" [_thread_blocked, id=4256, stack(0x0000000022d70000,0x0000000022e70000)]
        0x000000002c9af800 JavaThread "Handler for socket connection from /127.0.0.1:49538 to /127.0.0.1:50003" [_thread_in_native, id=480, stack(0x0000000022bf0000,0x0000000022cf0000)]
        0x000000002c9b0000 JavaThread "Daemon Thread 6" [_thread_blocked, id=2948, stack(0x00000000228d0000,0x00000000229d0000)]
        0x0000000020d6c000 JavaThread "Memory manager" [_thread_blocked, id=4272, stack(0x0000000029210000,0x0000000029310000)]
        0x0000000020d60000 JavaThread "pool-1-thread-1" [_thread_blocked, id=2068, stack(0x0000000029020000,0x0000000029120000)]
        0x0000000020507000 JavaThread "File lock request listener" [_thread_in_native, id=536, stack(0x0000000023300000,0x0000000023400000)]
        0x000000001fffa800 JavaThread "Cache worker for file hash cache (C:\Users\hp\.gradle\caches\4.1\fileHashes)" [_thread_blocked, id=3452, stack(0x00000000231a0000,0x00000000232a0000)]
        0x000000001eda9000 JavaThread "Daemon periodic checks" [_thread_blocked, id=932, stack(0x0000000022530000,0x0000000022630000)]
        0x000000001e8f2800 JavaThread "Incoming local TCP Connector on port 49538" [_thread_in_native, id=4496, stack(0x0000000021440000,0x0000000021540000)]
        0x000000001da1e000 JavaThread "Service Thread" daemon [_thread_blocked, id=2808, stack(0x000000001e570000,0x000000001e670000)]
        0x000000001d9a0800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=4460, stack(0x000000001e240000,0x000000001e340000)]
        0x000000001d99f800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=1816, stack(0x000000001e410000,0x000000001e510000)]
      =>0x000000001d998000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=4792, stack(0x000000001e140000,0x000000001e240000)]
        0x000000001d997000 JavaThread "Attach Listener" daemon [_thread_blocked, id=1424, stack(0x000000001df60000,0x000000001e060000)]
        0x000000001d994000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4896, stack(0x000000001d4b0000,0x000000001d5b0000)]
        0x000000001d970800 JavaThread "Finalizer" daemon [_thread_blocked, id=4356, stack(0x000000001ddb0000,0x000000001deb0000)]
        0x000000001c432800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3284, stack(0x000000001d830000,0x000000001d930000)]
        0x00000000024cf000 JavaThread "main" [_thread_blocked, id=3588, stack(0x00000000027f0000,0x00000000028f0000)]

      Other Threads:
        0x000000001c421000 VMThread [stack: 0x000000001d640000,0x000000001d740000] [id=3412]
        0x000000001da22000 WatcherThread [stack: 0x000000001e730000,0x000000001e830000] [id=872]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap:
       PSYoungGen total 1331200K, used 811349K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1268736K, 60% used [0x000000076ab00000,0x0000000799925438,0x00000007b8200000)
        from space 62464K, 69% used [0x00000007bc300000,0x00000007bed30130,0x00000007c0000000)
        to space 64512K, 0% used [0x00000007b8200000,0x00000007b8200000,0x00000007bc100000)
       ParOldGen total 281088K, used 163074K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 58% used [0x00000006c0000000,0x00000006c9f40ab0,0x00000006d1280000)
       Metaspace used 92646K, capacity 101084K, committed 101336K, reserved 1136640K
        class space used 11690K, capacity 13749K, committed 13824K, reserved 1048576K

      Card table byte_map: [0x0000000011f80000,0x0000000012790000] byte_map_base: 0x000000000e980000

      Marking Bits: (ParMarkBitMap*) 0x00000000749e3950
       Begin Bits: [0x0000000013260000, 0x0000000017260000)
       End Bits: [0x0000000017260000, 0x000000001b260000)

      Polling page: 0x0000000000350000

      CodeCache: size=245760Kb used=84300Kb max_used=84312Kb free=161459Kb
       bounds [0x0000000002bc0000, 0x0000000007ea0000, 0x0000000011bc0000]
       total_blobs=22527 nmethods=21661 adapters=777
       compilation: enabled

      Compilation events (10 events):
      Event: 7743.601 Thread 0x000000001d99f800 nmethod 31002 0x0000000007e6a1d0 code [0x0000000007e6a320, 0x0000000007e6a858]
      Event: 7743.608 Thread 0x000000001d99f800 31003 4 com.android.dx.dex.file.ClassDataItem::addContents (207 bytes)
      Event: 7743.650 Thread 0x000000001d99f800 nmethod 31003 0x0000000007e8bcd0 code [0x0000000007e8bfa0, 0x0000000007e8dbd0]
      Event: 7743.650 Thread 0x000000001d99f800 31004 4 com.android.dx.dex.file.ClassDefItem::addContents (201 bytes)
      Event: 7743.681 Thread 0x000000001d99f800 nmethod 31004 0x0000000007e81250 code [0x0000000007e81500, 0x0000000007e82c60]
      Event: 7743.681 Thread 0x000000001d99f800 31005 4 java.util.DualPivotQuicksort::sort (1195 bytes)
      Event: 7743.707 Thread 0x000000001d9a0800 31009 3 com.android.dx.dex.code.SwitchData::<init> (117 bytes)
      Event: 7743.708 Thread 0x000000001d9a0800 nmethod 31009 0x0000000007e40290 code [0x0000000007e404a0, 0x0000000007e40cc8]
      Event: 7743.708 Thread 0x000000001d9a0800 31010 3 com.android.dx.dex.code.SwitchData::shouldPack (50 bytes)
      Event: 7743.708 Thread 0x000000001d9a0800 nmethod 31010 0x0000000007e69ad0 code [0x0000000007e69c40, 0x0000000007e6a0a8]

      GC Heap History (10 events):
      Event: 7288.518 GC heap before
      {Heap before GC invocations=39 (full 4):
       PSYoungGen total 1339392K, used 1310707K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1280000K, 100% used [0x000000076ab00000,0x00000007b8d00000,0x00000007b8d00000)
        from space 59392K, 51% used [0x00000007bc600000,0x00000007be3fcd90,0x00000007c0000000)
        to space 58368K, 0% used [0x00000007b8d00000,0x00000007b8d00000,0x00000007bc600000)
       ParOldGen total 326144K, used 288919K [0x00000006c0000000, 0x00000006d3e80000, 0x000000076ab00000)
        object space 326144K, 88% used [0x00000006c0000000,0x00000006d1a25f18,0x00000006d3e80000)
       Metaspace used 91929K, capacity 99088K, committed 99288K, reserved 1134592K
        class space used 11667K, capacity 13462K, committed 13568K, reserved 1048576K
      Event: 7288.567 GC heap after
      Heap after GC invocations=39 (full 4):
       PSYoungGen total 1305088K, used 24932K [0x000000076ab00000, 0x00000007bf800000, 0x00000007c0000000)
        eden space 1280000K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8d00000)
        from space 25088K, 99% used [0x00000007b8d00000,0x00000007ba559020,0x00000007ba580000)
        to space 54784K, 0% used [0x00000007bc280000,0x00000007bc280000,0x00000007bf800000)
       ParOldGen total 326144K, used 305054K [0x00000006c0000000, 0x00000006d3e80000, 0x000000076ab00000)
        object space 326144K, 93% used [0x00000006c0000000,0x00000006d29e7908,0x00000006d3e80000)
       Metaspace used 91929K, capacity 99088K, committed 99288K, reserved 1134592K
        class space used 11667K, capacity 13462K, committed 13568K, reserved 1048576K
      }
      Event: 7288.567 GC heap before
      {Heap before GC invocations=40 (full 5):
       PSYoungGen total 1305088K, used 24932K [0x000000076ab00000, 0x00000007bf800000, 0x00000007c0000000)
        eden space 1280000K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8d00000)
        from space 25088K, 99% used [0x00000007b8d00000,0x00000007ba559020,0x00000007ba580000)
        to space 54784K, 0% used [0x00000007bc280000,0x00000007bc280000,0x00000007bf800000)
       ParOldGen total 326144K, used 305054K [0x00000006c0000000, 0x00000006d3e80000, 0x000000076ab00000)
        object space 326144K, 93% used [0x00000006c0000000,0x00000006d29e7908,0x00000006d3e80000)
       Metaspace used 91929K, capacity 99088K, committed 99288K, reserved 1134592K
        class space used 11667K, capacity 13462K, committed 13568K, reserved 1048576K
      Event: 7288.977 GC heap after
      Heap after GC invocations=40 (full 5):
       PSYoungGen total 1305088K, used 0K [0x000000076ab00000, 0x00000007bf800000, 0x00000007c0000000)
        eden space 1280000K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8d00000)
        from space 25088K, 0% used [0x00000007b8d00000,0x00000007b8d00000,0x00000007ba580000)
        to space 54784K, 0% used [0x00000007bc280000,0x00000007bc280000,0x00000007bf800000)
       ParOldGen total 281088K, used 111023K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 39% used [0x00000006c0000000,0x00000006c6c6bf98,0x00000006d1280000)
       Metaspace used 90253K, capacity 96752K, committed 99288K, reserved 1134592K
        class space used 11340K, capacity 12943K, committed 13568K, reserved 1048576K
      }
      Event: 7338.637 GC heap before
      {Heap before GC invocations=41 (full 5):
       PSYoungGen total 1305088K, used 1280000K [0x000000076ab00000, 0x00000007bf800000, 0x00000007c0000000)
        eden space 1280000K, 100% used [0x000000076ab00000,0x00000007b8d00000,0x00000007b8d00000)
        from space 25088K, 0% used [0x00000007b8d00000,0x00000007b8d00000,0x00000007ba580000)
        to space 54784K, 0% used [0x00000007bc280000,0x00000007bc280000,0x00000007bf800000)
       ParOldGen total 281088K, used 111023K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 39% used [0x00000006c0000000,0x00000006c6c6bf98,0x00000006d1280000)
       Metaspace used 91990K, capacity 99940K, committed 100184K, reserved 1136640K
        class space used 11616K, capacity 13593K, committed 13696K, reserved 1048576K
      Event: 7338.704 GC heap after
      Heap after GC invocations=41 (full 5):
       PSYoungGen total 1321472K, used 54774K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1266688K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8000000)
        from space 54784K, 99% used [0x00000007bc280000,0x00000007bf7fda38,0x00000007bf800000)
        to space 65536K, 0% used [0x00000007b8000000,0x00000007b8000000,0x00000007bc000000)
       ParOldGen total 281088K, used 118229K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 42% used [0x00000006c0000000,0x00000006c7375778,0x00000006d1280000)
       Metaspace used 91990K, capacity 99940K, committed 100184K, reserved 1136640K
        class space used 11616K, capacity 13593K, committed 13696K, reserved 1048576K
      }
      Event: 7737.579 GC heap before
      {Heap before GC invocations=42 (full 5):
       PSYoungGen total 1321472K, used 1321209K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1266688K, 99% used [0x000000076ab00000,0x00000007b7fc09d0,0x00000007b8000000)
        from space 54784K, 99% used [0x00000007bc280000,0x00000007bf7fda38,0x00000007bf800000)
        to space 65536K, 0% used [0x00000007b8000000,0x00000007b8000000,0x00000007bc000000)
       ParOldGen total 281088K, used 118229K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 42% used [0x00000006c0000000,0x00000006c7375778,0x00000006d1280000)
       Metaspace used 92471K, capacity 100908K, committed 101080K, reserved 1136640K
        class space used 11686K, capacity 13741K, committed 13824K, reserved 1048576K
      Event: 7737.648 GC heap after
      Heap after GC invocations=42 (full 5):
       PSYoungGen total 1332224K, used 25046K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1266688K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8000000)
        from space 65536K, 38% used [0x00000007b8000000,0x00000007b9875830,0x00000007bc000000)
        to space 62464K, 0% used [0x00000007bc300000,0x00000007bc300000,0x00000007c0000000)
       ParOldGen total 281088K, used 163066K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 58% used [0x00000006c0000000,0x00000006c9f3eab0,0x00000006d1280000)
       Metaspace used 92471K, capacity 100908K, committed 101080K, reserved 1136640K
        class space used 11686K, capacity 13741K, committed 13824K, reserved 1048576K
      }
      Event: 7742.555 GC heap before
      {Heap before GC invocations=43 (full 5):
       PSYoungGen total 1332224K, used 1291734K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1266688K, 100% used [0x000000076ab00000,0x00000007b8000000,0x00000007b8000000)
        from space 65536K, 38% used [0x00000007b8000000,0x00000007b9875830,0x00000007bc000000)
        to space 62464K, 0% used [0x00000007bc300000,0x00000007bc300000,0x00000007c0000000)
       ParOldGen total 281088K, used 163066K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 58% used [0x00000006c0000000,0x00000006c9f3eab0,0x00000006d1280000)
       Metaspace used 92646K, capacity 101084K, committed 101336K, reserved 1136640K
        class space used 11690K, capacity 13749K, committed 13824K, reserved 1048576K
      Event: 7742.601 GC heap after
      Heap after GC invocations=43 (full 5):
       PSYoungGen total 1331200K, used 43200K [0x000000076ab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 1268736K, 0% used [0x000000076ab00000,0x000000076ab00000,0x00000007b8200000)
        from space 62464K, 69% used [0x00000007bc300000,0x00000007bed30130,0x00000007c0000000)
        to space 64512K, 0% used [0x00000007b8200000,0x00000007b8200000,0x00000007bc100000)
       ParOldGen total 281088K, used 163074K [0x00000006c0000000, 0x00000006d1280000, 0x000000076ab00000)
        object space 281088K, 58% used [0x00000006c0000000,0x00000006c9f40ab0,0x00000006d1280000)
       Metaspace used 92646K, capacity 101084K, committed 101336K, reserved 1136640K
        class space used 11690K, capacity 13749K, committed 13824K, reserved 1048576K
      }

      Deoptimization events (10 events):
      Event: 7740.387 Thread 0x0000000026a59800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000076fe0f8 method=com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection.addAll(Ljava/util/Collection;)Z @ 1
      Event: 7740.387 Thread 0x0000000026a59800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000042cb894 method=com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection.size()I @ 8
      Event: 7740.455 Thread 0x000000002bb79000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000005cf614c method=com.android.dx.rop.code.LocalItem.compareHandlesNulls(Lcom/android/dx/rop/cst/CstString;Lcom/android/dx/rop/cst/CstString;)I @ 8
      Event: 7740.555 Thread 0x000000002bb7a000 Uncommon trap: reason=array_check action=maybe_recompile pc=0x000000000731ab88 method=java.util.ComparableTimSort.mergeLo(IIII)V @ 133
      Event: 7740.943 Thread 0x000000002bb77000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000005dbdc30 method=java.util.concurrent.ConcurrentHashMap.addCount(JI)V @ 97
      Event: 7741.732 Thread 0x000000002bb7a000 Uncommon trap: reason=array_check action=maybe_recompile pc=0x000000000731ab88 method=java.util.ComparableTimSort.mergeLo(IIII)V @ 133
      Event: 7742.149 Thread 0x000000002bb77000 Uncommon trap: reason=array_check action=maybe_recompile pc=0x0000000003433454 method=java.util.ComparableTimSort.mergeHi(IIII)V @ 171
      Event: 7742.377 Thread 0x000000002bb7a000 Uncommon trap: reason=null_check action=make_not_entrant pc=0x0000000006120a90 method=com.android.dx.dex.code.LocalList$MakeState.checkForEmptyRange(ILcom/android/dx/rop/code/RegisterSpec;)Z @ 119
      Event: 7742.618 Thread 0x000000002bb77000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000004c0c954 method=java.lang.ref.SoftReference.get()Ljava/lang/Object; @ 6
      Event: 7742.620 Thread 0x000000002bb77000 Uncommon trap: reason=array_check action=maybe_recompile pc=0x0000000003433454 method=java.util.ComparableTimSort.mergeHi(IIII)V @ 171

      Classes redefined (0 events):
      No events

      Internal exceptions (10 events):
      Event: 7743.523 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x000000078fc2fe60) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.536 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x00000007908c6ce8) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.563 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x0000000791b14678) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.597 Thread 0x000000002bb7a000 Exception <a 'sun/nio/fs/WindowsException'> (0x0000000792dcb9f0) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.601 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x0000000793290e70) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.605 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x0000000793833960) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.636 Thread 0x000000002bb7a000 Exception <a 'sun/nio/fs/WindowsException'> (0x00000007948be170) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.683 Thread 0x000000002bb79000 Exception <a 'sun/nio/fs/WindowsException'> (0x000000079692b148) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.696 Thread 0x000000002bb77000 Exception <a 'sun/nio/fs/WindowsException'> (0x0000000797364e90) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]
      Event: 7743.714 Thread 0x000000002bb7a000 Exception <a 'sun/nio/fs/WindowsException'> (0x00000007982e4ba0) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 709]

      Events (10 events):
      Event: 7742.552 Executing VM operation: ParallelGCFailedAllocation
      Event: 7742.601 Executing VM operation: ParallelGCFailedAllocation done
      Event: 7742.618 Thread 0x000000002bb77000 Uncommon trap: trap_request=0xffffff65 fr.pc=0x0000000004c0c954
      Event: 7742.618 Thread 0x000000002bb77000 DEOPT PACKING pc=0x0000000004c0c954 sp=0x00000000347ce750
      Event: 7742.618 Thread 0x000000002bb77000 DEOPT UNPACKING pc=0x0000000002c0556a sp=0x00000000347ce588 mode 2
      Event: 7742.620 Thread 0x000000002bb77000 Uncommon trap: trap_request=0xffffffd6 fr.pc=0x0000000003433454
      Event: 7742.620 Thread 0x000000002bb77000 DEOPT PACKING pc=0x0000000003433454 sp=0x00000000347ce5f0
      Event: 7742.620 Thread 0x000000002bb77000 DEOPT UNPACKING pc=0x0000000002c0556a sp=0x00000000347ce5d8 mode 2
      Event: 7743.395 Thread 0x000000002bb77000 DEOPT PACKING pc=0x0000000007c99428 sp=0x00000000347ce710
      Event: 7743.395 Thread 0x000000002bb77000 DEOPT UNPACKING pc=0x0000000002c075bf sp=0x00000000347ce4e8 mode 0


      Dynamic libraries:
      0x000000013fb20000 - 0x000000013fb51000 C:\Program Files\Android\Android Studio\jre\bin\java.exe
      0x0000000077bd0000 - 0x0000000077d7a000 C:\Windows\SYSTEM32\ntdll.dll
      0x0000000077ab0000 - 0x0000000077bcf000 C:\Windows\system32\kernel32.dll
      0x000007fefd960000 - 0x000007fefd9ca000 C:\Windows\system32\KERNELBASE.dll
      0x000007feff910000 - 0x000007feff9eb000 C:\Windows\system32\ADVAPI32.dll
      0x000007fefe2a0000 - 0x000007fefe33f000 C:\Windows\system32\msvcrt.dll
      0x000007fefeb60000 - 0x000007fefeb7f000 C:\Windows\SYSTEM32\sechost.dll
      0x000007fefe4c0000 - 0x000007fefe5ed000 C:\Windows\system32\RPCRT4.dll
      0x00000000779b0000 - 0x0000000077aaa000 C:\Windows\system32\USER32.dll
      0x000007feffe70000 - 0x000007feffed7000 C:\Windows\system32\GDI32.dll
      0x000007feffe60000 - 0x000007feffe6e000 C:\Windows\system32\LPK.dll
      0x000007fefe700000 - 0x000007fefe7cb000 C:\Windows\system32\USP10.dll
      0x000007fefbf50000 - 0x000007fefc144000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll
      0x000007fefe680000 - 0x000007fefe6f1000 C:\Windows\system32\SHLWAPI.dll
      0x000007fefd6c0000 - 0x000007fefd717000 C:\Windows\system32\apphelp.dll
      0x000007feee390000 - 0x000007feee3ea000 C:\Windows\AppPatch\AppPatch64\AcLayers.DLL
      0x000007fefb580000 - 0x000007fefb5f1000 C:\Windows\system32\WINSPOOL.DRV
      0x000007fef8730000 - 0x000007fef8748000 C:\Windows\system32\MPR.dll
      0x000007feedf20000 - 0x000007feee387000 C:\Windows\AppPatch\AppPatch64\AcXtrnal.DLL
      0x000007feedec0000 - 0x000007feedf11000 C:\Windows\AppPatch\AppPatch64\AcGenral.DLL
      0x000007fefd690000 - 0x000007fefd6b5000 C:\Windows\system32\SspiCli.dll
      0x000007feffc60000 - 0x000007feffe5c000 C:\Windows\system32\ole32.dll
      0x000007fefeb80000 - 0x000007feff90a000 C:\Windows\system32\SHELL32.dll
      0x0000000073df0000 - 0x0000000073df3000 C:\Windows\system32\sfc.dll
      0x000007fefa520000 - 0x000007fefa530000 C:\Windows\system32\sfc_os.DLL
      0x000007fefd940000 - 0x000007fefd95e000 C:\Windows\system32\USERENV.dll
      0x000007fefd8d0000 - 0x000007fefd8df000 C:\Windows\system32\profapi.dll
      0x000007fefb160000 - 0x000007fefb178000 C:\Windows\system32\dwmapi.dll
      0x000007fefdc80000 - 0x000007fefdcae000 C:\Windows\system32\IMM32.DLL
      0x000007fefe390000 - 0x000007fefe499000 C:\Windows\system32\MSCTF.dll
      0x0000000074140000 - 0x0000000074212000 C:\Program Files\Android\Android Studio\jre\jre\bin\msvcr100.dll
      0x0000000074220000 - 0x0000000074a5e000 C:\Program Files\Android\Android Studio\jre\jre\bin\server\jvm.dll
      0x000007fef07a0000 - 0x000007fef07a9000 C:\Windows\system32\WSOCK32.dll
      0x000007fefe340000 - 0x000007fefe38d000 C:\Windows\system32\WS2_32.dll
      0x000007fefe670000 - 0x000007fefe678000 C:\Windows\system32\NSI.dll
      0x000007fefb740000 - 0x000007fefb77b000 C:\Windows\system32\WINMM.dll
      0x000007fefc9a0000 - 0x000007fefc9ac000 C:\Windows\system32\VERSION.dll
      0x0000000077d90000 - 0x0000000077d97000 C:\Windows\system32\PSAPI.DLL
      0x000007fef0580000 - 0x000007fef058f000 C:\Program Files\Android\Android Studio\jre\jre\bin\verify.dll
      0x000007feef380000 - 0x000007feef3a9000 C:\Program Files\Android\Android Studio\jre\jre\bin\java.dll
      0x000007feeef40000 - 0x000007feeef56000 C:\Program Files\Android\Android Studio\jre\jre\bin\zip.dll
      0x000007fee51a0000 - 0x000007fee51ba000 C:\Program Files\Android\Android Studio\jre\jre\bin\net.dll
      0x000007fefd050000 - 0x000007fefd0a5000 C:\Windows\system32\mswsock.dll
      0x000007fefd040000 - 0x000007fefd047000 C:\Windows\System32\wship6.dll
      0x000007fee5180000 - 0x000007fee5191000 C:\Program Files\Android\Android Studio\jre\jre\bin\nio.dll
      0x000007fef8c20000 - 0x000007fef8c3e000 C:\Users\hp\.gradle\native\25\windows-amd64\native-platform.dll
      0x000007fee4690000 - 0x000007fee469d000 C:\Program Files\Android\Android Studio\jre\jre\bin\management.dll
      0x000007fefd0b0000 - 0x000007fefd0c8000 C:\Windows\system32\CRYPTSP.dll
      0x000007fefcdb0000 - 0x000007fefcdf7000 C:\Windows\system32\rsaenh.dll
      0x000007fefd760000 - 0x000007fefd76f000 C:\Windows\system32\CRYPTBASE.dll
      0x000007fefb550000 - 0x000007fefb577000 C:\Windows\system32\IPHLPAPI.DLL
      0x000007fefb250000 - 0x000007fefb25b000 C:\Windows\system32\WINNSI.DLL
      0x000007fefaf20000 - 0x000007fefaf31000 C:\Windows\system32\dhcpcsvc6.DLL
      0x000007fefaea0000 - 0x000007fefaeb8000 C:\Windows\system32\dhcpcsvc.DLL
      0x000007fee4f90000 - 0x000007fee4fb4000 C:\Program Files\Android\Android Studio\jre\jre\bin\sunec.dll
      0x000007fefca70000 - 0x000007fefca77000 C:\Windows\System32\wshtcpip.dll
      0x000007fefced0000 - 0x000007fefcf2b000 C:\Windows\system32\DNSAPI.dll
      0x000007fef9350000 - 0x000007fef9358000 C:\Windows\system32\rasadhlp.dll
      0x000007fefb1e0000 - 0x000007fefb233000 C:\Windows\System32\fwpuclnt.dll
      0x000007fef18d0000 - 0x000007fef18db000 C:\Program Files\Android\Android Studio\jre\jre\bin\sunmscapi.dll
      0x000007fefdb10000 - 0x000007fefdc7d000 C:\Windows\system32\CRYPT32.dll
      0x000007fefd8c0000 - 0x000007fefd8cf000 C:\Windows\system32\MSASN1.dll
      0x000007fef1440000 - 0x000007fef1565000 C:\Windows\system32\dbghelp.dll

      VM Arguments:
      jvm_args: -XX:MaxPermSize=1024m -Xmx4096m -Dfile.encoding=windows-1252 -Duser.country=IN -Duser.language=en -Duser.variant
      java_command: org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.1
      java_class_path (initial): C:\Users\hp\.gradle\wrapper\dists\gradle-4.1-all\bzyivzo6n839fup2jbap0tjew\gradle-4.1\lib\gradle-launcher-4.1.jar
      Launcher Type: SUN_STANDARD

      Environment Variables:
      JAVA_HOME=C:\Program Files\Java\jre-9.0.1\bin
      PATH=C:\Program Files\Java\jre-9.0.1\bin;C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd
      USERNAME=hp
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



      --------------- S Y S T E M ---------------

      OS: Windows 7 , 64 bit Build 7601 (6.1.7601.23915)

      CPU:total 4 (initial active 4) (4 cores per cpu, 1 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, tsc, tscinvbit, tscinv

      Memory: 4k page, physical 8260552k(2794536k free), swap 16519244k(10065788k free)

      vm_info: OpenJDK 64-Bit Server VM (25.152-b01) for windows-amd64 JRE (1.8.0_152-release-915-b01), built by "builder" with MS VC++ 10.0 (VS2010)

      time: Tue Dec 05 17:12:27 2017
      elapsed time: 7743 seconds (0d 2h 9m 3s)



      REPRODUCIBILITY :
      This bug can be reproduced often.

      ---------- BEGIN SOURCE ----------
      package com.joulestowatts.j2w.Fragment;


      import android.Manifest;
      import android.annotation.TargetApi;
      import android.app.ProgressDialog;
      import android.content.Context;
      import android.content.DialogInterface;
      import android.content.Intent;
      import android.content.pm.PackageManager;
      import android.location.LocationManager;
      import android.os.AsyncTask;
      import android.os.Build;
      import android.os.Bundle;
      import android.os.Handler;
      import android.support.v4.app.ActivityCompat;
      import android.support.v4.app.Fragment;
      import android.support.v4.app.FragmentTransaction;
      import android.support.v4.content.ContextCompat;
      import android.support.v7.app.AlertDialog;
      import android.support.v7.widget.LinearLayoutManager;
      import android.support.v7.widget.LinearSnapHelper;
      import android.support.v7.widget.RecyclerView;
      import android.view.LayoutInflater;
      import android.view.Menu;
      import android.view.MenuInflater;
      import android.view.MenuItem;
      import android.view.View;
      import android.view.ViewGroup;
      import android.widget.EditText;
      import android.widget.ImageView;
      import android.widget.TextView;
      import android.widget.Toast;

      import com.joulestowatts.j2w.Adapter.WalkinAdapter;
      import com.joulestowatts.j2w.Model.Walkin;
      import com.joulestowatts.j2w.R;
      import com.joulestowatts.j2w.Util.GPSTracker;

      import org.apache.http.HttpEntity;
      import org.apache.http.HttpResponse;
      import org.apache.http.NameValuePair;
      import org.apache.http.client.HttpClient;
      import org.apache.http.client.entity.UrlEncodedFormEntity;
      import org.apache.http.client.methods.HttpGet;
      import org.apache.http.client.methods.HttpPost;
      import org.apache.http.impl.client.DefaultHttpClient;
      import org.apache.http.message.BasicNameValuePair;
      import org.apache.http.protocol.BasicHttpContext;
      import org.apache.http.protocol.HTTP;
      import org.apache.http.protocol.HttpContext;
      import org.apache.http.util.EntityUtils;
      import org.json.JSONArray;
      import org.json.JSONException;
      import org.json.JSONObject;

      import java.io.IOException;
      import java.io.InputStream;
      import java.util.ArrayList;
      import java.util.List;

      import static android.content.Context.LOCATION_SERVICE;
      import static com.joulestowatts.j2w.Activities.MainActivity.token;


      /**
       * A simple {@link Fragment} subclass.
       */
      public class DashboardFragment extends Fragment {

          EditText searchBox;
          TextView noWalkins;
          TextView notification,profile,matchedJobs,appliedJobs;
          ImageView searchButton;
          String lat,lon;
          HttpEntity resEntity;
          public static String WALK_IN_API = "http://54.229.153.61/walkins";
          public static String SEND_LOC_API = "http://54.229.153.61/api/v1/candidate_location?token="+token;
          RecyclerView rv_walkins;
          String responseStr = "";
          Integer timeout = 0;
          WalkinAdapter walkinAdapter;
          List<Walkin> walkinList;
          Fragment fragment;
          final int speedScroll = 4000;
          List<String> listPermissionsNeeded;
          String[] PERMISSIONS = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};
          public static final int MULTIPLE_PERMISSIONS = 10;
          Context context = getActivity();

          ProgressDialog progressDialog;
          LocationManager locationManager;
          LinearLayoutManager layoutManager;


          public DashboardFragment() {
              // Required empty public constructor
          }


          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                   Bundle savedInstanceState) {
              // Inflate the layout for this fragment
              final View view = inflater.inflate(R.layout.fragment_dashboard, container, false);
              setHasOptionsMenu(true);
              getActivity().setTitle("J2W Home");

              locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);
              rv_walkins = view.findViewById(R.id.rv_walkins);


              searchBox = view.findViewById(R.id.dashboard_searchBox);

              rv_walkins.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));

              noWalkins= view.findViewById(R.id.walkin_error_text);
              noWalkins.setVisibility(View.INVISIBLE);

              notification= view.findViewById(R.id.dash_notification);
              notification.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      getActivity().getSupportFragmentManager().beginTransaction()
                              .replace(R.id.content_frame,new NotificationFragment())
                              .addToBackStack(null)
                              .commit();
                  }
              });
              profile= view.findViewById(R.id.dash_myProfile);
              profile.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {

                      if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
                          if (isLocationAllowed()==true ){
                              progressDialog = ProgressDialog.show(getActivity(), "", "Sending your location...", false);
                              GPSTracker gps = new GPSTracker(getActivity());
                              double latitude = gps.getLatitude();
                              double longitude= gps.getLongitude();

                              lat= String.valueOf(latitude);
                              lon=String.valueOf(longitude);

                              if (!lat.equals("0.0")|| !lon.equals("0.0")){
                                  Toast.makeText(getContext(),"Sending your location...",Toast.LENGTH_SHORT).show();
                                  new sendLoc().execute();
                              }else {
                                  progressDialog.dismiss();
                                  Toast.makeText(getContext(),"Please try again",Toast.LENGTH_SHORT).show();
                              }

                          }else{

                              checkPermission();
                          }
                      }else{
                          showGPSDisabledAlertToUser();
                      }

                  }
              });

              matchedJobs= view.findViewById(R.id.dash_matchedJobs);
              matchedJobs.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      getActivity().getSupportFragmentManager().beginTransaction()
                              .replace(R.id.content_frame,new MatchedJobsFragment())
                              .addToBackStack(null)
                              .commit();
                  }
              });
              appliedJobs= view.findViewById(R.id.dash_appliedJobs);
              appliedJobs.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
                     getActivity().getSupportFragmentManager().beginTransaction()
                             .replace(R.id.content_frame,new AppliedJobsFragment())
                             .addToBackStack(null)
                             .commit();
                 }
             });

              searchButton= view.findViewById(R.id.dashboard_searchButton);

              searchButton.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {

                      String key=searchBox.getText().toString();
                      if (key.equals("")||key.equals("Search Opportunity")){
                          Toast.makeText(getActivity(),"Enter a valid keyword",Toast.LENGTH_SHORT).show();
                      }else {
                          CentralSearchFragment centralSearchFragment = new CentralSearchFragment();
                          Bundle args = new Bundle();

                          args.putString("Keyword", searchBox.getText().toString());
                          searchBox.getText().clear();

                          centralSearchFragment.setArguments(args);
                          android.support.v4.app.FragmentManager fragmentManager = ((getActivity().getSupportFragmentManager()));
                          FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
                          fragmentTransaction.add(R.id.content_frame, centralSearchFragment);
                          fragmentTransaction.addToBackStack(centralSearchFragment.getClass().getName());
                          fragmentTransaction.commit();
                      }


                  }
              });

              walkinList = new ArrayList<>();

              new getWalkin().execute();


                      return view;
          }

          private void showGPSDisabledAlertToUser(){
              AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
              alertDialogBuilder.setMessage("GPS is disabled in your device. Click 'Send Location' after enabling GPS")
                      .setCancelable(false)
                      .setPositiveButton("Enable GPS",
                              new DialogInterface.OnClickListener(){
                                  public void onClick(DialogInterface dialog, int id){
                                      Intent callGPSSettingIntent = new Intent(
                                              android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                                      startActivity(callGPSSettingIntent);
                                  }
                              });
              alertDialogBuilder.setNegativeButton("Cancel",
                      new DialogInterface.OnClickListener(){
                          public void onClick(DialogInterface dialog, int id){
                              dialog.cancel();
                          }
                      });
              AlertDialog alert = alertDialogBuilder.create();
              alert.show();
          }

          @Override
          public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
              inflater.inflate(R.menu.dash_menu, menu);
              super.onCreateOptionsMenu(menu,inflater);
          }

          @Override
          public boolean onOptionsItemSelected(MenuItem item) {
              switch (item.getItemId()) {
                  case R.id.main_profile:
                      getActivity().getSupportFragmentManager().beginTransaction()
                              .replace(R.id.content_frame, new MyProfileFragment())
                              .addToBackStack(null)
                              .commit();

                      break;

              }
              return super.onOptionsItemSelected(item);
          }

          private boolean isLocationAllowed() {
              int result = 0;
              if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
                  result = ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION);
              }

              return result == PackageManager.PERMISSION_GRANTED;

          }

          @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
          public boolean checkPermission() {
              int currentAPIVersion = Build.VERSION.SDK_INT;
              if (currentAPIVersion >= android.os.Build.VERSION_CODES.M) {
                  int result;
                  listPermissionsNeeded = new ArrayList<>();

                  for (String p : PERMISSIONS) {

                      result = ContextCompat.checkSelfPermission(getActivity(), p);
                      if (result != PackageManager.PERMISSION_GRANTED) {
                          listPermissionsNeeded.add(p);
                      }
                  }

                  if (!listPermissionsNeeded.isEmpty()) {

                      if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), listPermissionsNeeded.get(0))) {
                          AlertDialog.Builder alertBuilder = new AlertDialog.Builder(getActivity());
                          alertBuilder.setCancelable(true);
                          alertBuilder.setTitle("Permission necessary");
                          alertBuilder.setMessage("Permissions Required to Access Your Location");
                          alertBuilder.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
                              @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
                              public void onClick(DialogInterface dialog, int which) {
                                  ActivityCompat.requestPermissions(getActivity(), listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MULTIPLE_PERMISSIONS);
                              }
                          });
                          AlertDialog alert = alertBuilder.create();
                          alert.show();
                      } else {
                          ActivityCompat.requestPermissions(getActivity(), listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MULTIPLE_PERMISSIONS);
                      }
                      return false;
                  } else {
                      progressDialog = ProgressDialog.show(getActivity(), "", "Uploading files to server.....", false);
                      GPSTracker gps = new GPSTracker(getActivity());
                      double latitude = gps.getLatitude();
                      double longitude= gps.getLongitude();

                      String lat= String.valueOf(latitude);
                      String lon=String.valueOf(longitude);

                      if (!lat.equals("0.0")|| !lon.equals("0.0")){
                          Toast.makeText(getContext(),"Sending your location...",Toast.LENGTH_SHORT).show();
                          new sendLoc().execute();
                      }else {
                          progressDialog.dismiss();
                          Toast.makeText(getContext(),"Please try again",Toast.LENGTH_SHORT).show();
                      }

                      return true;
                  }

              } else {
                  progressDialog = ProgressDialog.show(getActivity(), "", "Sending your location...", false);
                  GPSTracker gps = new GPSTracker(getActivity());
                  double latitude = gps.getLatitude();
                  double longitude= gps.getLongitude();

                  String lat= String.valueOf(latitude);
                  String lon=String.valueOf(longitude);

                  if (!lat.equals("0.0")|| !lon.equals("0.0")){

                      Toast.makeText(getContext(),"Sending your location...",Toast.LENGTH_SHORT).show();
                  }else {
                      progressDialog.dismiss();
                      Toast.makeText(getContext(),"Please try again",Toast.LENGTH_SHORT).show();
                  }

                  return true;
              }
          }

          private class getWalkin extends AsyncTask <Void, Void, String> {
              protected String getASCIIContentFromEntity(HttpEntity entity) throws IllegalStateException, IOException {
                  InputStream in = entity.getContent();


                  StringBuffer out = new StringBuffer();
                  int n = 1;
                  while (n>0) {
                      byte[] b = new byte[4096];
                      n = in.read(b);


                      if (n>0) out.append(new String(b, 0, n));
                  }


                  return out.toString();
              }


              @Override


              protected String doInBackground(Void... params) {
                  HttpClient httpClient = new DefaultHttpClient();
                  HttpContext localContext = new BasicHttpContext();
                  HttpGet httpGet = new HttpGet(WALK_IN_API);
                  String text = null;
                  try {
                      HttpResponse response = httpClient.execute(httpGet, localContext);


                      HttpEntity entity = response.getEntity();


                      text = getASCIIContentFromEntity(entity);


                  } catch (Exception e) {
                      return e.getLocalizedMessage();
                  }


                  return text;
              }


              protected void onPostExecute(String results) {
                  if (results!=null) {


                          try {

                              JSONArray jArray = new JSONArray(results);

                              // Extract data from json and store into ArrayList as class objects
                              for (int i = 0; i < jArray.length(); i++) {
                                  JSONObject json_data = jArray.getJSONObject(i);
                                  Walkin walkin = new Walkin();
                                  String id = json_data.getString("id");
                                  String location = json_data.getString("location");
                                  String skill = json_data.getString("skills");
                                  String startTime = json_data.getString("walkin_s_time");
                                  String endTime = json_data.getString("walkin_e_time");
                                  String startDate = json_data.getString("walkin_s_date");
                                  String endDate = json_data.getString("walkin_e_date");
                                  String minExp = json_data.getString("walkin_s_exp");
                                  String maxExp = json_data.getString("walkin_l_exp");

                                  walkin.setId(id);
                                  walkin.setLocation(location);
                                  walkin.setSkills(skill);
                                  walkin.setWalkin_s_time(startTime);
                                  walkin.setWalkin_e_time(endTime);
                                  walkin.setWalkin_s_date(startDate);
                                  walkin.setWalkin_e_date(endDate);
                                  walkin.setWalkin_s_exp(minExp);
                                  walkin.setWalkin_l_exp(maxExp);

                                  walkinList.add(walkin);
                              }

                              // Setup and Handover data to recyclerview

                              walkinAdapter = new WalkinAdapter(walkinList, getActivity());
                              rv_walkins.setAdapter(walkinAdapter);

                              final Handler handler = new Handler();
                              final Runnable runnable = new Runnable() {
                                  int count = 0;
                                  boolean flag = true;
                                  @Override
                                  public void run() {
                                      if(count < walkinAdapter.getItemCount()){
                                          if(count==walkinAdapter.getItemCount()-1){
                                              flag = false;
                                          }else if(count == 0){
                                              flag = true;
                                          }
                                          if(flag) count++;
                                          else count--;

                                          rv_walkins.smoothScrollToPosition(count);
                                          handler.postDelayed(this,speedScroll);
                                      }else {
                                          Toast.makeText(getActivity(),"No Walkins",Toast.LENGTH_SHORT).show();
                                      }
                                  }
                              };

                              handler.postDelayed(runnable,speedScroll);


                              LinearSnapHelper snapHelper = new LinearSnapHelper() {
                                  @Override
                                  public int findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY) {
                                      View centerView = findSnapView(layoutManager);
                                      if (centerView == null)
                                          return RecyclerView.NO_POSITION;

                                      int position = layoutManager.getPosition(centerView);
                                      int targetPosition = -1;
                                      if (layoutManager.canScrollHorizontally()) {
                                          if (velocityX < 0) {
                                              targetPosition = position - 1;
                                          } else {
                                              targetPosition = position + 1;
                                          }
                                      }

                                      if (layoutManager.canScrollVertically()) {
                                          if (velocityY < 0) {
                                              targetPosition = position - 1;
                                          } else {
                                              targetPosition = position + 1;
                                          }
                                      }

                                      final int firstItem = 0;
                                      final int lastItem = layoutManager.getItemCount() - 1;
                                      targetPosition = Math.min(lastItem, Math.max(targetPosition, firstItem));
                                      return targetPosition;
                                  }
                              };
                              snapHelper.attachToRecyclerView(rv_walkins);


                          } catch (JSONException e) {
                              Toast.makeText(getActivity(), e.toString(), Toast.LENGTH_LONG).show();
                          }


                  }else {
                      noWalkins.setVisibility(View.VISIBLE);
                  }

              }

          }


          @Override
          public void onResume() {
              super.onResume();
              getActivity().setTitle("J2W Home");
          }


          public class sendLoc extends AsyncTask<String, String, String> {

              protected void onPreExecute()
              {
                  super.onPreExecute();

              }

              @Override
              protected String doInBackground(String... strings) {
                  try {
                      HttpClient client = new DefaultHttpClient();
                      String postURL = SEND_LOC_API;
                      HttpPost post = new HttpPost(postURL);
                      List<NameValuePair> params = new ArrayList<NameValuePair>();
                      params.add(new BasicNameValuePair("lat",lat));
                      params.add(new BasicNameValuePair("lon", lon));
                      UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params, HTTP.UTF_8);
                      post.setEntity(ent);
                      HttpResponse responsePOST = client.execute(post);
                      resEntity = responsePOST.getEntity();
                      responseStr= EntityUtils.toString(resEntity);
                      if (resEntity != null) {
                      }
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
                  return null;
              }

              @Override
              protected void onPostExecute(String s)
              {
                  super.onPostExecute(s);

                  if(responseStr!=null)
                  {

                      try {
                          JSONObject result = new JSONObject(responseStr);

                          String status=result.getString("status");

                          if (status.equals("1")){
                              progressDialog.dismiss();
                              Toast.makeText(getContext(),"Location Sent",Toast.LENGTH_SHORT).show();
                          }else{
                              progressDialog.dismiss();
                              Toast.makeText(getContext(),"Failed!! Please try again...",Toast.LENGTH_SHORT).show();
                          }

                      } catch (JSONException e) {
                          e.printStackTrace();
                      }


                  }
              }

          }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Just Restart the system and this bug will not occur for few hours

        Attachments

          Activity

            People

            • Assignee:
              fmatte Fairoz Matte
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: