Menu

#1297 An installer crashes

3.0 Series
open
nobody
None
5
2023-07-19
2023-07-19
sqdwr
No

When I used nsis to install, a crash occurred, but I still installed all the functions. According to the analysis dump, it was caused by the thread synchronization of global variables. The scene is as follows:

  1. Main thread: ExecuteCodeSegment (will be called frequently) -> ExecuteEntry (g_parms will be changed here) -> GetStringFromParm (g_parms will be taken here) -> GetNSISString
  2. Crashed new thread creation chain: call NotifyCurWnd (WM_NOTIFY_START) through the function ui_doinstall to send a message to the main interface (SelProc window routine) -> create a thread (execute function install_thread) -> internally execute ExecuteCodeSegment

The abnormal value of g_parms in the function GetNSISString caused this Crash, and it did not reproduce after many tests.

Discussion

  • Jason

    Jason - 2023-07-19
     
  • Anders

    Anders - 2023-07-19

    What is the order of the pages in the installer that crashes? Can you attach an example?

    SelProc (components page) is not supposed to have multiple threads. The instfiles page is the only place where a thread is created unless a plug-in is involved.

     

Log in to post a comment.

MongoDB Logo MongoDB