Bugs item #1096328, was opened at 2005-01-05 10:45
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1096328&group_id=31650

Category: Core
Group: 0.85
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jonathan Evans (jd_csfb)
>Assigned to: Gert Driesen (drieseng)
Summary: Exception thrown when running VB.DOC

Initial Comment:
I am using VS.Net 2003 (framework 1.1) on Windows XP 
SP1.

This could well be my fault - I am running a slightly 
modified version of VB.DOC 0.4 (which was originally 
designed for use with NAnt 0.84).  It is likely that I've 
failed to spot all of the necessary changes to make it 
compatible with NAnt 0.85.

I run a build which includes a vbdoc element.  I don't 
really understand why Remoting is being invoked.

INTERNAL ERROR

System.Runtime.Serialization.SerializationException: The 
type NAnt.Core.DirectoryScanner+RegexEntry in 
Assembly NAnt.Core, Version=0.85.1793.0, Cultur
e=neutral, PublicKeyToken=null is not marked as 
serializable.

Server stack trace:
   at 
System.Runtime.Serialization.FormatterServices.InternalG
etSerializableMembers(RuntimeType type, Boolean 
excludeNonSerializable)
   at 
System.Runtime.Serialization.FormatterServices.GetSeriali
zableMembers(Type type, StreamingContext context)
   at 
System.Runtime.Serialization.Formatters.Binary.WriteObje
ctInfo.InitMemberInfo()
   at 
System.Runtime.Serialization.Formatters.Binary.WriteObje
ctInfo.InitSerialize(Object obj, ISurrogateSelector 
surrogateSelector, StreamingContext
context, SerObjectInfoInit serObjectInfoInit, 
IFormatterConverter converter)
   at 
System.Runtime.Serialization.Formatters.Binary.WriteObje
ctInfo.Serialize(Object obj, ISurrogateSelector 
surrogateSelector, StreamingContext cont
ext, SerObjectInfoInit serObjectInfoInit, 
IFormatterConverter converter)
   at 
System.Runtime.Serialization.Formatters.Binary.ObjectWri
ter.Serialize(Object graph, Header[] inHeaders, 
__BinaryWriter serWriter, Boolean fCheck
)
   at 
System.Runtime.Serialization.Formatters.Binary.BinaryFor
matter.Serialize(Stream serializationStream, Object 
graph, Header[] headers, Boolean fCh
eck)
   at 
System.Runtime.Remoting.Channels.CrossAppDomainSeria
lizer.SerializeMessageParts(ArrayList argsToSerialize)
   at 
System.Runtime.Remoting.Messaging.SmuggledMethodCal
lMessage..ctor(IMethodCallMessage mcm)
   at 
System.Runtime.Remoting.Messaging.SmuggledMethodCal
lMessage.SmuggleIfPossible(IMessage msg)
   at 
System.Runtime.Remoting.Channels.CrossAppDomainSink.
SyncProcessMessage(IMessage reqMsg)

Exception rethrown at [0]:
   at 
System.Runtime.Remoting.Proxies.RealProxy.HandleReturn
Message(IMessage reqMsg, IMessage retMsg)
   at 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvok
e(MessageData& msgData, Int32 type)
   at VBDOCHandler.Run(Options options, 
IMessageRecipient recipient) in C:\Program 
Files\Nant\src\VbDoc\src\VBDOCHandler.cs:line 19
   at VBDOCRunner.RunVBDOC(Options options, 
IMessageRecipient recipient) in C:\Program 
Files\Nant\src\VbDoc\src\VBDOCRunner.cs:line 31
   at NAnt.Tasks.VBDOCTask.ExecuteTask() in 
C:\Program Files\Nant\src\VbDoc\src\VBDOCTask.cs:line 
214
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, 
Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

Please send bug report to nant-
[EMAIL PROTECTED]

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

>Comment By: Gert Driesen (drieseng)
Date: 2005-01-23 17:51

Message:
Logged In: YES 
user_id=707851

Jonathan,

I fixed the fact that the nested RegexEntry class was not 
marked serializable. But I also don't quite see why you run 
into a serialization issue with IfTask.

Can you try using the latest nightly build 
(http://nant.sourceforge.net/nightly/latest) ?

Don't hesitate to reopen this bug report, if necessary.

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

Comment By: Jonathan Evans (jd_csfb)
Date: 2005-01-19 12:44

Message:
Logged In: YES 
user_id=1190022

I have rebuilt everything and I am getting a slightly more 
explicable error now:

 BUILD FAILED

 INTERNAL ERROR

 System.Runtime.Serialization.SerializationException: The 
type NAnt.Core.Tasks.IfTask in Assembly NAnt.Core, 
Version=0.85.1793.0, Culture=neutral, PublicKeyToken=null is 
not marked as serializable.

 Server stack trace:
    at 
System.Runtime.Serialization.FormatterServices.InternalGetSer
ializableMembers(RuntimeType type, Boolean 
excludeNonSerializable)
    at 
System.Runtime.Serialization.FormatterServices.GetSerializable
Members(Type type, StreamingContext context)
    at 
System.Runtime.Serialization.Formatters.Binary.WriteObjectInf
o.InitMemberInfo()
    at 
System.Runtime.Serialization.Formatters.Binary.WriteObjectInf
o.InitSerialize(Object obj, ISurrogateSelector 
surrogateSelector, StreamingContext context, 
SerObjectInfoInit serObjectInfoInit, IFormatterConverter 
converter)
    at 
System.Runtime.Serialization.Formatters.Binary.WriteObjectInf
o.Serialize(Object obj, ISurrogateSelector surrogateSelector, 
StreamingContext context, SerObjectInfoInit 
serObjectInfoInit, IFormatterConverter converter)
    at 
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.
Write(WriteObjectInfo objectInfo, NameInfo 
memberNameInfo, NameInfo typeNameInfo)
    at 
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.S
erialize(Object graph, Header[] inHeaders, __BinaryWriter 
serWriter, Boolean fCheck)
    at 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatte
r.Serialize(Stream serializationStream, Object graph, Header[] 
headers, Boolean fCheck)
    at 
System.Runtime.Remoting.Channels.CrossAppDomainSerializer.
SerializeMessageParts(ArrayList argsToSerialize)
    at 
System.Runtime.Remoting.Messaging.SmuggledMethodCallMess
age..ctor(IMethodCallMessage mcm)
    at 
System.Runtime.Remoting.Messaging.SmuggledMethodCallMess
age.SmuggleIfPossible(IMessage msg)
    at 
System.Runtime.Remoting.Channels.CrossAppDomainSink.Sync
ProcessMessage(IMessage reqMsg)

 Exception rethrown at [0]:
    at 
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMess
age(IMessage reqMsg, IMessage retMsg)
    at 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData& msgData, Int32 type)
    at VBDOCHandler.Run(Options options, IMessageRecipient 
recipient) in 
c:\projects\open\vbdoc\src\xmlextractor\vbdochandler.cs:line
 19
    at VBDOCRunner.RunVBDOC(Options options, 
IMessageRecipient recipient) in 
c:\projects\open\vbdoc\src\xmlextractor\vbdocrunner.cs:line 
31
    at NAnt.Tasks.VBDOCTask.ExecuteTask() in 
c:\projects\open\vbdoc\src\task\vbdoctask.cs:line 214
    at NAnt.Core.Task.Execute()
    at NAnt.Core.TaskContainer.ExecuteChildTasks()
    at NAnt.Core.Tasks.IfTask.ExecuteTask()
    at NAnt.Core.Task.Execute()
    at NAnt.Core.Target.Execute()
    at NAnt.Core.Project.Execute(String targetName, Boolean 
forceDependencies)
    at NAnt.Core.Project.Execute()
    at NAnt.Core.Project.Run()

 Please send bug report to nant-
[EMAIL PROTECTED]

 Total time: 0.5 seconds.

This looks like an error is occurring because the VB.DOC task 
is being executed in a separate appdomain to the IFTask 
which is being passed through as a parameter (although I 
don't quite see how or why).  Anyway, the IFtask is not 
serializable and so cannot be passed between appdomains.  
Is this a common problem or something peculiar to VB.DOC.  
Is there anyone with a bit more of a clue that can help?

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

Comment By: Jonathan Evans (jd_csfb)
Date: 2005-01-05 11:27

Message:
Logged In: YES 
user_id=1190022

Source etc. added.

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

Comment By: Gert Driesen (drieseng)
Date: 2005-01-05 11:14

Message:
Logged In: YES 
user_id=707851

Jonathan,

CAn you attach all files necessary to reproduce this issue ?

The reason why you get a SerializationException is probably 
becasue the VBDoc task is passing a task or fileset to another 
AppDomain.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1096328&group_id=31650


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to