From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: dandan.bi@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Tue, 23 Apr 2019 00:00:50 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 00:00:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,384,1549958400"; d="scan'208";a="225843110" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.147]) by orsmga001.jf.intel.com with ESMTP; 23 Apr 2019 00:00:48 -0700 From: "Dandan Bi" To: devel@edk2.groups.io Cc: Liming Gao , Eric Dong , Hao Wu , Ruiyu Ni Subject: [patch 0/2] Fix Emulator ASSERT issue when re-enter setup Date: Tue, 23 Apr 2019 15:00:37 +0800 Message-Id: <20190423070039.29160-1-dandan.bi@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728 Currently Emulator meets ASSERT when enter setup->Continue->enter setup. When re-enter setup, in the Constructor functions of some Libs linked by UiApp, the handle is not NULL which cause InstallMultipleProtocolInterfaces failure then ASSERT. So here set handle to NULL after uninstalling protocols on it in Libs Destructor function to avoid this issue. Cc: Liming Gao Cc: Eric Dong Cc: Hao Wu Cc: Ruiyu Ni Dandan Bi (2): MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c | 3 ++- MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.18.0.windows.1