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

Can't get it working on Ubuntu 16.04.1 #53

Closed
wouterh-dev opened this issue Feb 1, 2017 · 11 comments · May be fixed by #117
Closed

Can't get it working on Ubuntu 16.04.1 #53

wouterh-dev opened this issue Feb 1, 2017 · 11 comments · May be fixed by #117

Comments

@wouterh-dev
Copy link

wouterh-dev commented Feb 1, 2017

First of all the releases are msi files which make them hard to use with mono. Seems no way to run them.

I've both tried with the mono that comes with my distribution and xamarin mono and the results are the same. When trying to run the extracted .exe I get (libmono-system-windows-forms4.0-cil is installed):

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'StopWatch.NativeMethods' threw an exception. ---> System.EntryPointNotFoundException: RegisterWindowMessage
  at (wrapper managed-to-native) StopWatch.NativeMethods:RegisterWindowMessage (string)
  at StopWatch.NativeMethods..cctor () <0x40b525e0 + 0x00013> in <filename unknown>:0 
  --- End of inner exception stack trace ---
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'StopWatch.NativeMethods' threw an exception. ---> System.EntryPointNotFoundException: RegisterWindowMessage
  at (wrapper managed-to-native) StopWatch.NativeMethods:RegisterWindowMessage (string)
  at StopWatch.NativeMethods..cctor () <0x40b525e0 + 0x00013> in <filename unknown>:0 
  --- End of inner exception stack trace ---

So then I tried compiling, but this gives me:

/home/ubuntu/jirastopwatch/StopWatch.sln (default targets) ->
(Build target) ->
/home/ubuntu/jirastopwatch/source/StopWatch/StopWatch.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (GenerateResources target) ->

	/usr/lib/mono/4.5/Microsoft.Common.targets: error : Tool exited with code: 1. Output: Error: Exception has been thrown by the target of an invocation.
Inner exception: AND data length expected 512, read 0
Parameter name: stream

Any thoughts?

@carstengehling
Copy link
Collaborator

It's been a while since I last tried to compile it on my own Linux Mint. I will give it a go, as soon as I've found the time for it.

As for the releases: I only ship binaries for the Windows platform, since this is where I use 90% of my computer-time at the moment. But when I get it to compile again, I would very much like to partner up with someone who could do a .DEB package.

@wouterh-dev
Copy link
Author

Regarding the releases, just publishing an archive containing the .exe and required dll and files would probably be sufficient, no packaging really needed.

@carstengehling
Copy link
Collaborator

I've added a zip-file with just the binaries and no installer. Hope this helps: https://github.com/carstengehling/jirastopwatch/releases/latest

@wouterh-dev
Copy link
Author

wouterh-dev commented Feb 19, 2017

That is helpful, unfortunately it still seems to crash under both mono and wine.

Mono:

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'StopWatch.NativeMethods' threw an exception. ---> System.EntryPointNotFoundException: RegisterWindowMessage
  at (wrapper managed-to-native) StopWatch.NativeMethods:RegisterWindowMessage (string)
  at StopWatch.NativeMethods..cctor () <0x416935e0 + 0x00013> in <filename unknown>:0 
  --- End of inner exception stack trace ---
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'StopWatch.NativeMethods' threw an exception. ---> System.EntryPointNotFoundException: RegisterWindowMessage
  at (wrapper managed-to-native) StopWatch.NativeMethods:RegisterWindowMessage (string)
  at StopWatch.NativeMethods..cctor () <0x416935e0 + 0x00013> in <filename unknown>:0 
  --- End of inner exception stack trace ---

Wine (gets a bit further since a messagebox pops up informing of the error):

[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: AND data length expected 512, read 0
Parameter name: stream
  at System.Drawing.Icon.InitFromStreamWithSize (System.IO.Stream stream, Int32 width, Int32 height) [0x00000] in <filename unknown>:0 
  at System.Drawing.Icon..ctor (System.Runtime.Serialization.SerializationInfo info, StreamingContext context) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.ObjectRecord.LoadData (System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector selector, StreamingContext context) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader.ReadNonPredefinedValue (System.Type exp_type) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader.ReadValueVer2 (Int32 type_index) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader.LoadResourceValues (ResourceCacheItem[] store) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader+ResourceEnumerator.FillCache () [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader+ResourceEnumerator..ctor (System.Resources.ResourceReader readerToEnumerate) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceReader.GetEnumerator () [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceSet.ReadResources () [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceSet.GetObjectInternal (System.String name, Boolean ignoreCase) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceSet.GetObject (System.String name, Boolean ignoreCase) [0x00000] in <filename unknown>:0 
  at System.Resources.RuntimeResourceSet.GetObject (System.String name, Boolean ignoreCase) [0x00000] in <filename unknown>:0 
  at System.Resources.ResourceManager.GetObject (System.String name, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at StopWatch.Properties.Resources.get_login22 () [0x00000] in <filename unknown>:0 
  at StopWatch.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0 
  at StopWatch.MainForm..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) StopWatch.MainForm:.ctor ()
  at StopWatch.Program.Main () [0x00000] in <filename unknown>:0 

From what I can tell this is related to the loading of icons.

@wouterh-dev
Copy link
Author

I recently tried again on a CentOS box. This time, with mono, I'm getting errors regarding user32 at NativeMethods.cs which makes sense since mono does not support this.

Trying with wine gets me a bit further, the application shows a message box telling me to share the logfile, which contains:

4/14/2017 4:58:12 PM: Unhandled UI Exception
4/14/2017 4:58:12 PM: Exception has been thrown by the target of an invocation.
4/14/2017 4:58:12 PM:   at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0002f] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Reflection.RuntimeConstructorInfo.SerializationInvoke (System.Object target, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject (System.Object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) [0x00059] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.ObjectManager.FixupSpecialObject (System.Runtime.Serialization.ObjectHolder holder) [0x00088] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.ObjectManager.DoFixups () [0x0005a] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00077] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x000a2] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceReader.DeserializeObject (System.Int32 typeIndex) [0x00019] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceReader._LoadObjectV2 (System.Int32 pos, System.Resources.ResourceTypeCode& typeCode) [0x0035c] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceReader.LoadObjectV2 (System.Int32 pos, System.Resources.ResourceTypeCode& typeCode) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceReader.LoadObject (System.Int32 pos, System.Resources.ResourceTypeCode& typeCode) [0x00022] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.RuntimeResourceSet.GetObject (System.String key, System.Boolean ignoreCase, System.Boolean isString) [0x000be] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.RuntimeResourceSet.GetObject (System.String key, System.Boolean ignoreCase) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceManager.GetObject (System.String name, System.Globalization.CultureInfo culture, System.Boolean wrapUnmanagedMemStream) [0x0008e] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at System.Resources.ResourceManager.GetObject (System.String name) [0x00000] in <1c90db0b17cb4b1e827d577d0607b212>:0 
  at StopWatch.MainForm.InitializeComponent () [0x00382] in <c2bfbb5273a745fd87786bc8f369600e>:0 
  at StopWatch.MainForm..ctor () [0x000d1] in <c2bfbb5273a745fd87786bc8f369600e>:0 
  at (wrapper remoting-invoke-with-check) StopWatch.MainForm:.ctor ()
  at StopWatch.Program.Main () [0x00055] in <c2bfbb5273a745fd87786bc8f369600e>:0 

@JeeMo
Copy link

JeeMo commented Jul 7, 2017

I don't know if you had any further luck with this issue but I just got the following:

jeemo@Qosmio:~/Downloads/jirastopwatch-master/source/StopWatch$ mcs Program.cs
Program.cs(20,22): error CS0234: The type or namespace name Forms' does not exist in the namespace System.Windows'. Are you missing `System.Windows.Forms' assembly reference?
Compilation failed: 1 error(s), 0 warnings

  • Please note that while I am not a TOTAL newb with ubuntu, I've never heard of mono before JiraStopWatch so let me know if I am completely off-base.

Thanks!

@carstengehling
Copy link
Collaborator

Hi @JeeMo I think that you are missing the .NET SDK while compiling. I've never used mcs directly, only compiled using Xamarin Studios. Also you are trying to build just a single .CS file and not the entire project (StopWatch.csproj). The project file includes all the references needed.

I've not had time to work on the Linux/OSX compability for quite a while. My time is a bit limited at the moment.

@wouterh-dev
Copy link
Author

wouterh-dev commented Aug 16, 2017 via email

@carstengehling
Copy link
Collaborator

No but it also isn't going to be resolved by my hand. I simply haven't got the time. You can team up with @joseeloren on #95 and see if you can figure out a way to make it work.

@JeeMo
Copy link

JeeMo commented Aug 16, 2017

@carstengehling Thanks for the insights and the program. I also use it on win10 and really appreciate it.

@VladimirPal
Copy link

@wouterhund You can try another jira client - https://github.com/web-pal/chronos-timetracker it works on linux as well

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

Successfully merging a pull request may close this issue.

4 participants