balaji | 10 Feb 06:43
Picon
Favicon
Gravatar

Performance counters are not working under linux mono platform

Hi,

Does anyone know why Performance counters return zero value in the code
below when executing under linux mono platform.

                  (OR)

How to get a process performance counters like CPU,Memory,Thread
count,Handle Count and other resource utilization of a machine,when the
process is running in a remote machine?

 The code below works with MS Visual Studio under Windows but simply won't
work with Mono 2.10.5 under linux i.e performance counter values are
zero.why?

/* This uses remoting */
/ * Run this application in the remote machine where the actual
 * 
 */
#define DEBUG_PERFORMANCE

using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;

class Program
(Continue reading)

monoUser | 9 Feb 14:30
Picon
Gravatar

SSL Certificate Binding

Hello,

I want to bind a SSL certificate to a port.
I followed the steps below but even httpcfg tool says it is binded I can not
see any certificate on the web browser.

I basically follwed the tutorial
http://joshua.perina.com/geo/post/using-ssl-https-with-mono-httplistener

I created a certificate 
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key
-out certificate.crt

then in windows I created a pvk file
pvk -in privateKey.key -topvk -nocrypt -out certificate.pvk

then I bind the certificate to port by using 
httpcfg -add -port 9920 -pvk certificate.pvk -cert certificate.crt

cert> httpcfg -list
Port: 9920 Thumbprint: B2878839D8E8E2F383BCC4532E0EC596EE4C59FB

I execcuted all the commands as a regular system user but when i try to
connect to the service I dont get any SSL warning

My HttpListener prefix looks like that

                m_HttpListener.Prefixes.Add(
                    string.Format("http://+:9920/")
                    );
(Continue reading)

CikaPero1 | 9 Feb 14:03
Picon
Gravatar

System.IO.Packaging throws NullReferenceExeption

Hi,

Does anyone know why the code below throws an exception?

The code below works with MS Visual Studio but simply won't work with Mono
2.8.

using System;
using System.IO;
using System.IO.Packaging;
using System.Text;
using System.Xml;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            using (Package Package = Package.Open("out.zip",
FileMode.Create))
            {
                Uri partUri = new Uri("/_rels/.rels", UriKind.Relative);
                PackagePart packagePart = Package.CreatePart(partUri,
"application/vnd.openxmlformats-package.relationships+xml");

                using (Stream str = packagePart.GetStream())
                {
                    using (var writer = new XmlTextWriter(str, new
UTF8Encoding(false)))
(Continue reading)

Anshya Aggarwal | 8 Feb 10:20
Picon
Gravatar

Mono[CoreCLR] security attributes in Platform assembly

Hi All,

I am building the mono with --with-moonlight=no, as per my knowledge mono dont have core-clr security attributes(safecritical/critical/transparent) 
enabled by default in mscorlib.dll or system.dll etc if moonlight flag is not enabled at compilation. So, I want to know that is there a way to have all
the security attributes in my assembly without enabling moonlight flag.


--
Regards,
Anshya

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Jeff Ward | 5 Feb 21:53
Gravatar

Problem cross compiling for windows

I'm attempting to build the trunk source for windows on an ubuntu system but I keep running into an error:


This is the command I'm running:
./build-mingw32.sh -d /usr/i586-mingw32msvc -m i586-mingw32msvc

And the error:
checking build system type... Invalid configuration `dist-bzip2': machine `dist' not recognized
configure: error: /bin/bash ../config.sub dist-bzip2 failed

Any idea how I can fix this?

--
Jeff
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Jeff Ward | 4 Feb 00:12
Gravatar

Embedded Mono debugging

I've been trying to get debugging working with my application that's using embedded mono with some trouble, but I think I'm on the last legs here.


Here's what I'm doing (basically)

const char* options[] = {
        "--soft-breakpoints",
        "--debugger-agent=transport=dt_socket,address=127.0.0.1:10000"
};
mono_jit_parse_options(2, (char**)options);

mono_set_dirs(lib.c_str(), config.c_str());
mono_config_parse(NULL);
mono_debug_init(MONO_DEBUG_FORMAT_MONO);
        
mMonoDomain = mono_jit_init_version("Ares", "v4.0.30319");
mono_debug_domain_create(mMonoDomain);

MonoAssembly* assembly = mono_domain_assembly_open(mMonoDomain, str.c_str());

MonoDevelop now connects fine, but the problem is when I hit a breakpoint or when I halt execution from within MonoDevelop, I get an access violation.  Why is that?  How do I get this to work.

As an asside, I am generating .mdbs.  I can't find how to redirect Mono's stderr to my output window (something else I'd love help with) so I have no idea if there are any errors loading debug info.

Thoughts?

--
Jeff
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
H . | 3 Feb 15:22
Picon
Gravatar

Re: FireFox not correctly detected as high level browser?


Hi Robert,

the problem seems to be very strange.

As I already reported I am using FireFox 10 on Windows 7/ 64 bit to access my Ubuntu machine running apache2 + mod_mono.

FireFox/ Ubuntu works without flaws whereas FireFox/ Windows 7 does not. In the next step I compared the generated
page source between the two test environments and realized that they are exactly the same!

The .aspx page loads 2 scripts starting with WebResouce.axd. When I click on such a link in FireFox/ Windows an empty page
is displayed. After clicking on View>Reload the script is finally displayed as expected. I have done these steps for both scripts.
If I then press F5 to reload my .aspx page, the menu bar is responding to mousover/mousout events but it still
shows the skip links.

I guess that something is wrong with mod_mono as well.


Martin


From: test051102 <at> hotmail.com
To: robertj <at> gmx.net
Subject: RE: [Mono-dev] FireFox not correctly detected as high level browser?
Date: Wed, 1 Feb 2012 10:59:04 +0000

.ExternalClass .ecxhmmessage P {padding:0px;} .ExternalClass body.ecxhmmessage {font-size:10pt;font-family:Tahoma;}

Hi Robert,

thanks for you explanation.

I checked the browscaps.ini in Mono 2.10.8. It does not support FireFox 4.0 or higher and FireFox running on Vista or 7 is also not supported. Furthermore, I can't see an entry with Ubuntu as the OS. This browscaps.ini file is totally outdated. It's unbelievable that the most widely used browser is not correctly detected by the current release version of Mono.

I updated my browscaps.ini file directly via garykeith.com. However, FireFox is still showing the described problems.


Martin



> To: mono-devel-list <at> lists.ximian.com
> From: robertj <at> gmx.net
> Date: Fri, 27 Jan 2012 15:53:58 +0100
> Subject: Re: [Mono-dev] FireFox not correctly detected as high level browser?
>
> On 27.01.2012 14:22, H . wrote:
> >
> > I guess that this version
> > of FireFox is somehow not always accepted as a high level browser. As
> > a result, the page is rendered in compatibility mode. There might be
> > a bug in the browser detection block inside the Mono class library.
> > This problem is very difficult to debug.
>
> You can always add new user agents to $monoprefix/etc/mono/browscap.ini.
> The user agent string of the offending browser can be found in
> Apache's log file.
>
> Robert
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list <at> lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Markku Tavasti | 3 Feb 14:42
Picon
Favicon
Gravatar

Moonlight crash with debugging

I'm trying to debug problems in moonlight. Unfortunately, debugging it is bit problematic

1) with MOONLIGHT_DEBUG I got plugin crash. Frotunately, I managed to find it:

diff --git a/src/value.cpp b/src/value.cpp
index 3117f24..eda014d 100644
--- a/src/value.cpp
+++ b/src/value.cpp
<at> <at> -74,7 +74,8 <at> <at> Value::CreateUnrefPtr (Uri *uri)
        result->SetKind (Type::URI);
        result->u.uri = uri;
        result->SetIsNull (false);
-       LOG_VALUE ("unref [delete] Value [%p] %s\n", result, result->GetName());
+       // This crashes plugin at applcation load
+       //LOG_VALUE ("unref [delete] Value [%p] %s\n", result, result->GetName());
        return result;
 }

2) Running with valgrind moonlight will crash when silverlight app is loaded. Crash will happen on same place:

==16548== Invalid read of size 4
==16548==    at 0xA903F78: ???
==16548==    by 0x8913680: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:620)
==16548==    by 0x891361D: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:609)
==16548==    by 0x89136AF: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*)) (animat
ion.cpp:574)
==16548==    by 0x8A856F6: _moonlight_cbinding_storyboard_flatten_timelines (cbinding.cpp:608
5)
==16548==    by 0x1A916219: ???
==16548==    by 0x1A9161C9: ???
==16548==    by 0x1A915855: ???
==16548==    by 0x1A9157D5: ???
==16548==    by 0x1A914D87: ???
==16548==    by 0x1A914147: ???
==16548==    by 0x1A906E6D: ???
==16548==  Address 0xffa14944 is not stack'd, malloc'd or (recently) free'd
==16548==
==16548== Invalid write of size 4
==16548==    at 0x8E231D4: mono_jit_info_table_find (domain.c:386)
==16548==    by 0x8CE9B2E: mono_sigsegv_signal_handler (mini.c:5840)
==16548==    by 0x406BB1F: ??? (in /lib/libpthread-2.11.1.so)
==16548==    by 0x8913680: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:620)
==16548==    by 0x891361D: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:609)
==16548==    by 0x89136AF: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*)) (animat
ion.cpp:574)
==16548==    by 0x8A856F6: _moonlight_cbinding_storyboard_flatten_timelines (cbinding.cpp:608
5)
==16548==    by 0x1A916219: ???
==16548==    by 0x1A9161C9: ???
==16548==    by 0x1A915855: ???
==16548==    by 0x1A9157D5: ???
==16548==    by 0x1A914D87: ???
==16548==  Address 0x7e7a00c is not stack'd, malloc'd or (recently) free'd
==16548==
==16548== Invalid write of size 4
==16548==    at 0x8E231DD: mono_jit_info_table_find (domain.c:387)
==16548==    by 0x8CE9B2E: mono_sigsegv_signal_handler (mini.c:5840)
==16548==    by 0x406BB1F: ??? (in /lib/libpthread-2.11.1.so)
==16548==    by 0x8913680: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:620)
==16548==    by 0x891361D: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:609)
==16548==    by 0x89136AF: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*)) (animat
ion.cpp:574)
==16548==    by 0x8A856F6: _moonlight_cbinding_storyboard_flatten_timelines (cbinding.cpp:608
5)
==16548==    by 0x1A916219: ???
==16548==    by 0x1A9161C9: ???
==16548==    by 0x1A915855: ???
==16548==    by 0x1A9157D5: ???
==16548==    by 0x1A914D87: ???
==16548==  Address 0x7e7a010 is not stack'd, malloc'd or (recently) free'd
==16548==
==16548== Thread 2 return signal frame corrupted.  Killing process.
==16548==
==16548== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==16548==  General Protection Fault
==16548==    at 0x406BB25: ??? (in /lib/libpthread-2.11.1.so)
==16548==    by 0x8913680: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:620)
==16548==    by 0x891361D: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*), Moonlig
ht::Timeline*, Moonlight::DependencyObject*, Moonlight::PropertyPath*) (animation.cpp:609)
==16548==    by 0x89136AF: Moonlight::Storyboard::FlattenTimelines(void (*)(Moonlight::Timeli
ne const*, Moonlight::DependencyObject const*, Moonlight::DependencyProperty const*)) (animat
ion.cpp:574)
==16548==    by 0x8A856F6: _moonlight_cbinding_storyboard_flatten_timelines (cbinding.cpp:608
5)
==16548==    by 0x1A916219: ???




_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Markku Tavasti | 3 Feb 12:46
Picon
Favicon
Gravatar

Bad performance of custom grid control under moonlight

We have application, which uses custom controls made by third party. On windows platform these controls perform ok, but moonlight performance is bad. Problem is in custom gridview which has suport for 'multiline' rows.

Problems we have:

1) performance. more lines the grid has, slower it gets. With 100-200 lines it will be totally unusable.

2) memory consumption, grid consumes a lot of memory


Error messages we get on load:
---------------------------------------------------------------------------
trying to load: /XXXX.Windows.Controls.GridView;component/themes/generic.xaml
VisualTreeWalker: unexpectedly got an unsorted UIElementCollection
---------------------------------------------------------------------------


And when using app, I get hundreds of these exceptions even on very short run:
---------------------------------------------------------------------------
"Finalizer" tid=0x0xb31c8b70 this=0x0x57e70 thread handle 0x407 state : not waiting
 owns ()
  at <unknown> <0xffffffff>
  at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,in
tptr,intptr,intptr) <IL 0x0004c, 0xffffffff>
[0xb31c8b70:] EXCEPTION handling: System.MethodAccessException: Error verifying
XXX.Windows.Controls.GridView.GridViewCellBase:Finalize (): Method object:Finalize
 () is not accessible at 0x001e

"Finalizer" tid=0x0xb31c8b70 this=0x0x57e70 thread handle 0x407 state : not waiting
 owns ()
  at <unknown> <0xffffffff>
  at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,in
tptr,intptr,intptr) <IL 0x0004c, 0xffffffff>
[0xb31c8b70:] EXCEPTION handling: System.MethodAccessException: Error verifying XXX.Windows.Controls.GridView.WeakEvent/WeakListener`1:Finalize (): Method object:
Finalize () is not accessible at 0x0005
---------------------------------------------------------------------------

I have also been running profiler on that app, and part of the problem might be too many calls to MeasureOveride.
However, this seems not to be problem on windows platform, or at least show stopper.

Because we use those custom controls from third party, I cannot give public access to that app,
but i someone wants to test I can give URL personally.

Ideas welcome from where to start digging up this problem in mono/moonlight side?

--Tavasti

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Nogginboink | 2 Feb 20:18
Gravatar

Unable to debug

I am new to Mono. I have written a C# app in Visual Studio 2005 that works
fine when run under Windows. However, when I launch the app under Mono I get
a divide by zero exception in the Resize() event handler of a usercontrol
that I wrote. (I surmise that Mono is calling the Resize event at startup
when Windows doesn't. I fully believe the divide by zero error is in my
code.)

I am running MonoDevelop version 2.2.1 on Ubuntu 10.04. According to Ubuntu
Software Center, I have mono-debugger version 2.4.3-2 and
monodevelop-debugger-mdb version 2.2.1-1 installed . In the MonoDevelop
Add-in Manager, I see two debugging add-ins: MDB support for Mono.debugging
version 2.2, and Asp.Net Debugging Support version 2.2 I am able to load my
VS2005 solution in MonoDevelop. 

The Run menu has an option for Debug, but Step Over, Step Into, etc. are
greyed out. When I set a breakpoint and select Debug from the run menu, I
get the exception record in the Application Output window in MonoDevelop,
but I had expected source-code debugging to be triggered when the exception
was hit, and the offending line to be displayed in the code editor.

I'm afraid that I don't know what I'm doing wrong here. I'm reasonably
certain that I didn't configure something properly, but I've no idea what
that something might be. Can anyone help me figure this out?

(Oddly, I have also noticed that calls to
System.Diagnostics.Debug.WriteLine() don't send output to the Application
Output window, either. Is this expected?)

I sincerely appreciate any help that the group could offer. Thanks in
advance.

--
View this message in context: http://mono.1490590.n4.nabble.com/Unable-to-debug-tp4352493p4352493.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
Michael Stoll | 1 Feb 17:26
Picon
Gravatar

Building mono on windows

Hi,

I used to build mono on Cygwin/Windows a couple of month ago. Therefore 
I had to convert a few files using dos2unix command.

Today I did a clean checkout and applied dos2unix as before. But when 
runing make it complained about
./depcomp: line2: $'\r': command not found
As depcomp hat unix format, I have no idea, what to do.

Regards Michael

Gmane