Age | Commit message (Collapse) | Author |
|
(cherry picked from commit 1faa76848158e160207fa65a18fc0ff462799c4b)
|
|
One of the changes in macios revealed a bug in which @new can be null
resulting in a NRE like the one that follows:
System.NullReferenceException: Object reference not set to an instance of an object
2022-01-26T09:23:11.9538790Z at Mono.ApiTools.MarkdownFormatter.DiffModification (System.Text.StringBuilder output, System.String old, System.String new, System.Boolean breaking) [0x00013] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/MarkdownFormatter.cs:181
2022-01-26T09:23:11.9543530Z at Mono.ApiTools.ApiChange.AppendModified (System.String old, System.String new, System.Boolean breaking) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ApiChange.cs:49
2022-01-26T09:23:11.9547700Z at Mono.ApiTools.FieldComparer.Equals (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target, Mono.ApiTools.ApiChanges changes) [0x0008c] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/FieldComparer.cs:123
2022-01-26T09:23:11.9551430Z at Mono.ApiTools.MemberComparer.Compare (System.Collections.Generic.IEnumerable`1[T] source, System.Collections.Generic.IEnumerable`1[T] target) [0x00053] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/MemberComparer.cs:111
2022-01-26T09:23:11.9554840Z at Mono.ApiTools.MemberComparer.Compare (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target) [0x00064] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/MemberComparer.cs:66
2022-01-26T09:23:11.9558230Z at Mono.ApiTools.ClassComparer.Modified (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target, Mono.ApiTools.ApiChanges diff) [0x00172] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ClassComparer.cs:238
2022-01-26T09:23:11.9562840Z at Mono.ApiTools.Comparer.Compare (System.Collections.Generic.IEnumerable`1[T] source, System.Collections.Generic.IEnumerable`1[T] target) [0x00084] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/Comparer.cs:94
2022-01-26T09:23:11.9566810Z at Mono.ApiTools.ClassComparer.Compare (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target) [0x0002c] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ClassComparer.cs:68
2022-01-26T09:23:11.9570610Z at Mono.ApiTools.NamespaceComparer.Modified (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target, Mono.ApiTools.ApiChanges differences) [0x00017] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/NamespaceComparer.cs:79
2022-01-26T09:23:11.9574480Z at Mono.ApiTools.Comparer.Compare (System.Collections.Generic.IEnumerable`1[T] source, System.Collections.Generic.IEnumerable`1[T] target) [0x00084] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/Comparer.cs:94
2022-01-26T09:23:11.9578000Z at Mono.ApiTools.NamespaceComparer.Compare (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target) [0x0002c] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/NamespaceComparer.cs:51
2022-01-26T09:23:11.9581650Z at Mono.ApiTools.AssemblyComparer.Modified (System.Xml.Linq.XElement source, System.Xml.Linq.XElement target, Mono.ApiTools.ApiChanges diff) [0x00055] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/AssemblyComparer.cs:89
2022-01-26T09:23:11.9586220Z at Mono.ApiTools.Comparer.Compare (System.Collections.Generic.IEnumerable`1[T] source, System.Collections.Generic.IEnumerable`1[T] target) [0x00084] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/Comparer.cs:94
2022-01-26T09:23:11.9589520Z at Mono.ApiTools.AssemblyComparer.Compare () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/AssemblyComparer.cs:63
2022-01-26T09:23:11.9592880Z at Mono.ApiTools.ApiDiffFormatted.Generate (Mono.ApiTools.AssemblyComparer ac, System.IO.TextWriter outStream, Mono.ApiTools.State state) [0x00013] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ApiDiff.cs:222
2022-01-26T09:23:11.9596490Z at Mono.ApiTools.ApiDiffFormatted.Generate (System.String firstInfo, System.String secondInfo, System.IO.TextWriter outStream, Mono.ApiTools.State state) [0x00008] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ApiDiff.cs:208
2022-01-26T09:23:11.9600250Z at Mono.ApiTools.ApiDiffFormatted.Generate (System.String firstInfo, System.String secondInfo, System.IO.TextWriter outStream, Mono.ApiTools.ApiDiffFormattedConfig config) [0x00007] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ApiDiff.cs:202
2022-01-26T09:23:11.9603590Z at Mono.ApiTools.Program.Main (System.String[] args) [0x002f9] in /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mcs/tools/mono-api-html/ApiDiff.cs:159
The change that exposed the bug is: https://github.com/xamarin/xamarin-macios/commit/d78aa6712b15659b0fed259952364c060ffedcea
The above exception is avoided by ensuring that nor old or @new are
null.
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
|
|
disable Ping tests
|
|
It is documented that the inherit flag is ignored.
Attribute.GetCustomAttributes is to be used to search
inheritance chain.
This change is only for the Mono classlib implementation.
CoreCLR already has this behavior.
Co-authored-by: Bill Holmes <bill.holmes@unity3d.com>
|
|
In some cases, it seems like Mono.Profiler.Aot `ProfileWriter` can produce custom profiles that are unable to be read by `ProfileReader` (or `aot-compiler.c`). There are a few reports [here](https://github.com/xamarin/xamarin-android/issues/4602#issuecomment-618201419).
I investigated and found a cause may be the writing of incorrect string length markers in situations where `String.Length` is less than the encoded byte length. In that kind of case, the reader falls out of sync with the record structure and quickly fails. [Here is an example dependency](https://www.fuget.org/packages/AuroraControls.Core/1.2020.520.2/lib/netstandard2.0/Aurora.dll) with members that can produce the issue (I guess the odd characters are caused by obfuscation).
![image](https://user-images.githubusercontent.com/7392704/129899400-086a6e8a-373c-4601-837a-5255e7f93d82.png)
I don't think the change requires a profile format version bump, as the format itself is unchanged.
Co-authored-by: Ryan Davis <ryandavis.au@gmail.com>
|
|
* [System.Native] Handle ReadDir EINTR
Handle EINTR for opendir/readdir/closedir.
Because of how thread aborts work, we must loop in managed.
A thread abort will break syscalls and return EINTR, but mono will not raise a
ThreadAbortException until a pinvoke returns.
(Despite the documentation, opendir/readdir/closedir sometimes return EINTR on
macOS Big Sur.)
Related to https://github.com/mono/mono/issues/20799
* bump corefx
* [System] on unix, include Interop.ReadDir.Mono.cs
on mac it's in corlib, on unix and android it's in System, for some reason
* Add newline
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
|
|
https://github.com/mono/mono/issues/20948
|
|
See https://github.com/mono/mono/issues/20905
(cherry picked from commit 7eb63051a8b49d9174dd65a319b6b08f98385ad9)
|
|
(#20828)
* [System.Drawing] Work around libgdiplus Metafile dispose ordering
* Bump API snapshot submodule
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
GetByteCount will not return the right number of bytes needed, so GetBytes in Encoder.Convert will crash for some input
Backport of #20271.
Co-authored-by: jeffgoku <jeffreygoku@gmail.com>
|
|
* [test] Abort a thread doing a long-running Array.Sort
The custom comparer is wrapped in a try/finally. Verify that it doesn't turn
thread abort exceptions into some other exception.
Regression test for https://github.com/mono/mono/issues/15418
* Bump corert
To pick up fix for mono/mono#15418
* disable new test on platforms without Thread.Abort
|
|
Co-authored-by: Joseph Shields <directhex@apebox.org>
|
|
Context: https://source.android.com/devices/architecture/modular-system/runtime#time-zone-data-interactions
Context: https://source.android.com/devices/tech/config/timezone-rules#timezone-apex
Maybe Fixes: https://github.com/xamarin/xamarin-android/issues/5080
Add support to read ICANN timezone data from two new locations found on
devices running Android 10+. The data in the previously searched
location still exists but it's most likely out of date.
On Android 10+ tzdata updates will be derived via an APEX TimeData
package update, whose data directory this commit sets as the first
location to be searched.
This commit potentially fixes the Xamarin.Android issue mentioned above.
"Potentially" because I can't be sure this is what's causing it since
I'm unable to reproduce the issue locally. However, out-of-date tz
database seems to be the most probable cause.
Co-authored-by: Marek Habersack <grendel@twistedcode.net>
|
|
(#19978)
* [merp] Add API methods for getting hashcode/reason of last crash
* Add test
* Review feedback and cleanup
Co-authored-by: Alexis Christoforides <alexis@thenull.net>
|
|
(#19813)
As-is, a tarball created in Roslyn mode is missing the file charinfo.nlp, which mcs needs to build the classlib.
Backport of #19807.
|
|
Fixed #10435
HttpListener already closes the Response object, closes the HTTP Client connection, and then sets the value of Response.StatusCode again. If so, an ObjectDisposedException is thrown.
```
Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListenerResponse'.
at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0
at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0
at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListenerResponse'.
at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0
at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0
at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0
```
If an error is sent to the HTTP client while processing a request, it is patched so that the next process is not executed anymore.
Backport of #19664.
|
|
error (#19640)
Backport of #19620.
|
|
implementation (#19437) (#19477)
As suggested by jbevain we should bump the protocol to implement this. (#19437)
Backport https://github.com/mono/mono/pull/19437/
|
|
SslStream (#19476)
* Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream and underlying implementation. Unlike the default implementation in Stream it allows parallel read along with parallel write using the standard TaskToApm pattern (https://github.com/dotnet/runtime/issues/33447). This reverts part of https://github.com/mono/mono/pull/17393 which could lead to deadlocks as reported in https://github.com/mono/mono/issues/18865.
* Move the TaskToApm pattern from MobileAuthenticatedStream to SslStream
* Bump API snapshot submodule
Co-authored-by: Filip Navara <filip.navara@gmail.com>
|
|
https://github.com/mono/mono/pull/19248 (#19318) (#19473)
* Bump protocol for this commit https://github.com/mono/mono/pull/19248 as suggested by @vargaz.
* Fix coding convention.
|
|
* Backporting this, and after this I will backport the bump protocol for this PR.
* Bump API snapshot submodule
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
* [debugger] Implementing step through multithreaded code.
Backport #19103
* Bump API snapshot submodule
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
debugger-libs we want to resume the VM only when it's suspended, but we were sending the wrong suspend_policy in the case of EVENT_KIND_VM_START and mono is started with suspend=y. (#19330)
With this fix we can do this PR again: https://github.com/mono/debugger-libs/pull/264/
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/999375/
|
|
(#19164)
* [corlib] Suppress finalization of underlying console FileStreams
We already suppress the finalization of the CStreamReader and CStreamWriter,
but during shutdown, the underlying FileStream may be finalized which
invalidates its access field which can lead to a crash.
The issue is that during shutdown, the CStreamWriter and its underlying
FileStream might be finalized in arbitrary order, so if the FileStream is
finalized first, even though it doesn't own the safeHandle, the access check in
Write(byte[], int, int) will fail, despite the fact that the underlying call to
MonoIO.Write could have succeeded.
Addresses https://github.com/mono/mono/issues/19005
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
|
|
TaskContinuation (#19209)
* [corlib] Capture the ExceptionDispatchInfo when rethrowing from TaskContinuation
In `task.GetAwaiter().OnCompleted(action)` if `action` throws, the
`TaskContinuation.RunOrScheduleAction method will catch the exception and then
call `RuntimeAugments.ReportUnhandledException`. We must not simply throw the
exception again - in that case we will lose all the frames leading up to the
`catch` in `RunOrScheduleAction`. Instead use ExceptionDispatchInfo to
caputure the original throw.
Addresses https://github.com/mono/mono/issues/19166
* [test] Add regression test
For annoying reasons we can't run this as a simple NUnit test because the
exception is unhandled on some arbitrary threadpool worker thread, and those
don't show up within an NUnit setup.
Additionally because the unhandled exception in the root domain would normally
terminate the application, we need to run this in a new appdomain.
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
|
|
inefficient code in some cases. (#19145)
* Avoid passing /features:peverify-compat to csc, it generates very inefficient code in some cases.
See https://github.com/mono/mono/issues/18572#issuecomment-595924767.
Fixes https://github.com/mono/mono/issues/18572.
* Disable the IL verifier for now, it can't handle code compiled without /features:peverify-compat.
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
|
|
Backport https://github.com/mono/mono/pull/18895
|
|
This is needed because the required='false' field in
```
<type fullname="System.Reflection.Emit.TypeBuilder" required='false' preserve="fields" feature="sre">
<method name="SetCharSet" feature="sre" />
<!-- reflection.c mono_reflection_call_is_assignable_to () -->
<method name="IsAssignableTo" feature="sre" />
```
Fails to preserve the IsAssignableTo method.
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
|
|
XA/LinkerTests.cs instead (#18955)
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
|
|
* [mcs] Default XmlSerializer stream serialize to UTF8 Encoding
* [bcl] Add XmlSerialize Test to preserve UTF chars in stream
|
|
* Make MonoWebRequestHandler linker friendly
* Make MonoWebRequestHandler's ctor public (to be able to use in Activator.CreateInstance without binding flags)
* Remove Console.WriteLine from system.net.http
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
|
|
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
|
|
* Bump linker submodule
* Use -o instead of -out for linker output
The arguments changed in linker.
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
|
|
(#18785)
* Bring back old HttpHandler for Android
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
|
|
* Bump linker.
* [csproj] Update project files
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
Follow-up to https://github.com/mono/mono/pull/18228 since two parts wasn't enough to fix the size issue on 32bits devices.
We now use three parts.
Fixes https://github.com/mono/mono/issues/18614
|
|
* Use memmove in Buffer.MemoryCopy
* add test case
|
|
Assume we have the following form `MyForm`:
```
using System;
using System.Drawing;
using System.Windows.Forms;
namespace test_TreeView
{
public class MyForm : Form
{
TreeView treeView = new TreeView()
public MyForm()
{
treeView.Nodes.Add("root node");
treeView.Nodes[0].Nodes.Add("first child node");
treeView.BackColor = Color.Gray;
treeView.LineColor = Color.Yellow;
treeView.DrawMode = TreeViewDrawMode.OwnerDrawText;
treeView.DrawNode += treeView_DrawNode;
Controls.Add(treeView);
}
private void treeView_DrawNode(object sender, DrawTreeNodeEventArgs e)
{
var brush = new SolidBrush(Color.FromArgb(100, 255, 0, 0));
e.Graphics.FillRectangle(brush, e.Bounds);
}
}
}
```
The displayed result is
![image](https://user-images.githubusercontent.com/12382656/73263417-92872980-41e1-11ea-8f7c-7cecbb376b60.png)
One can see couple drawing issues:
* White rectangles under each `TreeNode`.
* The area of custom drawing (red rectangles) is shifted with respect to this white rectangles.
Current PR proposes the fix of this issues.
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
* Fix Return handling. Ensure correct ClientSize.
When pressing Return / Enter, ensure any target button is both visible
and enabled.
In CreateHandle(), ensure the ClientSize is correct if set. If not,
update it to make it right. Suspend layout while changing it so that
child controls with anchors other than Top Left are not moved.
* Select active control. PerformLayout after updating for client size.
Select the active control with SendControlFocus to avoid upsetting what
is currently selected.
* Improve Form window decoration adjustment handling
Reverts the incorrect attempted fix contained in previous commits.
Basically, when a property is changed that affects window decorations,
ensure the client size stays the same.
* Use UpdateFormStyles on FormBorderStyle too.
|
|
When the user types a letter or digit, KeySearch looks for and selects
an item starting with that character. However, it should not if
SelectionMode is None.
|
|
* [WinForms] Make `ContextMenuStrip` behavior closer to the reference one
* Bump API snapshot submodule
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
|
|
I've implemented a heap of missing RTF and RichTextBox stuff, and also made some improvements or fixes to various aspects of it. I'm sorry this is so big...
To give an overview of the changes, here's a list:
- Removed the RTF Charcode / Charset handling that wasn't actually used, had a lot of missing functionality and was basically reimplementing character encoding handling, and replaced it with ensuring the correct character encoding is being used (changing when needed).
- Improved RTF handling of objects with object results (process the given object result). Sometimes pictures can be like this.
- Improved line wrapping and alignment
- Added or greatly improved support for:
- paragraph spacing
- line spacing
- paragraph indents (left, right, hanging)
- tabstops (left, centre, right, decimal)
- text background colour (like highlighting)
- superscript / subscript
- character offset (vertical)
- text visibility
- Significantly improved RichTextBox RTF generation
- Cache DPI, rather than doing `CreateGraphics()` every time it is needed
- A variety of other fixes and improvements, with a few I can think of relating to:
- caret position
- replacing text
- invalidation and drawing
- when tags are added or deleted
|
|
|
|
If one click on a `ComboBox` the caret does not appear. This is so because `document.PositionCaret` call hides the caret.
|
|
Current versions of the mono return a null pointer as address of the first
element for empty arrays, i.e.
fixed (byte* ptr = new byte[0]) Console.WriteLine (ptr == null);
will print "true". This causes a problem in the UnixEncoding class where it
triggers a check for null pointers. Fix this by allowing null pointers when
the number of elements is zero.
|
|
Whenever mono opens an X11 window, the application opens a tcp socket for controlling the (non-tcp)-connection to X11. This is bad practice, as a tcp socket is not needed.
This pull request cleans the logic, by replacing the tcp socket with a fifo. That way this loopback connection is not visible from outside the .NET application, and all logic surrounding it should remain unchanged.
|
|
The real change here is, in `XplatUIX11.SetWindowPos()`, simply moving the `SendMessage` call to the end instead of earlier. The problem with it earlier is that any change in bounds from any of the bounds-related events (OnLocationChanged / OnMove, OnSizeChanged / OnResize, OnLayout, OnClientSizeChanged) will be overridden. When `SendMessage` is called, `UpdateBounds` is run, and that raises those events as relevant. After those events finish, `SetWindowPos` continues with setting the size of the window to the value originally specified – which is now potentially wrong. So send the message later on.
There is also no point that I can see in writing the values to `hwnd` twice, because as far as I can see the only one that can be changed is `hwnd.ClientRect` (set by `PerformNCCalc`).
|
|
when it is not enabled and visible. (#18541)
Fixes #18506
|
|
* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.
Fixes #18191
Fixes #15612
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
|
|
* Contributing: fix typos
* fixed encoding and other typos
* fixed encoding and spotted other typos
* Update TransformationRules.cs
|