Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono Compatibility is Broken or Non-Existent? #76

Closed
suicvne opened this issue Jul 17, 2015 · 10 comments
Closed

Mono Compatibility is Broken or Non-Existent? #76

suicvne opened this issue Jul 17, 2015 · 10 comments
Assignees

Comments

@suicvne
Copy link

suicvne commented Jul 17, 2015

First, some system background. I'm running Debian 8.1 w/ KDE 4.14. MonoDevelop 5.9.4, the latest Mono from the Mono repositories (NOT Debian's) and the following Mono packages installed: mono-complete, mono-xsp, mono-xsp4. This is enough to get a simple sample up and running. The code sample is as follows (.NET console project in MonoDevelop, targetting "Mono/.Net 4.5"):
Output of mono --version:

Mono JIT compiler version 4.0.2 (Stable 4.0.2.5/c99aa0c Wed Jun 24 10:04:37 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen

I pull the latest IF.Lastfm from the official Nuget gallery in MonoDevelop.

using System;
using IF.Lastfm.Core.Api;
using IF.Lastfm.Core.Objects;

namespace LastfmTest
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            Console.WriteLine ("Hello World!");

            var lastfmClient = new LastfmClient ("", ""); //I put my proper keys in here of course
            var response = lastfmClient.User.GetRecentScrobbles ("mrmiketheripper", null, 0, 1);
            LastTrack lastTrack = response.Result.Content [0];

            Console.WriteLine ("{0} - {1}", lastTrack.Name, lastTrack.ArtistName);

            Console.ReadLine ();
        }
    }
}

Everything builds and compiles okay, but when I run it, literally nothing happens. My initial "Hello world!" isn't even shown.

snapshot13

I'm confused as to what's going on here. No errors shown or anything. Surroudning the code in a try-catch produces a similar result.

@rikkit
Copy link
Member

rikkit commented Jul 18, 2015

So you don't see "Hello world!" in the console window... this doesn't look like it's related to the library. Are you able to step through the code with the debugger?

I can't try out your setup right now, but I can test with my Ubuntu VM on Monday.

Re: general mono compatibility, I think @Zumicts has sucessfully run the library under Android, and I've used it under Mono on an Ubuntu server recently.

@haroldma-zz
Copy link
Contributor

If you're not getting the hello world the issue might be something else. Could you remove last.fm and just run the hello world?

@suicvne
Copy link
Author

suicvne commented Jul 19, 2015

Removing last.fm and just running the hello world produces no problems. @Zumicts

@rikkit
Copy link
Member

rikkit commented Jul 20, 2015

😕 I'll try and reproduce.

@suicvne
Copy link
Author

suicvne commented Jul 20, 2015

@rikkit thank you!

@rikkit rikkit self-assigned this Jul 20, 2015
@rikkit
Copy link
Member

rikkit commented Jul 27, 2015

@luigifan Just got back from holiday, sorry I didn't get a chance to test before I went.

I've tried to reproduce on Ubuntu 14.10 and I can't. I followed the setup instructions here. Then I installed mono-devel. Opening the solution, I found that the IF.Lastfm.Core project compiled fine, though checking the references I noticed that MonoDevelop "couldn't find .NETPortable subset" framework 4.5, profile 269, and I wasn't able to reference IF.Lastfm.Core from a new command line project. So I installed the referenceassemblies-pcl package - it's in the install notes but I missed it at first. The test program then worked (after restarting MonoDevelop).

screenshot from 2015-07-28 00 38 01

MonoDevelop didn't complain when referenceassemblies-pcl wasn't installed, so that makes me think this could be the problem. Can you check if you have that installed?

@suicvne
Copy link
Author

suicvne commented Jul 28, 2015

@rikkit I will verify this right now. Who's that guy who has such a good taste in music though? ;)

@suicvne
Copy link
Author

suicvne commented Jul 28, 2015

@rikkit I installed referenceassemblies-pcl and i'm still getting the same results where it just idles, not even a hello world. This is really weird.

@rikkit
Copy link
Member

rikkit commented Jul 28, 2015

Okay. So now the difference between our tests is that yours uses Nuget whereas I'm building from source... could be something wrong with the NuGet package? 😕 I'll test that tonight.

@suicvne
Copy link
Author

suicvne commented Jul 28, 2015

@rikkit okay thank you! if i have time today I will test from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants