Menu

#455 nsisdl::download crash on cancel

2.0 Series
closed-invalid
Plugin (101)
5
2006-03-14
2006-02-17
Anonymous
No

reporter: Chris Peterson
email: chpe@amazon.com

I have found an intermittent crash when canceling
nsisdl::download. I can reproduce this very easily. My
installer tries to download Microsoft's .NET Framework
1.1 setup and, if the user cancels, asks them if they
would like to try again. If I quickly click cancel and
retry about 5-10 times, my installer will crash.

I created an isolated test case that shows the problems
seems to be related to calling MessageBox after
nsidl::download. Looping around nsidl::download and
MessageBox crashes. Looping around just nsidl::download
does NOT crash. Loop around just MessageBox does NOT
crash. This implies nsidl::download and MessageBox are
somehow working together to crash?

The crash is not a regular ol' bad pointer crash. It's
a "Data Execution Prevention" crash. I'm using Windows
XP SP2 with "DEP". This implies that nsisdl::download
or MessageBox did something naughty to the stack.

I found some old threads (from 2003 and 2004) on this
forum about nsisdl::download crashing behind firewalls
or on cancel, but those threads claimed those bugs got
fixed. I'm using NSIS 2.14.

Function MessageBoxAndDownloadLoop_CRASHES
  nsidl_download:
    nsisdl::download \      
"http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe"
\       "$PLUGINSDIR\dotnetfx.exe"
    MessageBox MB_OK "Try again!"
  goto nsidl_download ; try again!
FunctionEnd

Function DownloadLoop_DOESNT_CRASH
  nsidl_download:
    nsisdl::download \      
"http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe"
\       "$PLUGINSDIR\dotnetfx.exe"
  goto nsidl_download ; try again!
FunctionEnd

Function MessageBoxLoop_DOESNT_CRASH
  nsidl_download:
    MessageBox MB_OK "Try again!"
  goto nsidl_download ; try again!
FunctionEnd

Discussion

  • Nobody/Anonymous

    Logged In: NO

    oops, here is the test code without the nbsp codes:

    Function MessageBoxAndDownloadLoop_CRASHES
    nsidl_download:
    nsisdl::download \

    "http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe"
    \ "$PLUGINSDIR\dotnetfx.exe"
    MessageBox MB_OK "Try again!"
    goto nsidl_download ; try again!
    FunctionEnd

    Function MessageBoxLoop_DOESNT_CRASH
    nsidl_download:
    MessageBox MB_OK "Try again!"
    goto nsidl_download ; try again!
    FunctionEnd

    Function DownloadLoop_DOESNT_CRASH
    nsidl_download:
    nsisdl::download \

    "http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe"
    \ "$PLUGINSDIR\dotnetfx.exe"
    goto nsidl_download ; try again!
    FunctionEnd

     
  • Amir Szekely

    Amir Szekely - 2006-02-24

    Logged In: YES
    user_id=584402

    I can't reproduce this. Please include a more detailed crash
    report including the exact version of NSIS you took
    nsisdl.dll from and the offsets shown in the crash dialog.

     
  • Amir Szekely

    Amir Szekely - 2006-02-24
    • assigned_to: nobody --> kichik
     
  • Nobody/Anonymous

    Logged In: NO

    Strange, I am no longer able to reproduce this crash. Two
    weeks ago, I could reproduce it every time I ran my
    installer. I must have changed something on my computer.

    Sorry for the wild goose chase, Amir! Thanks for your help!

     
  • Amir Szekely

    Amir Szekely - 2006-03-14
    • status: open --> closed-invalid
     
  • Amir Szekely

    Amir Szekely - 2006-03-14

    Logged In: YES
    user_id=584402

    Please let me know if you are able to reproduce it again.

     

Log in to post a comment.

Oh no! Some styles failed to load. 😵 Please try reloading this page