Monday, March 23, 2009

Mono-list Digest, Vol 47, Issue 31

Send Mono-list mailing list submissions to
mono-list@lists.ximian.com

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ximian.com/mailman/listinfo/mono-list
or, via email, send a message with subject or body 'help' to
mono-list-request@lists.ximian.com

You can reach the person managing the list at
mono-list-owner@lists.ximian.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mono-list digest..."


Today's Topics:

1. Re: Can Mono Support Codeplex FLEE project (Michael Hutchinson)
2. Re: mono 2.2 make fails (john blair)
3. Re: Mdb Crash (libmonodebuggerreadline) (Miguel de Icaza)
4. Re: Diva (Miguel de Icaza)
5. Re: Mdb Crash (libmonodebuggerreadline) (Daniel Isenmann)
6. Re: Re compile on Mono? (Stifu)
7. Re: Assertion when accessing C library (Ben Henderson)
8. Re: Re compile on Mono? (Stifu)
9. Re: How to marshal a native function pointer to a native
function with p/invoke? (Ben Henderson)
10. Mono crash on filling datatable (J.M. G)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Mar 2009 18:58:50 -0400
From: Michael Hutchinson <m.j.hutchinson@gmail.com>
Subject: Re: [Mono-list] Can Mono Support Codeplex FLEE project
To: aruvalcaba <arturo_ruvalcaba@yahoo.com>
Cc: mono-list@lists.ximian.com
Message-ID:
<aec34c770903221558o1edbe703sf7723e5632a6ac2a@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Mar 20, 2009 at 11:03 PM, aruvalcaba <arturo_ruvalcaba@yahoo.com> wrote:
>
> Hi to all, Does any one now if
> I can use the FLEE (Fast Lightweight Expression Evaluator) on
> CodePlex, in Monodevelop?

I see no reason why not. What concerns did you have?

--
Michael Hutchinson
http://mjhutchinson.com


------------------------------

Message: 2
Date: Sun, 22 Mar 2009 17:14:38 -0700 (PDT)
From: john blair <mailtome200420032002@yahoo.com>
Subject: Re: [Mono-list] mono 2.2 make fails
To: mono-list@lists.ximian.com, smits <smiteshpawar@gmail.com>
Message-ID: <896105.79867.qm@web53109.mail.re2.yahoo.com>
Content-Type: text/plain; charset=us-ascii


Try make after changing mono/mini/driver.c line 1229 to
sched_setaffinity (getpid(), (gpointer)&proc_mask);


--- On Sat, 3/21/09, smits <smiteshpawar@gmail.com> wrote:

> From: smits <smiteshpawar@gmail.com>
> Subject: [Mono-list] mono 2.2 make fails
> To: mono-list@lists.ximian.com
> Date: Saturday, March 21, 2009, 6:01 AM
> Hi I am using WhiteBox linux , gcc version 3.2.3
>
> When I try to make mono-2.2, I get following error.
>
> driver.c:1229: too many arguments to function
> `sched_setaffinity'
>
> Please help me fix this.
> --
> View this message in context:
> http://www.nabble.com/mono-2.2-make-fails-tp22631287p22631287.html
> Sent from the Mono - General mailing list archive at
> Nabble.com.
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



------------------------------

Message: 3
Date: Mon, 23 Mar 2009 01:25:12 -0400
From: Miguel de Icaza <miguel@novell.com>
Subject: Re: [Mono-list] Mdb Crash (libmonodebuggerreadline)
To: "Magius(CHE)" <minkiata@magius.it>
Cc: mono-list@lists.ximian.com
Message-ID: <1237785912.4149.86.camel@erandi.site>
Content-Type: text/plain


> Some one help me?
>
> I absolutly need to run the debugger... ARGGHH!!!! :-)
>
> Thanks in advance!

The debugger is incorrectly compiled, it is missing the library in the
error message.

------------------------------

Message: 4
Date: Mon, 23 Mar 2009 01:27:08 -0400
From: Miguel de Icaza <miguel@novell.com>
Subject: Re: [Mono-list] Diva
To: Abe Gillespie <abe.gillespie@gmail.com>
Cc: Mono List <mono-list@lists.ximian.com>
Message-ID: <1237786028.4149.89.camel@erandi.site>
Content-Type: text/plain

Hello,

> What ever happened to the Diva Video Editor project? It looked really
> promising.

It might be best at this point to write a Silverlight version of the
program.

Building it on Silverlight would have several advantages: it would allow
developers on Windows and MacOS to contribute and it would have a larger
reach than Diva had at the time.

The editing part should be easy, the transcoding might require a tiny
server to do the actual heavy lifting.

------------------------------

Message: 5
Date: Mon, 23 Mar 2009 06:33:37 +0100
From: Daniel Isenmann <daniel.isenmann@gmx.de>
Subject: Re: [Mono-list] Mdb Crash (libmonodebuggerreadline)
To: mono-list@lists.ximian.com
Message-ID: <20090323063337.071a1ac2@fuckup-ng.localdomain>
Content-Type: text/plain; charset=US-ASCII

On Mon, 23 Mar 2009 01:25:12 -0400
Miguel de Icaza <miguel@novell.com> wrote:

>
> > Some one help me?
> >
> > I absolutly need to run the debugger... ARGGHH!!!! :-)
> >
> > Thanks in advance!
>
> The debugger is incorrectly compiled, it is missing the library in the
> error message.

Already fixed on 20th of March. New package is in the repository.

Daniel


------------------------------

Message: 6
Date: Mon, 23 Mar 2009 04:06:50 -0700 (PDT)
From: Stifu <stifu@free.fr>
Subject: Re: [Mono-list] Re compile on Mono?
To: mono-list@lists.ximian.com
Message-ID: <22658017.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


There should be no need to recompile. If the .NET exe works fine with Mono,
then leave it as if.


FlappySocks wrote:
>
> I have a console app, I am developing in Visual Studio for windows and
> Linux. Is there any good reason why I should recompile using the mono
> compiler before deployment for Linux, or am I ok just using the windows
> one?
>

--
View this message in context: http://www.nabble.com/Recompile-on-Mono--tp22657847p22658017.html
Sent from the Mono - General mailing list archive at Nabble.com.

------------------------------

Message: 7
Date: Mon, 23 Mar 2009 04:40:13 -0700 (PDT)
From: Ben Henderson <bhenderson@ipswitch.com>
Subject: Re: [Mono-list] Assertion when accessing C library
To: mono-list@lists.ximian.com
Message-ID: <22658516.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


I posted a question on this assertion a few days ago with no response. Not
sure about your case, but I was trying to send a native function pointer
into a native function via p/invoke. I was receiving the same assertion
which looks to me that it doesn't like the managed delegate wrapping a
p/invoke function. I worked around the issue by marshaling a managed
delegate for the function pointer parameter in the native function and then
calling the native function from the managed delegate. (Hope this makes
sense!) I'll post sample code below. If you are getting this assertion in
a different scenario, please post some code. Also, I am going to submit a
bug on this, as the MS CLR has no problem marshaling the native function
pointer.

Ben

using System;
using System.Runtime.InteropServices;

namespace FunctionPointerInterop
{
class Program
{
[DllImport("testdll.dll")]
public extern static void foo();

[DllImport("testdll.dll")]
public extern static void bar(foo_delegate foo);

public delegate void foo_delegate();

static foo_delegate my_foo_delegate;

static void ManagedFooDelegate()
{
foo();
}

static void Main(string[] args)
{
my_foo_delegate = new foo_delegate(ManagedFooDelegate);
bar(my_foo_delegate);
}
}
}


rumcajz wrote:
>
> Anyone has any idea what this assertion is supposed to mean:
>
> ERROR:marshal.c:9235:mono_marshal_get_managed_wrapper: assertion failed:
> (!mono_method_signature (method)->pinvoke)
> Stacktrace:
>
> at (wrapper managed-to-native)
> object.__icall_wrapper_mono_delegate_to_ftnptr (object) <0x00045>
> at (wrapper managed-to-native)
> object.__icall_wrapper_mono_delegate_to_ftnptr (object) <0xffffffff>
>
> Thanks.
>

--
View this message in context: http://www.nabble.com/Assertion-when-accessing-C-library-tp22657063p22658516.html
Sent from the Mono - General mailing list archive at Nabble.com.

------------------------------

Message: 8
Date: Mon, 23 Mar 2009 05:17:24 -0700 (PDT)
From: Stifu <stifu@free.fr>
Subject: Re: [Mono-list] Re compile on Mono?
To: mono-list@lists.ximian.com
Message-ID: <22659001.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


If I'm not mistaken, this shouldn't be a problem either.
I think the framework is what handles the 32-bit/64-bit issue, not the
programs.


FlappySocks wrote:
>
> Ok, thanks. And what if I compile on 32-bit windows and run it on 64-bit
> Linux?
>
>
>
> Stifu wrote:
>>
>> There should be no need to recompile. If the .NET exe works fine with
>> Mono, then leave it as is.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Recompile-on-Mono--tp22657847p22659001.html
Sent from the Mono - General mailing list archive at Nabble.com.

------------------------------

Message: 9
Date: Mon, 23 Mar 2009 07:05:50 -0700 (PDT)
From: Ben Henderson <bhenderson@ipswitch.com>
Subject: Re: [Mono-list] How to marshal a native function pointer to a
native function with p/invoke?
To: mono-list@lists.ximian.com
Message-ID: <22660798.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


I have entered the following defect for this issue:

Bug 487758 - Marshaling a native function pointer to native function call
throws assertion

But, I have also found a work around for the problem. I'll post it here in
case anyone else runs into this problem.

The work around is: Create a managed delegate that calls the un-managed
function. The following code is what I posted in the defect in BugZilla.
The Workaround class shows how to make it work with the managed delegate,
and the Bug class demonstrates the defect.

using System;
using System.Runtime.InteropServices;

namespace FunctionPointerInterop
{
class Workaround
{
[DllImport("testdll.dll")]
public extern static void foo();

[DllImport("testdll.dll")]
public extern static void bar(foo_delegate foo);

// Delegate definition
public delegate void foo_delegate();

static foo_delegate my_foo_delegate;

// Managed delegate that calls the native function "foo"
static void ManagedFooDelegate()
{
// Make the native call
foo();
}

public static void Start()
{
// Create delegate for managed callback
my_foo_delegate = new foo_delegate(ManagedFooDelegate);
// Call native function with managed delegate
bar(my_foo_delegate);
}
}

class Bug
{
[DllImport("testdll.dll")]
public extern static void foo();

[DllImport("testdll.dll")]
public extern static void bar(foo_delegate foo);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void foo_delegate();

static foo_delegate my_foo_delegate;

public static void Start()
{
// Create delegate with native pointer
my_foo_delegate = new foo_delegate(foo);
bar(my_foo_delegate);
}
}

class Program
{
static void Main(string[] args)
{
Workaround.Start();
Bug.Start();
}
}
}


Ben Henderson wrote:
>
> Hello all,
>
> I am having an interesting problem with Mono 2.2 with trying to pass a
> native function pointer to a function in the same native library. The
> sample code below works with the .NET CLR, but dies in the mono runtime
> with the following assertion/error (I have also tried changing the
> prototype for the P/Invoke method to use the delegate, but get the same
> assertion when calling the method):
>
> **
> ERROR:marshal.c:9235:mono_marshal_get_managed_wrapper: assertion failed:
> (!mono_
> method_signature (method)->pinvoke)
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> **
>
> So.. my question is... Am I doing something wrong? Is this not supported
> in mono? Is there a workaround for mono (other than LoadLibrary/dlopen)
> -- I would like to utilized managed code to do this and not have to add
> #if's for different platforms!
>
> Thanks in advance!
>
> Ben
>
> ******* Code *******
>
> TESTDLL.DLL code:
> **************
> #include "stdafx.h"
> #include <stdio.h>
>
> extern "C" void TESTDLL_EXPORT foo()
> {
> printf("foo!\n");
> }
>
> extern "C" void TESTDLL_EXPORT bar(void (*fn)(void))
> {
> if (fn)
> {
> fn();
> }
> }
>
> Test Program code:
> ***************
> using System;
> using System.Runtime.InteropServices;
>
> namespace FunctionPointerInterop
> {
> class Program
> {
> [DllImport("testdll.dll")]
> public extern static void foo();
>
> [DllImport("testdll.dll")]
> public extern static void bar(IntPtr foo);
>
> [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
> public delegate void foo_delegate();
>
> static foo_delegate my_foo_delegate;
>
> static void Main(string[] args)
> {
> my_foo_delegate = new foo_delegate(foo);
> IntPtr ptr =
> Marshal.GetFunctionPointerForDelegate(my_foo_delegate);
> bar(ptr);
> }
> }
> }
>
>

--
View this message in context: http://www.nabble.com/How-to-marshal-a-native-function-pointer-to-a-native-function-with-p-invoke--tp22608410p22660798.html
Sent from the Mono - General mailing list archive at Nabble.com.

------------------------------

Message: 10
Date: Mon, 23 Mar 2009 16:22:19 +0100
From: "J.M. G" <jhmgbl2@t-online.de>
Subject: [Mono-list] Mono crash on filling datatable
To: mono-list@lists.ximian.com
Message-ID: <1237821739.8051.3.camel@HM0>
Content-Type: text/plain

Hallo! I get the following error when filling a datatable from an SQLite
datasource (with mono.sqlite). I am using Ubuntu 8.04 with mono 1.9.1.
On windows the code works fine!
<code>
Unhandled Exception: System.ApplicationException: clsDBRep.FillDSRepT
Error! ---> System.Exception: Error Fill dtMedikamente! --->
System.EntryPointNotFoundException: sqlite3_column_origin_name
at (wrapper managed-to-native)
Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_column_origin_name
(intptr,int)
at Mono.Data.Sqlite.Sqlite3.ColumnOriginalName
(Mono.Data.Sqlite.SqliteStatement stmt, Int32 index) [0x00000]
at Mono.Data.Sqlite.SqliteDataReader.GetSchemaTable (Boolean
wantUniqueInfo, Boolean wantDefaultValue) [0x00000]
at Mono.Data.Sqlite.SqliteDataReader.GetSchemaTable () [0x00000]
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader,
System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction
missingSchAction, MissingMappingAction missingMapAction,
System.Data.Common.DataTableMappingCollection dtMapping) [0x00000]
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader,
System.Data.DataTable table, SchemaType schemaType) [0x00000]
at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable
dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords,
System.Int32& counter) [0x00000]
at System.Data.Common.DataAdapter.FillInternal (System.Data.DataTable
dataTable, IDataReader dataReader) [0x00000]
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable
dataTable, IDataReader dataReader) [0x00000]
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable
dataTable, IDbCommand command, CommandBehavior behavior) [0x00000]
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable
dataTable) [0x00000]
at (wrapper remoting-invoke-with-check)
System.Data.Common.DbDataAdapter:Fill (System.Data.DataTable)
at Repetit.net.T.Mono.dsRepTableAdapters.MedikamenteTableAdapter.Fill
(Repetit.net.T.Mono.MedikamenteDataTable dataTable) [0x00000]
at Repetit.net.T.Mono.clsDBRep.FillDSREPT () [0x00000] --- End of
inner exception stack trace ---

at Repetit.net.T.Mono.clsDBRep.FillDSREPT () [0x00000] --- End of
inner exception stack trace ---

at Repetit.net.T.Mono.clsDBRep.FillDSREPT () [0x00000]
at Repetit.net.T.Mono.frmMain.OpenDatabase (System.String& FileName)
[0x00000]
at (wrapper remoting-invoke-with-check)
Repetit.net.T.Mono.frmMain:OpenDatabase (string&)
at Repetit.net.T.Mono.frmMain.frmMain_Load (System.Object eventSender,
System.EventArgs eventArgs) [0x00000]
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e)
[0x00000]
at System.Windows.Forms.Form.OnCreateControl () [0x00000]
at System.Windows.Forms.Control.CreateControl () [0x00000]
at System.Windows.Forms.Control.WmShowWindow
(System.Windows.Forms.Message& m) [0x00000]
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&
m) [0x00000]
at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000]
at System.Windows.Forms.ContainerControl.WndProc
(System.Windows.Forms.Message& m) [0x00000]
at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
[0x00000]
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000]
at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000]
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
IntPtr wParam, IntPtr lParam) [0x00000]
at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg
message, IntPtr wParam, IntPtr lParam) [0x00000]
at System.Windows.Forms.XplatUIX11.MapWindow
(System.Windows.Forms.Hwnd hwnd, WindowType windows) [0x00000]
at System.Windows.Forms.XplatUIX11.CreateWindow
(System.Windows.Forms.CreateParams cp) [0x00000]
at System.Windows.Forms.XplatUI.CreateWindow
(System.Windows.Forms.CreateParams cp) [0x00000]
at System.Windows.Forms.NativeWindow.CreateHandle
(System.Windows.Forms.CreateParams create_params) [0x00000]
at System.Windows.Forms.Control.CreateHandle () [0x00000]
at System.Windows.Forms.Form.CreateHandle () [0x00000]
at System.Windows.Forms.Control.CreateControl () [0x00000]
at System.Windows.Forms.Control.SetVisibleCore (Boolean value)
[0x00000]
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000]
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000]
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:set_Visible (bool)
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00000]
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00000]
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form
mainForm) [0x00000]
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000]
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000]
at Repetit.net.T.Mono.My.MyApplication.Main (System.String[] Args)
[0x00000]
</code>

Regards

Hans

------------------------------

_______________________________________________
Mono-list mailing list
Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


End of Mono-list Digest, Vol 47, Issue 31
*****************************************

No comments: