Compiling FlaME under mono

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Yeah, the signature errors are gone :) Just one mysterious error remains:

Code: Select all

~/flaME - MonoDevelop/flaME/ctrlMapView.vb (3145,38) : Error VBNC99999: <no message written yet>
The code fragment:

Code: Select all

    Sub OpenGL_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs)
        If Form.ActiveForm Is frmMain Then                     ' <-- the error is here
            OpenGL.Focus()
        End If
    End Sub
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Oops, we have a fail. Once i just remove this code fragment, he returns to the CType and gives me the same "Can't convert" errors.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

EDIT:
thought about it some more, you could try

Code: Select all

If Form.ActiveForm Is My.Forms.frmMain Then
but even if that work, i think the change you made in the application.designer will make a whole load of errors at runtime at least, but if we fix all of them then it might work.

the problem with converting to the pointer seems like a problem with MonoDevelop in Linux, or some option is making it too strict and not allowing the conversion?
Last edited by Flail13 on 03 Apr 2011, 11:17, edited 1 time in total.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

DirectCast worked for me, and i finally compiled it (with the VBNC99999 error commented out). Crash:

Code: Select all

Unhandled Exception: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x0009d] in /build/src/mono-2.10.1/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:220 
  at System.Drawing.Bitmap..ctor (System.String filename, Boolean useIcm) [0x00034] in /build/src/mono-2.10.1/mcs/class/System.Drawing/System.Drawing/Bitmap.cs:129 
  at System.Drawing.Bitmap..ctor (System.String filename) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (string)
  at flaME.frmMain..ctor () [0x01312] in ~/flaME - MonoDevelop/flaME/frmMain.vb:630 
  at (wrapper remoting-invoke-with-check) flaME.frmMain:.ctor ()
  at flaME.My.MyApplication.OnCreateMainForm () [0x00000] in ~/flaME - MonoDevelop/flaME/My Project/Application.Designer.vb:35 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x0000f] in /build/src/mono-basic-2.10/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.vb:191 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in /build/src/mono-basic-2.10/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.vb:78 
  at flaME.My.MyApplication.Main (System.String[] Args) [0x0000b] in ~/flaME - MonoDevelop/flaME/[MyGenerator]:12 
The application was terminated by a signal: SIGHUP
edit: so this is probably the separator issue (?)
edit: yay, after fixing the "\" to "/", i see the main window! (it still crashes though)
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

that could be a slash error, since it came from line 630 in frmMain.

Code: Select all

Me.btnTextureFlipX.Image = New Bitmap(InterfaceImagesPath & "selectionflipx.png")
InterfaceImagesPath is given a backslash at its end, on declaration.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Yeah, i'm through the slashes already. Here's the next crash:

Code: Select all

System.InvalidProgramException: Invalid IL code in flaME.frmMain:frmMain_Load (object,System.EventArgs): IL_0008: callvirt  0x0a00020d


  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 

Unhandled Exception: System.InvalidProgramException: Invalid IL code in flaME.frmMain:tmrKey_Tick (object,System.EventArgs): IL_019f: callvirt  0x0600014b


  at System.Windows.Forms.Timer.OnTick (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Timer.FireTick () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Timer:FireTick ()
  at System.Windows.Forms.XplatUIX11.CheckTimers (System.Collections.ArrayList timers, DateTime now) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue, Boolean allowIdle) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.MessageBox+MessageBoxForm.RunDialog () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox/MessageBoxForm:RunDialog ()
  at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.Interaction.MsgBox (System.Object Prompt, MsgBoxStyle Button, System.Object Title) [0x00000] in <filename unknown>:0 
  at flaME.frmMain.frmMain_FormClosing (System.Object sender, System.Windows.Forms.FormClosingEventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.FireClosingEvents (CloseReason reason, Boolean cancel) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:FireClosingEvents (System.Windows.Forms.CloseReason,bool)
  at System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Exit () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.OnThreadException (System.Exception t) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnCreateControl () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.CreateControl () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool)
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0 
  at flaME.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0 
I manage to see the main window for a moment this time.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

does the splash screen show up, or is it a quick flash of the main form without it?
if it doesnt make it to the splash screen, the problem could be frmSplash.Show() in frmMain_Load.
seemed like you couldn't refer to frmMain as an instance, so maybe you can't refer to any of the other forms either?

is it practical to be making this many changes to flaME? who will maintain it?
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

I removed the splash and it went further.
Now, in lines like `Me.btnTextureFlipX.Image = New Bitmap(InterfaceImagesPath & "/selectionflipx.png")' the slash is redundant and causes a crash. No, it doesn't, sorry, never mind.

is it practical to be making this many changes to flaME? who will maintain it?
In the case of success, probably you just keep doing what you always did, and i just make linux/mac builds from time to time, sometimes asking new questions in this thread, unless someone else will come up, or we manage to make a cross-platform source after all.
Anyway, i'm still curious about DirectCast issue. How come it gives errors to you, when, as far as i understand, it shouldn't check the types at all in compile-time?
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

The next crash:

Code: Select all

Unhandled Exception: System.InvalidProgramException: Invalid IL code in flaME.frmMain:tmrKey_Tick (object,System.EventArgs): IL_019f: callvirt  0x0600014b


  at System.Windows.Forms.Timer.OnTick (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Timer.FireTick () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Timer:FireTick ()
  at System.Windows.Forms.XplatUIX11.CheckTimers (System.Collections.ArrayList timers, DateTime now) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue, Boolean allowIdle) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0 
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0 
  at flaME.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0 
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

seems like the same error as before. im out for today.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Flail13 wrote:seems like the same error as before. im out for today.
Really, lol! (:
Ok, i'm still trying to figure it out. :roll:
User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA

Re: Compiling FlaME under mono

Post by macuser »

OH wow..... i wish i had gotten here sooner. LOL DONT COMPILE ON MONO. Compile on windows and run on mono. As long as we have the source for VB.NET 2008 and not 2010 it should work with these modified:

1. Change all "\" to "/" that refer to a path/filename
2. Include all libraries with the compiled binary
3. Any other errors resulting from more changes I will look at myself
4. I forget the rest...

Then on mac/linux with mono type:

Code: Select all

root@homecomputer# sudo mono --debug "pathtoflame.exe"
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Compiling FlaME under mono

Post by cybersphinx »

Why sudo? On a properly set up system it should work without.
User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA

Re: Compiling FlaME under mono

Post by macuser »

Just in case
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

In any case, using sudo when you're already root ... :|
Ok, i'll try again tomorrow! (: