tulleuchen / jirastopwatch

Not MORE timetracking - just EASIER timetracking
http://jirastopwatch.com
Apache License 2.0
141 stars 96 forks source link

Can't get it working on Ubuntu 16.04.1 #53

Closed wouterh-dev closed 7 years ago

wouterh-dev commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

carstengehling commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 namespaceSystem.Windows'. Are you missing `System.Windows.Forms' assembly reference? Compilation failed: 1 error(s), 0 warnings

Thanks!

carstengehling commented 7 years ago

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 commented 7 years ago

Why is this closed? Has the issue been resolved?

On Wed, 16 Aug 2017, 14:46 Carsten Gehling notifications@github.com wrote:

Closed #53 https://github.com/carstengehling/jirastopwatch/issues/53.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/carstengehling/jirastopwatch/issues/53#event-1208202509, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7nG08M-iVSUV5gRd_QNJCtsyep4Fliks5sYuSugaJpZM4LzX9r .

carstengehling commented 7 years ago

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 commented 7 years ago

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

VladimirPal commented 6 years ago

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