[Mono-bugs] [Bug 729275] New: ProgressBar: Updating progressbar control crashes app

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 9 11:45:43 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=729275

https://bugzilla.novell.com/show_bug.cgi?id=729275#c0


           Summary: ProgressBar: Updating progressbar control crashes app
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: nelson.novell at nelfer.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101
Firefox/7.0.1

Application: Download a file from a server
Compiled: Mono 2.6.7 as .Net 3.5
Running on Ubuntu 11.04 64bits.

I have an app that downloads a file. I have an event handler attached to the
download progress. This event handler updates the progress bar. The application
works perfectly on a Windows environment (compiled with Mono or Visual Studio).
In Linux (compiled with Mono or Visual Studio) however, sometimes the
application crashes.

To update the progress bar I'm using this code to find the proper progress bar:

ProgressBar pb=(ProgressBar)Controls.Find("DownloadProgress",true)[0];

There are other progress bars in the form as well, for other tasks to be
performed after the download.



Reproducible: Sometimes

Steps to Reproduce:
1. Create a windows forms app with a progress bar
2. Create a method that will be update the progress bar value. This method will
be an event handler.
3. Use WebClient.DownloadProgressChanged to attach it to method in point 2.
4.Use WebClient.DownloadFileAsync to start process.
Actual Results:  
Application crashes sometimes with the following error:

Download Progress 36%
Download Progress 36%
System.ArgumentException: A null reference or invalid value was found [GDI+
status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename
unknown>:0 
  at System.Drawing.Region.Exclude (Rectangle rect) [0x00000] in <filename
unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Region:Exclude
(System.Drawing.Rectangle)
  at System.Windows.Forms.Control+DoubleBuffer.End
(System.Windows.Forms.PaintEventArgs pe) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
Download Progress 37%
Download Progress 38%

Expected Results:  
Progress Bar should go from 0 to 100 (empty to full) with no crash.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list