Giter VIP home page Giter VIP logo

Comments (130)

Mystfit avatar Mystfit commented on August 19, 2024 1

@fredrikm Success! πŸ‘ I dropped your fork into my Unity project on OSX and NetMQ is now happily talking to PyZMQ. Thanks so much. :D

At the moment I'm compiling the NetMQ project out to a dll and importing it into Unity but that requires Unity Pro. In the past, I've managed to get it working by dropping the source straight into Unity but there's a few namespaces that need to be changed since Unity complains about multiple instances of the Poller class being found.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Download the source code and try to compile with .net 3.5, I don't think
the project is using some .net 4 features.

On Fri, Aug 30, 2013 at 2:37 PM, Diego Duclos [email protected]:

I write games using Unity 3D.

Unity 3D uses mono to run managed code, while the engine itself is written
in another language.
This means all extra programming happens using mono. Unfortunatly, it's a
rather outdated version of mono that doesn't have any of the features of
.NET 4.0.

NetMQ refuses to run on it, is it possible to fix this ?

(I could possibly do this myself with some guidance on how to do this)

β€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/98
.

from netmq.

tobi-tobsen avatar tobi-tobsen commented on August 19, 2024

I quickly created a patch which compiles under 3.5 client profile.
As you see, I didn't change the Security and NetMQScheduler but just delete/excluded both. Also the tests still compile under 4.0 because they make excessive use of Task
I you want to have the NetMQScheduler, you might want to implement a ConcurrentBag using one of those approach mentioned in this Stackoverflow Question.

I think others than compiling under 3.5 client profile, you might check out issue #7 for other open issues regarding mono support. If you worked around those, be sure to submit a pull request ;-)

from netmq.

cncfanatics avatar cncfanatics commented on August 19, 2024

Patch applied, it compiles perfectly indeed, I'll be testing it in the next few days as I change my app to use NetMQ instead of clrzmq

Thanks!

from netmq.

cncfanatics avatar cncfanatics commented on August 19, 2024

I can confirm this looks good after some initial quicktesting with mono 2.6! This is currently on windows, but I'll be testing on linux soon as well and report what I find πŸ‘

Is it worth considering making the code compile under both environments and add preprocessor statements around functionality making heavy use of the 4.0 framework ?

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

There are quite a few people wanting to use netmq within Unity3D so I think it's a welcome addition @cncfanatics.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

What is the current status of this? I'm interested in this too - creating a software component that needs to be deployable on .NET 3.5. I'm using compiler pragmas PRE_4 to signal use of pre-.NET 4.0 features, and PRE_5 to signal use of pre-.NET 4.5/C# 5.0 features. Which does give me some gnashing of teeth as I do love using the latest language features!

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

I now have a solution for the .NET 3.5 compatibility issue, and am about to submit a request to update. This only targets the Windows side - if it's accepted then I'll also do the Mono side if that is wished. Included in this are some edits to the tests to make them compile/test under 3.5. It was necessary to incorporate a conditional-compilation symbol: "PRE_4", to signal that the project is to be built using only pre- .NET 4.0 features. The Security is included, but I omitted NetMQScheduler since that probably doesn't make much sense under 3.5. I built and tested on a virtual machine which has only VS 2008, and no .NET higher than 3.5. This is my first contribution so any advice would be appreciated.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

I'd personally be a big fan of the mono side.
Unity specifically uses a rather old version of mono which would require this.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Ok - working on that now (I'm between jobs at the moment, lamentably, so I have some time to devote to this right now). Exactly which version of Mono does the current version of Unity require? And - btw, what is the exact command-path that one uses to submit a 'git push' of one's changes? I'm getting various errors as I try different variations of the line under [remote "origin"]. I tried url = ssh://[email protected]/zeromq/netmq.git, and other variations with my user nickname ( JamesWHurst ) at various places within that. None work.

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Unity targets 3.5 features of Mono though it uses a custom build. I'm not exactly sure what the changes they applied are, but I believe that just targeting the 3.5 .net framework should suffice.

@JamesWHurst Regarding the push issues you are having, please read: https://help.github.com/articles/fork-a-repo

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

I had read that page - those commands are not working for me. Eg, git push results in ERROR: Permission to zeromq/netmq.git denied to JamesWHurst. fatal: Could nto read from remote repository.

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Because you are trying to push to the main repository and not your forked copy. You should fork the main, pull that, make a branch, write your changes, commit / push. Go back to github and a nice little button "pull something something" will show up.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Ok. I had clicked on the "Fork" button on the github page. I didn't see anything happen. I had pulled that down onto my local drive, put my edits there. So, just now, I created a branch on my local box using git branch Net35CompatFix (the intent was to name the branch Net35CompatFix). Then I entered git checkout Net35CompatFix to move over to that branch. Now, how do you bring this branch up to Github? On the Github page, I created the branch named Net35CompatFix. Do I now need to enter the command: git push --set-upstream origin Net35CompatFix ? Or does that push my edits into the master instead of into my branch?

from netmq.

almazik avatar almazik commented on August 19, 2024

James,

It seems that you are not familiar with Pull Requests contribution model. I
suggest you to read the following article first:
https://help.github.com/articles/using-pull-requests

On Tue, Oct 15, 2013 at 10:21 PM, James Hurst [email protected]:

Ok. I had clicked on the "Fork" button on the github page. I didn't see
anything happen. I had pulled that down onto my local drive, put my edits
there. So, just now, I created a branch on my local box using git branch
Net35CompatFix (the intent was to name the branch Net35CompatFix). Then I
entered git checkout Net35CompatFix to move over to that branch. Now, how
do you bring this branch up to Github? On the Github page, I created the
branch named Net35CompatFix. Do I now need to enter the command: git push
--set-upstream origin Net35CompatFix ? Or does that push my edits into the
master instead of into my branch?

β€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/98#issuecomment-26364137
.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

That is correct. I have used many other version-control systems, but never Git. I have a little book here, "Pragmatic Guide to Git", which doesn't feel like it's quite helping. And that article you list - I'd already read. It explains a few generic concepts, but the specific commands it lists don't seem to work. Nothing seems to be working as it is supposed to. I guess I should have just done a very tiny edit or bug-fix before attempting this, so that I wouldn't have wasted so many days before discovering this is something I cannot use.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Actually - no. I had already done the Fork, cloned the repo to my desktop cptr, created a branch, and then added and committed my changes to my local branch. And I created a branch on that Github page by the same name - Net35CompatFix, by clicking on the webpage-control. And, I understand how to make a pull-request. It is just the process of pushing my repo from my local machine, up to the branch on the Github repo, that is not happening. At this point it would have been faster to copy it onto a pile of floppy-disks, duck-tape those to the back of a turtle, and send it in the direction of the Github server to be manually unpacked and transferred. This is why I should try to stay away from open-source.

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

James... you create the branch on your local fork (on your computer).

Regarding your comment on why you stay away from open-source, sad you think that way, but given the hundreds of thousands of people currently working with github, I doubt it's a problem with OSS/git ;)

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

I had. Perhaps it is best to start over. I receive a ton of 'how-to' advice, most of which turned out to be incorrect.
The first step is for Fork, right? And we accomplish this by clicking on the "Fork" button at the upper-right corner of the Github project page? Attached is a screenshot of it, after I clicked on it. The only change I see, is that the number to the right of it incremented from 34 to 35. Is this correct so far?
fork

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Now, the "HTTPS clone url" on the bottom right is the url you should be cloning onto your computer. This is your "personal" version of the repository as you can see from the "JamesWHurst/netmq" project. Make a branch, make your changes, commit and push. Then, from your repository on git, you'll be offered the option to create a pull request to the main repository, which we can then pull in.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Aha! Thx. So on my local box I entered at a command-line: git clone https://githumb.com/JamesWHurst/netmq.git
That seemed to operate ok.
To confirm: the next steps are to create a branch on my local box, merge in my changes, commit, and then enter "git push" - right?

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Basically yes, you create a branch on local box, hack on it, commit then push.
After that, you go to your repo at: https://github.com/JamesWHurst/netmq and you'll get an option to create a pull request from your committed branch.

On a side note, until you get accustomed to using git, you might want to give a git gui tool a try, something like TortoiseGit or SmartGit. (I personally use TortoiseGit as its quite fast and simple to use).

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

What exactly is the correct command to push the commits back to my branch on the repo? On my local box, I am "in" branch Net35CompatFix. When I entered "git push", it responds: fatal: The current branch Net35CompatFix has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin Net35CompatFix.
Is that what I need to enter?
Thanks,
jh

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

I believe you'd do: git push -u origin Net35CompatFix

the -u will automagically add the upstream for you for future uses, so you'd be able to perform a git push, on successive pushes without being asked for the upstream branch.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Thank you reiroldan - I appreciate your help. Your recommendation worked splendidly, and the Pull Request is in.

I appreciate your helping me through this!

jh

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Glad I could help you through that ;)

from netmq.

DirkBroenink avatar DirkBroenink commented on August 19, 2024

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know enough about GitHub yet to know how all this works. If I understand correctly, you can either download tobi-tonsen's patch or JamesWHurst's branch, and you should get NetMQ compatible with .NET 3.5. However, I don't know how to do either of these. (I tried looking around for a while, but I wouldn't know where to begin.)

If I download tobi-tonsen's patch, how do I apply it?
Where can I find the download for JamesWHurst's branch?

from netmq.

somdoron avatar somdoron commented on August 19, 2024

download git from http://git-scm.com/downloads and install git for windows.

open command prompt and create a directory for your git repositories.

than run "git clone https://github.com/PSG-Sakari/netmq.git"

you now have a new directory called NetMQ, open it, open src folder, open
the solution and compile.

On Mon, Jul 7, 2014 at 2:01 PM, Taboen [email protected] wrote:

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know enough
about GitHub yet to know how all this works. If I understand correctly, you
can either download tobi-tonsen's patch or JamesWHurst's branch, and you
should get NetMQ compatible with .NET 3.5. However, I don't know how to do
either of these. (I tried looking around for a while, but I wouldn't know
where to begin.) Could anyone give me some pointers?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

DirkBroenink avatar DirkBroenink commented on August 19, 2024

Thanks!

It worked!

Question: how did you know about the existence of the PSG-Sakari fork? Next
time I should be able to find something like that myself.

On Mon, Jul 7, 2014 at 1:15 PM, Doron Somech [email protected]
wrote:

download git from http://git-scm.com/downloads and install git for
windows.

open command prompt and create a directory for your git repositories.

than run "git clone https://github.com/PSG-Sakari/netmq.git"

you now have a new directory called NetMQ, open it, open src folder, open
the solution and compile.

On Mon, Jul 7, 2014 at 2:01 PM, Taboen [email protected] wrote:

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know enough
about GitHub yet to know how all this works. If I understand correctly,
you
can either download tobi-tonsen's patch or JamesWHurst's branch, and you
should get NetMQ compatible with .NET 3.5. However, I don't know how to
do
either of these. (I tried looking around for a while, but I wouldn't
know
where to begin.) Could anyone give me some pointers?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

cncfanatics avatar cncfanatics commented on August 19, 2024

I've put in a pull request for it, you can see it under the pull requests
list in the original repo :)

Note: I'm planning on updating that fork soon with a more up-to-date way of
supporting both 3.5 and 4.5 if you're interested.
You'll see the changes appear likely tonight or tomorrow

On Mon, Jul 7, 2014 at 2:19 PM, Taboen [email protected] wrote:

Thanks!

It worked!

Question: how did you know about the existence of the PSG-Sakari fork?
Next
time I should be able to find something like that myself.

On Mon, Jul 7, 2014 at 1:15 PM, Doron Somech [email protected]
wrote:

download git from http://git-scm.com/downloads and install git for
windows.

open command prompt and create a directory for your git repositories.

than run "git clone https://github.com/PSG-Sakari/netmq.git"

you now have a new directory called NetMQ, open it, open src folder,
open
the solution and compile.

On Mon, Jul 7, 2014 at 2:01 PM, Taboen [email protected]
wrote:

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know
enough
about GitHub yet to know how all this works. If I understand
correctly,
you
can either download tobi-tonsen's patch or JamesWHurst's branch, and
you
should get NetMQ compatible with .NET 3.5. However, I don't know how
to
do
either of these. (I tried looking around for a while, but I wouldn't
know
where to begin.) Could anyone give me some pointers?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

DirkBroenink avatar DirkBroenink commented on August 19, 2024

Just be sure I am getting this. You are requesting to put your changes into
zeromq/netmq with that pull request, right?

Also, if it's yours, you should know I had some problems compiling your
version with VS2012, I had to comment out the entire NetMQScheduler class
in order for the compilation to work for the Net35 project. It compiled out
of the box for all other projects, but not for Net35. These are the errors
I got when compiling the first time:

  • Error 7 The type or namespace name 'ThreadLocal' could not be found (are
    you missing a using directive or an assembly reference?)
    C:\Users\Dirk\Desktop\netmq-master\src\Net45\NetMQScheduler.cs 25
  • Error 8 The type or namespace name 'ThreadLocal' could not be found (are
    you missing a using directive or an assembly reference?)
    C:\Users\Dirk\Desktop\netmq-master\src\Net45\NetMQScheduler.cs 26

etc etc, for classes ThreadLocal, TaskScheduler, Task, ConcurrentBag,
Concurrent, TryExecuteTask, TaskCreationOptions. In other words, for .NET
4.0 specific classes.
Notice how it gave the errors when compiling the Net35 project, but the
path is in the Net45. I don't understand why this happens, but when I
commented out the entire class it worked. This was the only class in which
errors occurred. (Commenting out the class caused new errors in the
TestNetMQScheduler class, but I don't need that to work).

After commenting it, compiling a new version, it works perfectly in
Unity3D.

Gr, Dirk

On Mon, Jul 7, 2014 at 2:20 PM, Diego Duclos [email protected]
wrote:

I've put in a pull request for it, you can see it under the pull requests
list in the original repo :)

Note: I'm planning on updating that fork soon with a more up-to-date way
of
supporting both 3.5 and 4.5 if you're interested.
You'll see the changes appear likely tonight or tomorrow

On Mon, Jul 7, 2014 at 2:19 PM, Taboen [email protected] wrote:

Thanks!

It worked!

Question: how did you know about the existence of the PSG-Sakari fork?
Next
time I should be able to find something like that myself.

On Mon, Jul 7, 2014 at 1:15 PM, Doron Somech [email protected]
wrote:

download git from http://git-scm.com/downloads and install git for
windows.

open command prompt and create a directory for your git repositories.

than run "git clone https://github.com/PSG-Sakari/netmq.git"

you now have a new directory called NetMQ, open it, open src folder,
open
the solution and compile.

On Mon, Jul 7, 2014 at 2:01 PM, Taboen [email protected]
wrote:

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know
enough
about GitHub yet to know how all this works. If I understand
correctly,
you
can either download tobi-tonsen's patch or JamesWHurst's branch, and
you
should get NetMQ compatible with .NET 3.5. However, I don't know how
to
do
either of these. (I tried looking around for a while, but I wouldn't
know
where to begin.) Could anyone give me some pointers?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

cncfanatics avatar cncfanatics commented on August 19, 2024

After a quick check, this is likely caused by not getting the nuget
dependencies, which is just fine if you don't intend to use the scheduler
anyway.

On Mon, Jul 7, 2014 at 2:36 PM, Taboen [email protected] wrote:

Just be sure I am getting this. You are requesting to put your changes
into
zeromq/netmq with that pull request, right?

Also, if it's yours, you should know I had some problems compiling your
version with VS2012, I had to comment out the entire NetMQScheduler class
in order for the compilation to work for the Net35 project. It compiled
out
of the box for all other projects, but not for Net35. These are the errors
I got when compiling the first time:

  • Error 7 The type or namespace name 'ThreadLocal' could not be found (are
    you missing a using directive or an assembly reference?)
    C:\Users\Dirk\Desktop\netmq-master\src\Net45\NetMQScheduler.cs 25
  • Error 8 The type or namespace name 'ThreadLocal' could not be found (are
    you missing a using directive or an assembly reference?)
    C:\Users\Dirk\Desktop\netmq-master\src\Net45\NetMQScheduler.cs 26

etc etc, for classes ThreadLocal, TaskScheduler, Task, ConcurrentBag,
Concurrent, TryExecuteTask, TaskCreationOptions. In other words, for .NET
4.0 specific classes.
Notice how it gave the errors when compiling the Net35 project, but the
path is in the Net45. I don't understand why this happens, but when I
commented out the entire class it worked. This was the only class in which
errors occurred. (Commenting out the class caused new errors in the
TestNetMQScheduler class, but I don't need that to work).

After commenting it, compiling a new version, it works perfectly in
Unity3D.

Gr, Dirk

On Mon, Jul 7, 2014 at 2:20 PM, Diego Duclos [email protected]
wrote:

I've put in a pull request for it, you can see it under the pull
requests
list in the original repo :)

Note: I'm planning on updating that fork soon with a more up-to-date way
of
supporting both 3.5 and 4.5 if you're interested.
You'll see the changes appear likely tonight or tomorrow

On Mon, Jul 7, 2014 at 2:19 PM, Taboen [email protected]
wrote:

Thanks!

It worked!

Question: how did you know about the existence of the PSG-Sakari fork?
Next
time I should be able to find something like that myself.

On Mon, Jul 7, 2014 at 1:15 PM, Doron Somech [email protected]

wrote:

download git from http://git-scm.com/downloads and install git for
windows.

open command prompt and create a directory for your git
repositories.

than run "git clone https://github.com/PSG-Sakari/netmq.git"

you now have a new directory called NetMQ, open it, open src folder,
open
the solution and compile.

On Mon, Jul 7, 2014 at 2:01 PM, Taboen [email protected]
wrote:

Hi, I'd also like to make use of NetMQ in Unity3d. I do not know
enough
about GitHub yet to know how all this works. If I understand
correctly,
you
can either download tobi-tonsen's patch or JamesWHurst's branch,
and
you
should get NetMQ compatible with .NET 3.5. However, I don't know
how
to
do
either of these. (I tried looking around for a while, but I
wouldn't
know
where to begin.) Could anyone give me some pointers?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

MSylvia avatar MSylvia commented on August 19, 2024

@Taboen Do you happen to have a simple example of this running in Unity3D? Got 3.5 compiled but it crashes on play.

from netmq.

tobi-tobsen avatar tobi-tobsen commented on August 19, 2024

No, sorry. I think @Taboen was able to use it in Unity3D.
It seems there is an increased demand for that. And I hope @cncfanatics replies to my remarks so we might get his .Net 3.5 support in. What do the other Collaborators think (e.g. how to handle it in reagrds to nuget)?

from netmq.

MSylvia avatar MSylvia commented on August 19, 2024

Ya sorry about that. Your names were similar in the auto-complete user tagging. I ment @Taboen.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

I have an updated and much improved version of this I still need to push! (Sorry, still didn't get to it). I have a weekend of family crap to go through, and I'll see to it it's done on sunday.

To fix this properly, I've gone through backporting much of the BSD licensed 4.5 mono framework, and conditionally include it as dependency of NetMQ depending on whether we're running on 3.5 or 4.5. What do people think of this approach ?

As a free bonus, it adds a lot of 4.5 features to the 3.5 Unity runtime

from netmq.

tobi-tobsen avatar tobi-tobsen commented on August 19, 2024

@PSG-Sakari to be honest, I have no idea if the licences are a problem or not. Imo "conditionally include it" sounds not too good, I liked your other approach better (having separate projects for 3.5 and 4.5). That seemed to be not as invasive as your new approach - but I might be wrong since I am unsure what needed back porting.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

i ended up backporting a large part of the 4.5 framework because I was going to need it anyway.
You're right, this is likely much too big. I'll keep with this approach and finish it up on sunday

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Why do we need 4.5 version? what features of 4.5 do we need?

With Nuget you can ship two different binaries targeting different .net frameworks.
However if we are going to add a dependency on the parallel extension library I suggest to have a different nuget package aiming .net 3.5 (maybe this can solved with nuget as well, but i'm not sure).

In my opinion the end result should be two csproj files, one aiming .net 3.5 and one for .net 4.0. We might need to add some if define condition in the code and should try keep those to a minimum.

from netmq.

DirkBroenink avatar DirkBroenink commented on August 19, 2024

@MSylvia This compiles and works for me: http://pastebin.com/EHvt4Na7
If this doesn't work something probably went wrong when compiling the NetMQ library in 3.5 mode, @cncfanatics helped me with that, read comments above. I followed the steps he described.

from netmq.

MSylvia avatar MSylvia commented on August 19, 2024

Hmmm it could be that I'm on OSX. Last thing the log shows before the crash is

Platform assembly: /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/Mono.Posix.dll (this message is harmless)
Receiving unhandled NULL exception

So there may need to be some OSX checks in OpCode.cs around line 30

Launching bug reporter
Obtained 48 stack frames.
#0  0x0000009149c9f4 in memmove$VARIANT$sse42
#1  0x0000000470d7a7 in ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged
#2  0x0000001116b73f in  (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_to_unmanaged (System.Array,int,intptr,int) + 0x57 (0x1116b6e8 0x1116b792) [0x6707a80 - Unity Child Domain]
#3  0x0000001116b6c3 in  System.Runtime.InteropServices.Marshal:Copy (byte[],int,intptr,int) + 0x33 (0x1116b690 0x1116b6da) [0x6707a80 - Unity Child Domain]
#4  0x0000001116aa6a in  NetMQ.zmq.Native.Opcode:Open () + 0x7a2 (0x1116a2c8 0x1116ab36) [0x6707a80 - Unity Child Domain]
#5  0x0000001116a1ce in  NetMQ.zmq.Clock:.cctor () + 0xf6 (0x1116a0d8 0x1116a2b9) [0x6707a80 - Unity Child Domain]
#6  0x0000000e708678 in  (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) + 0x88 (0xe7085f0 0xe708740) [0x6707a80 - Unity Child Domain]
#7  0x000000045f98c5 in mono_get_runtime_build_info
#8  0x0000000472c78b in mono_runtime_invoke
#9  0x0000000472cd4e in mono_runtime_class_init_full
#10 0x000000045f768f in mono_jit_compile_method
#11 0x000000045f68b5 in mono_jit_compile_method
#12 0x0000000472e3d4 in mono_compile_method
#13 0x000000046748be in mono_magic_trampoline
#14 0x0000000630d066 in mono_magic_trampoline
#15 0x00000011169171 in  NetMQ.zmq.SocketBase:Bind (string) + 0xc1 (0x111690b0 0x11169ae1) [0x6707a80 - Unity Child Domain]
#16 0x00000011169010 in  NetMQ.zmq.ZMQ:Bind (NetMQ.zmq.SocketBase,string) + 0xa8 (0x11168f68 0x11169027) [0x6707a80 - Unity Child Domain]
#17 0x00000011168f3f in  NetMQ.NetMQSocket:Bind (string) + 0x37 (0x11168f08 0x11168f56) [0x6707a80 - Unity Child Domain]
#18 0x000000171fea3e in  TestNetMQ:Start () + 0x8e (0x171fe9b0 0x171fed3c) [0x6707a80 - Unity Child Domain]

I'll have to try some builds on windows and linux as well. @Taboen what platform was your unity build for?

from netmq.

DirkBroenink avatar DirkBroenink commented on August 19, 2024

@MSylvia My Unity build was compiled for Windows 7.

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

I had created an update to NetMq that allowed for .NET 3.5 compatibility - did it not make it into the project? (sorry - I've been overseas for most of this past year). It was no small amount of work to do.
Yes, it did require a separate project file for 3.5, and 4.0. And (looking at some of your other comments above) if we do not use conditional-compilation within the source-code, and instead have two separate sets of code (one for 3.5, and one for 4.0) then you award yourself with the responsibility of keeping two code-bases in-sync, which I submit is a pain and not worth it. As much as it [would seem to] complicate the code where you see those conditional-compilation pragmas, in reality it was not in that many places, and it means all the rest of the code can be in one set of files. That, is what it is meant for, and I suggest we use it. I suggested (and followed) the convention that every conditional-compilation pragma be listed within the design documentation, and at the top of every source-code file where it is used. It became even more desirable when I also created a version for Windows Store apps, which lamentably involves a rather massive change in, for example, the sockets API.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

@JamesWHurst can you solve the merge conflicts on the pull request? let me
know when you did and I will merge it.

On Tue, Jul 29, 2014 at 9:48 AM, James Hurst [email protected]
wrote:

I had created an update to NetMq that allowed for .NET 3.5 compatibility -
did it not make it into the project? (sorry - I've been overseas for most
of this past year). It was no small amount of work to do.
Yes, it did require a separate project file for 3.5, and 4.0. And (looking
at some of your other comments above) if we do not use
conditional-compilation within the source-code, and instead have two
separate sets of code (one for 3.5, and one for 4.0) then you award
yourself with the responsibility of keeping two code-bases in-sync, which I
submit is a pain and not worth it. As much as it [would seem to] complicate
the code where you see those conditional-compilation pragmas, in reality it
was not in that many places, and it means all the rest of the code can be
in one set of files. That, is what it is meant for, and I suggest we use
it. I suggested (and followed) the convention that every
conditional-compilation pragma be listed within the design documentation,
and at the top of every source-code file where it is used. It became even
more desirable when I also created a version for Windows Store apps, which
lamentably involves a rather massive change in, for example, the sockets A
PI.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

martinjo avatar martinjo commented on August 19, 2024

Did anyone get netmq to work in Unity3D on OS X or iOS?

When I debug in Uniy, it randomly hangs when creating my first context ( NetMQContext.Create(); ) and I'm not sure how to proceed to debug it further...

from netmq.

martinjo avatar martinjo commented on August 19, 2024

I managed to get the inproc-communication working in Unity3d (on OSX) by changing "Mono.Posix."... to "Mono.Unix" in opcode.cs.

Tcp connections are still not working though, and it's near impossible to debug since Unity3d constantly hangs while trying.

Any suggestions about this? I tried the code in Xamarin studio (using mono 3.6) and it works perfectly with tcp there...

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

I'm also having the same issue with Netmq on OSX, specifically inside Unity. I've been running the .NET35 compatibility branch without issue for around half a year now on Windows but attempting to send a message through any socket (without noWait) will hang Unity indefinitely on OSX.

from netmq.

krisrok avatar krisrok commented on August 19, 2024

ah what a pity. i'm currently researching for a communication backbone of an upcoming project and thought i'd finally found it - until reading through the thread just now.

as we plan to target unity at some point i hope there is still someone hearing our pleas :)

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

I've been working through merge conflicts for porting this patch to the current master branch but it's still hanging on Unity in OSX. It will run standalone in Mono properly but either the Reaper or IO threads will freeze in Unity. It's been hard to debug since the C# code has to be run from inside Unity directly else the debugger just merrily skips over code in a DLL.

from netmq.

krisrok avatar krisrok commented on August 19, 2024

@Mystfit have you tried the other guy's pull request with mono/osx? and from your other comment i assume you had success on unity/win with this one?

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

@krisrok I've been using @JamesWHurst 3.5 compatibility patch in Unity from January onward and it's been fine in Windows. I experimented with applying this patch in OSX only recently, but had no luck with either versions. I haven't tried this patch in Windows yet.

I tracked down one of my thread hangs to one of these three lines where MonoDevelop and Unity would become unresponsive. I think that it happens in one of the IO Threads but I'm having a hard time determining if that's the case.

from netmq.

fredrikm avatar fredrikm commented on August 19, 2024

Hi guys/girls.
I managed to get https://github.com/PSG-Luna/netmq 3.5 port running under Win32, Android, OSX and iOS on Unity 4.5.3f3.
The fork is located at https://github.com/fredrikm/netmq

It seems a difference in Socket.Select were the main culprit for not getting TCP working on OSX and iOS but a workaround is added.

It's still a bit early to say if there are problems remaining but i tested two scenarios using PUB/SUB and PUSH/PULL where I managed to run and correctly shut them down using both Inproc and TCP communication.

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

@fredrikm can you please test that it indeed solves the issue and create a patch for it?

@Mystfit it seems rather odd that Mono would hang on the "ToArray" method. Could you please try replacing the ToArray call with something like (of the top of my head):

private function Socket[] ToSocketArray(IEnumerable sockets) {
var items = new Socket[sockets.Length];
var i = 0;
foreach(var s in sockets) {
items[i++] = s;
}
return items;
}

from netmq.

fredrikm avatar fredrikm commented on August 19, 2024

@reiroldan I think creating a patch for the main NetMQ repo won't do much good since that repo only works with .NET 4.0 and up if I'm not mistaken and thus does not work out of the box in Unity anyway?

The Socket.Select() difference is only a problem for Mono version < 2.8 (Unity is based off 2.6 or some unofficial 2.7 I think but they will most likely never upgrade).

The workaround for the Select behaviour is just a couple of lines in 2 files (although whitespace difference shows the commit diff to look a lot bigger).

Link to diff ignoring whitespace:
fredrikm@b886387?w=1

Not sure what the best approach would be to continue?
In the end I guess what we want is a NetMQ version that works with Unity's Mono, that means a branch/fork for .NET 3.5 that targets the very old Mono Unity uses.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

Seeing as the patch would allow a 3.5 and 4.0 version with largely the same
codebase, why not merge it into the main repo anyway ?

On Fri, Oct 24, 2014 at 1:24 PM, Fredrik MΓ€kelΓ€inen <
[email protected]> wrote:

@reiroldan https://github.com/reiroldan I think creating a patch for
the main NetMQ repo won't do much good since that repo only works with .NET
4.0 and up if I'm not mistaken and thus does not work out of the box in
Unity anyway?

The Socket.Select() difference is only a problem for Mono version < 2.8
(Unity is based off 2.6 or some unofficial 2.7 I think but they will most
likely never upgrade).

The workaround for the Select behaviour is just a couple of lines in 2
files (although whitespace difference shows the commit diff to look a lot
bigger).

Link to diff ignoring whitespace:

fredrikm@b886387?w=1

Not sure what the best approach would be to continue?
In the end I guess what we want is a NetMQ version that works with Unity's
Mono, that means a branch/fork for .NET 3.5 that targets the very old Mono
Unity uses.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

Which makes sense of course! The easiest way to handle differences here is just to use conditional compilation flags (ala pragma). There are so few changes needed to make it 3.5 compatible, that it would really just boil down to that.

from netmq.

fredrikm avatar fredrikm commented on August 19, 2024

I would love to see the main repo with not only 3.5 support but also support for the "old" version of Mono which Unity uses.
The Socket.Select behaviour for ex, is only a problem with very old versions of Mono on iOS/OSX but maybe those specific workarounds should also make use of preprocessor directives?

It seems the work for 3.5 compatibility is (almost) done but hasn't been pulled in yet?
#114
#103

If any of those gets pulled I can base the OSX/iOS fixes off the main repo instead and start testing.

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

@fredrikm I've brought your changes in line with the master branch, everything still works (more or less) so I'm wondering if I should put through a pull request? https://github.com/Mystfit/netmq/tree/net35-osx

I'm a bit nervous about some of my hack-and-slash merge conflict fixes. I attempted to run through the Net 4.5 unit tests but kept failing on NetMQ.Tests.PgmTests.BindBothSockets with "System.Net.Sockets.SocketException (0x80004005): The support for the specified socket type does not exist in this address family". Can anyone let me know if they have the same problem?

from netmq.

tobi-tobsen avatar tobi-tobsen commented on August 19, 2024

@Mystfit Not sure about osx, but you have to install the MSMQ windows component to get PGM socket support in windows. You also have to start the unittestrunner / visualstudio with admin previledges in order to sucessfully run the tests.

from netmq.

fredrikm avatar fredrikm commented on August 19, 2024

@Mystfit Nice! I'll be using your fork from now on then. Hopefully getting Unity support in the master branch isn't to far away now.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

Happy to see my work from so long ago helped out :)

On Mon, Oct 27, 2014 at 8:26 AM, Fredrik MΓ€kelΓ€inen <
[email protected]> wrote:

@Mystfit https://github.com/mystfit Nice! I'll be using your fork from
now on then. Hopefully getting Unity support in the master branch isn't to
far away now.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

JamesWHurst avatar JamesWHurst commented on August 19, 2024

Did my .NET-3.5 compatibility edits ever get folded into the main branch, that I did last year? Sorry I'm not a frequent-enough user of Github to know how to tell.

from netmq.

luna-duclos avatar luna-duclos commented on August 19, 2024

Neither of our fixes did

On Tue, Oct 28, 2014 at 2:26 AM, James Hurst [email protected]
wrote:

Did my .NET-3.5 compatibility edits ever get folded into the main branch,
that I did last year? Sorry I'm not a frequent-enough user of Github to
know how to tell.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

I've restored a bunch of stuff that I really shouldn't have removed whilst I was fixing the merge conflicts (sorry dual sockets!). I've now got every unit test running on Windows 7 except for Unbind("tcp"). I'm currently getting a failed assertion on this line and I'm not sure if it's normal behavior. I've also restored NetMQScheduler to its correct project location since I'm an idiot and didn't realize that @PSG-Luna had added the TPL library as a package. Whoops.

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

@PSG-Luna / @JamesWHurst unless you actually say your pull request is ready, it's hard to tell when/if they are ready. There have been alot of patch requests, with changes added midway and instead of just pulling in all requests, the owner says right, this is ready, pull. That, or really, create the pull request when the functionality is written and tested.

I'm not pushing anyone down, nor rejecting anyone's work here, nor pulling any names, just trying to keep the library as lean/clean as we can. <3

from netmq.

krisrok avatar krisrok commented on August 19, 2024

@Mystfit there has been a commit yesterday addressing an unbind-related issue, maybe that has anything to do with the failed test?

and to all of you, i'm really happy to see it's actively moving forward again, thanks! πŸ‘

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

@krisrok We try, it's just hard to test all cases, for example the unity integration and mac issues. I can run the tests for win/lin but I don't have a mac to play around with.

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

Just tested with Mono 3.10 on OSX, unit tests that failed were anything involving PGM or NetMQBeacon. MonitorPollTest failed on this line. Everything else passed.

Unity is running Mono 2.10.11 which is lacking DotNet 4.5 support so I haven't been able to run the unit tests in there yet. I think I'll make a separate project for DotNet 3.5 tests.

Unity integration still works.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

My take on the 3.5 issue, you can take a look here:
https://github.com/somdoron/NetMQ/tree/DotNet3.5

It is based on the latest master of NetMQ and ready to be merged. The
change to existing code is very minimal (
somdoron@50be863
).

I added a new project for dotNet 3.5 that doesn't include anything that
uses dotNet 4.0, which are:

  • Security
  • Devices
  • Scheduler
  • Actor
  • Beacon

With some more work we can also add all of those later (the 3.5 will
reference parallel extensions and some code changes).

I tested it on windows, if someone can test on OSX and linux that will be
great.

Let me know if you are happy with this and I will add a pull request.

On Tue, Oct 28, 2014 at 11:58 AM, Mystfit [email protected] wrote:

Just tested with Mono 3.10 on OSX, unit tests that failed were anything
involving PGM or NetMQBeacon. MonitorPollTest failed on this line
https://github.com/Mystfit/netmq/blob/93a889dcd251adf6af76b37721c4f2c6daed6228/src/NetMQ.Tests/MonitorPollTests.cs#L114.
Everything else passed.

Unity is running Mono 2.10.11 which is lacking DotNet 4.5 support so I
haven't been able to run the unit tests in there yet. I think I'll make a
separate project for DotNet 3.5 tests.

Unity integration still works.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

@somdoron I think this is the cleanest approach so far and will also make a good base for applying the OSX fixes from @fredrikm on top of. I'll test it out tomorrow on OSX.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

3.5 support merged to the repository, compile the NetMQ3.5 project in the solution.
@Mystfit or @fredrikm if you find a way to check the mono version from code add the OSX fix.

Next nuget release will include the 3.5 project.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

As master now supports dotnet3.5 i'm closing the issue

from netmq.

krisrok avatar krisrok commented on August 19, 2024

@somdoron, thank you and everyone here! i'm really looking forward to use the library, starting one week from now.

just one more thing: did you take a look at the proposed ios fix/workaround? is it worth implementing as well? or is there a cleaner another approach? i think i already know the answer since you don't have osx, but well :)

from netmq.

somdoron avatar somdoron commented on August 19, 2024

If some can send the pull request for the osx fix that will be great, I
suggest checking that in the code check if it running on OSX and only than
apply the workaround.

Also with IOCP I think it fix might not be needed.

Anyway if you need the osx check fork the project and apply the patch.

On Sun, Nov 2, 2014 at 7:06 PM, krisrok [email protected] wrote:

@somdoron https://github.com/somdoron, thank you and everyone here! i'm
really looking forward to use the library, starting one week from now.

just one more thing: did you take a look at the proposed ios
fix/workaround? is it worth implementing as well? or is there a cleaner
another approach? i think i already know the answer since you don't have
osx, but well :)

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

hmmmm... downloaded the newest src and built it in VS 2013. Copied the 3.5 bin dlls to Unity Assets file.

Builds ok in Unity MonoDevelop, but when I run it in Unity I get the following error:

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in :0

at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0

at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0

at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0

at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0

at Mono.CSharp.Driver.Compile () [0x00000] in :0

at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0

from netmq.

reiroldan avatar reiroldan commented on August 19, 2024

@memetic007 could it be that you compiled/copied the 64bit dlls?

from netmq.

somdoron avatar somdoron commented on August 19, 2024

@memetic007 from the exception it is not clear from where it is thrown, can
you try to provide more information?

On Thu, Nov 13, 2014 at 10:49 AM, Rei Roldan [email protected]
wrote:

@memetic007 https://github.com/memetic007 could it be that you
compiled/copied the 64bit dlls?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

somdoron avatar somdoron commented on August 19, 2024

@memetic007 try also to compile AsyncIO on mono as well, I think it might
solve it (you may want to not include the windows specific files)

On Thu, Nov 13, 2014 at 1:21 PM, Doron Somech [email protected] wrote:

@memetic007 from the exception it is not clear from where it is thrown,
can you try to provide more information?

On Thu, Nov 13, 2014 at 10:49 AM, Rei Roldan [email protected]
wrote:

@memetic007 https://github.com/memetic007 could it be that you
compiled/copied the 64bit dlls?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

I might well have built it as 64bit.... as that is my VS default. let me try building it as 32bit.

from netmq.

Mystfit avatar Mystfit commented on August 19, 2024

@memetic007 Check your architecture underneath Build Settings in Unity as well. I think by default Unity builds as x86.

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

yes, my Unity build setting is x86

I rebuilt the net35 version of NetMQ, upgraded to UnityPro (to eliminate that as an issue), and while eliminating the previous error, now have the following error when i run the script in Unity:

FormatException: Invalid format for Guid.Guid(string).
System.Guid+GuidParser.ThrowFormatException () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:94)
System.Guid+GuidParser.ParseChar (Char c) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:150)
System.Guid+GuidParser.ParseGuid2 () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:216)
System.Guid+GuidParser.Parse () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:244)
System.Guid..ctor (System.String g) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:294)
AsyncIO.Windows.UnsafeMethods..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for AsyncIO.Windows.UnsafeMethods
AsyncIO.CompletionPort.Create ()
NetMQ.zmq.Utils.Proactor..ctor (System.String name)
NetMQ.zmq.IOThread..ctor (NetMQ.zmq.Ctx ctx, Int32 threadId)
NetMQ.zmq.Ctx.CreateSocket (ZmqSocketType type)
NetMQ.NetMQContext.CreateHandle (ZmqSocketType socketType)
NetMQ.NetMQContext.CreatePushSocket ()
zeromqtest.Start () (at Assets/zeromqtest.cs:17)

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Try to run the following code before creating the context:

ForceDotNet.Force();

It tells AsyncIO to use dotNet instead of non native.

On Tue, Nov 18, 2014 at 7:21 PM, Jim Rutt [email protected] wrote:

yes, my Unity build setting is x86

I rebuilt the net35 version of NetMQ, upgraded to UnityPro (to eliminate
that as an issue), and while eliminating the previous error, now have the
following error when i run the script in Unity:

FormatException: Invalid format for Guid.Guid(string).
System.Guid+GuidParser.ThrowFormatException () (at
/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:94)
System.Guid+GuidParser.ParseChar (Char c) (at
/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:150)
System.Guid+GuidParser.ParseGuid2 () (at
/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:216)
System.Guid+GuidParser.Parse () (at
/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:244)
System.Guid..ctor (System.String g) (at
/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Guid.cs:294)
AsyncIO.Windows.UnsafeMethods..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the
type initializer for AsyncIO.Windows.UnsafeMethods
AsyncIO.CompletionPort.Create ()
NetMQ.zmq.Utils.Proactor..ctor (System.String name)
NetMQ.zmq.IOThread..ctor (NetMQ.zmq.Ctx ctx, Int32 threadId)
NetMQ.zmq.Ctx.CreateSocket (ZmqSocketType type)
NetMQ.NetMQContext.CreateHandle (ZmqSocketType socketType)
NetMQ.NetMQContext.CreatePushSocket ()
zeromqtest.Start () (at Assets/zeromqtest.cs:17)

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

ForceDotNet.Force();

hangs Unity so bad I needed to use Task Manager to kill it.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Can you provide more information? where is it hang?

On Tue, Nov 18, 2014 at 7:53 PM, Jim Rutt [email protected] wrote:

ForceDotNet.Force();

hangs Unity so bad I needed to use Task Manager to kill it.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

somdoron avatar somdoron commented on August 19, 2024

You can use following repository with AsyncIO until issue solved:

https://github.com/somdoron/netmq/tree/DotNet3.5

However if you can help solving it by providing more information that will
be great.

On Tue, Nov 18, 2014 at 7:56 PM, Doron Somech [email protected] wrote:

Can you provide more information? where is it hang?

On Tue, Nov 18, 2014 at 7:53 PM, Jim Rutt [email protected]
wrote:

ForceDotNet.Force();

hangs Unity so bad I needed to use Task Manager to kill it.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

atypically for Unity it hangs even before a debug statement is displayed:
Here are the first few lines of code:

void Start () {
{

        Debug.Log("starting in Test NetMQ V2.04 ");
        ForceDotNet.Force();
        using (var context = NetMQContext.Create())

....

from netmq.

somdoron avatar somdoron commented on August 19, 2024

so it hangs before even calling the method?

On Tue, Nov 18, 2014 at 8:01 PM, Jim Rutt [email protected] wrote:

atypically for Unity it hangs even before a debug statement is displayed:
Here are the first few lines of code:

void Start () {
{

    Debug.Log("starting in Test NetMQ V2.04 ");
    ForceDotNet.Force();
    using (var context = NetMQContext.Create())

....

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Can you build the AsyncIO.Unity from:

https://github.com/somdoron/AsyncIO

and use that instead the file from nuget

On Tue, Nov 18, 2014 at 8:06 PM, Doron Somech [email protected] wrote:

so it hangs before even calling the method?

On Tue, Nov 18, 2014 at 8:01 PM, Jim Rutt [email protected]
wrote:

atypically for Unity it hangs even before a debug statement is displayed:
Here are the first few lines of code:

void Start () {
{

    Debug.Log("starting in Test NetMQ V2.04 ");
    ForceDotNet.Force();
    using (var context = NetMQContext.Create())

....

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

Looks like we crossed messages ..... i went ahead and built AsyncIO https://github.com/somdoron/AsyncIO, pulled the 3.5 AsyncIO.dll into the Unity Project and it appears to work! At least it complies and runs in Unity. Now to get my server back up and see if it actually works.....

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Great. On next nuget release will include Unity package.

On Tue, Nov 18, 2014 at 8:40 PM, Jim Rutt [email protected] wrote:

Looks like we crossed messages ..... i went ahead and built AsyncIO
https://github.com/somdoron/AsyncIO, pulled the 3.5 AsyncIO.dll into the
Unity Project and it appears to work! At least it complies and runs in
Unity. Now to get my server back up and see if it actually works.....

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

Have verified successful sending of messages from Unity 4.55 C# script, to a .net 4.5 C# server using NetMQ.

Thanks!

BTW, even with the 3.5 version of AsyncIO, without "ForceDotNet.Force();" it throws the guid exception.

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Use the AsyncIO.Unity project (it's new, so pull it), you won't need the
force dotNet
On Nov 18, 2014 11:18 AM, "Jim Rutt" [email protected] wrote:

Have verified successful sending of messages from Unity 4.55 C# script, to
a .net 4.5 C# server using NetMQ.

Thanks!

BTW, even with the 3.5 version of AsyncIO, without "ForceDotNet.Force();"
it throws the guid exception.

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

tried the AsyncIO.unity (getting the dll from from bin\3.5) and it still requires "ForceDotNet.Force();"

from netmq.

somdoron avatar somdoron commented on August 19, 2024

You need to get it from bin\Unity

On Tue, Nov 18, 2014 at 11:40 PM, Jim Rutt [email protected] wrote:

tried the AsyncIO.unity (getting the dll from from bin\3.5) and it still
requires "ForceDotNet.Force();"

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

memetic007 avatar memetic007 commented on August 19, 2024

ok, that worked. What is the purpose for the bin\3.5 dlls?

from netmq.

somdoron avatar somdoron commented on August 19, 2024

the difference between the 3.5 and unity is that 3.5 will use pinvoke on
windows, unity will always use dotnet implementation. So if someone need
3.5 not for unity and using windows will benefit from 3.5.

On Wed, Nov 19, 2014 at 12:00 AM, Jim Rutt [email protected] wrote:

ok, that worked. What is the purpose for the bin\3.5 dlls?

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

billyhct avatar billyhct commented on August 19, 2024

Hi memetic007
may you provide a sample project of unity to send zmq message to server?
I have tried but there is no message reaching server in my case.

I use pub/sub sockets.

Thanks
Billy

from netmq.

somdoron avatar somdoron commented on August 19, 2024

Billy you might want to send the code, I think we be able to help.
On Nov 21, 2014 6:09 AM, "billyhct" [email protected] wrote:

Hi memetic007
may you provide a sample project of unity to send zmq message to server?
I have tried but there is no message reaching server in my case.

I use pub/sub sockets.

Thanks
Billy

β€”
Reply to this email directly or view it on GitHub
#98 (comment).

from netmq.

billyhct avatar billyhct commented on August 19, 2024

Somdoron,

I download the zip file from https://github.com/somdoron/NetMQ/tree/DotNet3.5.
and add to Unity3d project.

When I use the 3.5 ver with Unity3d, it cannot compile that:

  1. System.Collections.concurrent is not found.
  2. ZError's thread local cannot be found
  3. Mutex.openExisting cannot be found

Could you send me a copy of a simple Unity3d project with netmq?
Thank you very much.

from netmq.

martinjo avatar martinjo commented on August 19, 2024

Billyhct,

Do you use client profile:.Net 2.0 subset? Netmq seems to need the full runtime to work...

from netmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.