EXCEPTION_ACCESS_VIOLATION in g_clear_pointer
On windows 7, I got a EXCEPTION_ACCESS_VIOLATION when calling g_app_info_get_all, which finally calls g_clear_pointer, stack-traces follow below.
- distribution: MSYS2/MinGW-w64
- When compiled with '-Og' instead of '-O2', the error does not occur.
- Introduced/triggered in 2.58.0 and newer, 2.57.x works fine.
The error is triggered in via a JNI module (SWT-GTK on Windows), relevant stack-traces from JVM and gdb:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007742a365, pid=2480, tid=7520
#
# JRE version: OpenJDK Runtime Environment (9.0+11) (build 9.0.4+11)
# Java VM: OpenJDK 64-Bit Server VM (9.0.4+11, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C [ntdll.dll+0x2a365]
#
# No core dump will be written. 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
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- S U M M A R Y ------------
Command Line: -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Xms40m -Xmx512m --add-modules=ALL-SYSTEM -Djava.net.preferIPv4Stack=true C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\\plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar -os win32 -ws gtk -arch x86_64 -showsplash -launcher C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\eclipse_gtkc.exe -name Eclipse --launcher.library C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\\plugins/org.eclipse.equinox.launcher.gtk.win32.x86_64_1.1.900.v20180922-1751\eclipse_1801.dll -startup C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\\plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar --launcher.appendVmargs -exitdata 38dc_54 -vm C:/Localdata/Java/jdk-9.0.4/bin\java.exe -vmargs -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Xms40m -Xmx512m --add-modules=ALL-SYSTEM -jar C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\\plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar
Host: Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz, 8 cores, 31G, Windows 7 , 64 bit Build 7601 (6.1.7601.24291)
Time: Fri Jan 04 18:09:50 2019 W. Europe Standard Time elapsed time: 4 seconds (0d 0h 0m 4s)
--------------- T H R E A D ---------------
Current thread (0x0000000000308000): JavaThread "main" [_thread_in_native, id=7520, stack(0x0000000002740000,0x0000000002840000)]
Stack: [0x0000000002740000,0x0000000002840000], sp=0x0000000002837970, free space=990k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x2a365]
C [msvcrt.dll+0x10c8]
C [libgio-2.0-0.dll+0x7220b]
C [libgio-2.0-0.dll+0x75243]
C [libgio-2.0-0.dll+0x7877a]
C [libgio-2.0-0.dll+0x7937e]
C [swt-pi3-gtk-4924r7.dll+0xfed5]
C 0x0000000010f77fb5
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.eclipse.swt.internal.gtk.OS._g_app_info_get_all()J+0
j org.eclipse.swt.internal.gtk.OS.g_app_info_get_all()J+7
j org.eclipse.swt.program.Program.getPrograms(Lorg/eclipse/swt/widgets/Display;)[Lorg/eclipse/swt/program/Program;+0
j org.eclipse.swt.program.Program.getPrograms()[Lorg/eclipse/swt/program/Program;+3
#0 0x00000000774698ca in ntdll!ZwWaitForSingleObject ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#1 0x000007fefd2910ac in WaitForSingleObjectEx ()
from C:\WINDOWS\system32\KernelBase.dll
#2 0x0000000007a1b3e4 in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#3 0x0000000007b316cf in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#4 0x0000000007b30de5 in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#5 0x0000000007b317db in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#6 0x0000000007a1fd96 in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#7 0x0000000007a20168 in jvm!?c2v_getSymbol@@YAPEAV_jobject@@PEAUJNIEnv_@@PEAV1
@_J@Z () from C:\Localdata\Java\jdk-9.0.4\bin\server\jvm.dll
#8 0x000000007746bf7d in ntdll!.chkstk () from C:\WINDOWS\SYSTEM32\ntdll.dll
#9 0x000000007744043a in ntdll!RtlInitializeResource ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#10 0x000000007746b61e in ntdll!KiUserExceptionDispatcher ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#11 0x000000007742a365 in ntdll!RtlFreeHeap ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#12 0x000007feff5e10c8 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
#13 0x000000006301220b in collect_capable_apps_from_clients (
capable_apps=capable_apps@entry=0x65114740,
priority_capable_apps=priority_capable_apps@entry=0x65115ea0,
user_registry=user_registry@entry=0)
at ../glib-2.58.2/gio/gwin32appinfo.c:1526
#14 0x0000000063015243 in update_registry_data ()
at ../glib-2.58.2/gio/gwin32appinfo.c:3217
#15 0x000000006301877a in g_win32_appinfo_init ()
at ../glib-2.58.2/gio/gwin32appinfo.c:3416
#16 0x000000006301937e in g_app_info_get_all ()
at ../glib-2.58.2/gio/gwin32appinfo.c:4574
#17 0x0000000005e7fed5 in swt-pi3-gtk-4924r7!Java_org_eclipse_swt_internal_gtk_OS__1g_1app_1info_1get_1all ()
from C:\Localdata\Eclipse\eclipse_4.10RC2full\eclipse\configuration\org.eclipse.osgi\164\0\.cp\swt-pi3-gtk-4924r7.dll
#18 0x00000000105c797f in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Edited by Ghost User