Comments (8)
I'll try it out and give you feedback later
from messagepack-csharp.
Hey there, I have analyzed my problem a little bit more. The mpc
executable hangs in the background and when I end it via task manager, I get an output and the file is created.
I noticed that I have a lot of warnings in the output, e.g:
C:\Program Files\dotnet\sdk\6.0.405\Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3270: Conflict between the processor architecture of the project "MSIL" being created and the processor architecture of the reference, "Firebase.App", "x86". This conflict can lead to runtime errors. If necessary, use the Configuration Manager to change the processor architecture of your project specified as the target so that the processor architectures are aligned between your project and the references, or select a dependency of references with a processor architecture that corresponds to the processor architecture of your project specified as the target.
Therefore, the assumption was that the bug is related to the output. I therefore changed the code of MessagePackWindow.InvokeProcessStartAsync
a little bit to read the output continuously instead of only at the exit. This solved the problem for me. :)
public static Task<string> InvokeProcessStartAsync(string fileName, string arguments)
{
var psi = new ProcessStartInfo() {
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
StandardOutputEncoding = Encoding.UTF8,
StandardErrorEncoding = Encoding.UTF8,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
FileName = fileName,
Arguments = arguments,
WorkingDirectory = Application.dataPath
};
Process p;
try {
p = Process.Start(psi);
} catch (Exception ex) {
return Task.FromException<string>(ex);
}
var tcs = new TaskCompletionSource<string>();
p.EnableRaisingEvents = true;
var data = string.Empty;
p.OutputDataReceived += (object sender, System.Diagnostics.DataReceivedEventArgs e) => {
data += Environment.NewLine + e.Data;
};
p.BeginOutputReadLine();
p.Exited += (object sender, System.EventArgs e) => {
//var data = p.StandardOutput.ReadToEnd();
p.Dispose();
p = null;
tcs.TrySetResult(data);
};
return tcs.Task;
}
from messagepack-csharp.
mpc
isn't particularly interesting any more. Can you try using the 2.6 beta's source generator instead?
from messagepack-csharp.
So I have tried the v2.6.100-alpha package and see no difference. Was this package meant, or where do I have to look?
from messagepack-csharp.
It's the MessagePack.SourceGenerator
package that I'm referring to. Is that what you tried?
from messagepack-csharp.
No I have not tried that nuget. I am trying to start the generation directly from unity. The generation itself is successful, so the generation is not a problem and just working fine. The problem is just that the call of Process.Start
does not complete if there is a lot of redirected console output.
from messagepack-csharp.
I'm not sure what redirected console output has to do with messagepack. And if you haven't tried the source generator yet, I'm not sure what new thing from 2.6 you tried, because we don't ship mpc in 2.6 I'm pretty sure. Merely switching to the 2.6 messagepack.dll itself won't change how codegen works.
from messagepack-csharp.
never mind, thanks for your time
from messagepack-csharp.
Related Issues (20)
- Source generate formatters as nested under the types they format for private member access HOT 4
- Serialization of WeakReference<T> HOT 4
- Question: Possibility of exposing LZ4 functionality? HOT 1
- ThreadsafeTypeKeyHashTable.VolatileWrite missing nullable declaration for `value` parameter HOT 2
- MessagePack.Generator - Issues with generic
- Private fields on base class do not get serialized HOT 4
- MessagePack.Generator.2.5.140 - Union metatag causes msc.exe error: Index was outside the bounds of the array
- Add parameter list `ref` usage analyzer for low level reader/writer HOT 1
- Fail in application running on MessagepackCompiler.RunAsync on Windows (works on Linux & macOS) HOT 5
- messagepack is missing NuGet package README file
- MsgPack003 does not generate error in all cases HOT 5
- Update readme file for Analyzer HOT 3
- Add Support for external types via class libraries HOT 1
- MsgPack003 errors showing in Rider for type with custom formatter HOT 5
- Typeless serializer fails to serialize simple type, unless fields are prefixed with "_" HOT 2
- Explicit interface implementation
- Help request - using different (derived-)types for serialize/deserialize (IMessagePackFormatter<Tser, Tdes>)? HOT 2
- Discrepancy in Serialized Size with MessagePack for Complex Object Graphs HOT 1
- Serialize/deserialize of interface types failing with ContractlessStandardResolver HOT 1
- Make System.Runtime.CompilerServices.Unsafe a conditional based on TFM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from messagepack-csharp.