REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728
Currently Emulator meets ASSERT when enter setup->Continue->enter setup.
When re-enter setup, the FeDriverHandle in FileExplorerLib Constructor
is not NULL which cause InstallMultipleProtocolInterfaces failure,
then ASSERT. So here set FeDriverHandle to NULL after uninstalling
protocols on it in the Destructor function to avoid this issue.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
index 27f12fcbf9..58e4910259 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
@@ -1,9 +1,9 @@
/** @file
File explorer related functions.
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1641,10 +1641,11 @@ FileExplorerLibDestructor (
NULL
);
ASSERT_EFI_ERROR (Status);
HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
+ gFileExplorerPrivate.FeDriverHandle = NULL;
}
FreePool (gHiiVendorDevicePath);
return EFI_SUCCESS;
--
2.18.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#39397): https://edk2.groups.io/g/devel/message/39397
Mute This Topic: https://groups.io/mt/31306517/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Eric Dong <eric.dong@intel.com> > -----Original Message----- > From: Bi, Dandan > Sent: Tuesday, April 23, 2019 3:01 PM > To: devel@edk2.groups.io > Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>; > Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com> > Subject: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after > uninstall protocol > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728 > > Currently Emulator meets ASSERT when enter setup->Continue->enter > setup. > When re-enter setup, the FeDriverHandle in FileExplorerLib Constructor is > not NULL which cause InstallMultipleProtocolInterfaces failure, then ASSERT. > So here set FeDriverHandle to NULL after uninstalling protocols on it in the > Destructor function to avoid this issue. > > Cc: Liming Gao <liming.gao@intel.com> > Cc: Eric Dong <eric.dong@intel.com> > Cc: Hao Wu <hao.a.wu@intel.com> > Cc: Ruiyu Ni <ruiyu.ni@intel.com> > Signed-off-by: Dandan Bi <dandan.bi@intel.com> > --- > MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > index 27f12fcbf9..58e4910259 100644 > --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > @@ -1,9 +1,9 @@ > /** @file > File explorer related functions. > > -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR> > +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR> > SPDX-License-Identifier: BSD-2-Clause-Patent > > **/ > > > @@ -1641,10 +1641,11 @@ FileExplorerLibDestructor ( > NULL > ); > ASSERT_EFI_ERROR (Status); > > HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle); > + gFileExplorerPrivate.FeDriverHandle = NULL; > } > > FreePool (gHiiVendorDevicePath); > > return EFI_SUCCESS; > -- > 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39533): https://edk2.groups.io/g/devel/message/39533 Mute This Topic: https://groups.io/mt/31306517/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.