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

Test Duality on MacOS #287

Closed
ilexp opened this issue Feb 14, 2016 · 32 comments
Closed

Test Duality on MacOS #287

ilexp opened this issue Feb 14, 2016 · 32 comments
Labels
Core Area: Duality runtime or launcher Help Wanted Contributions especially appreciated MacOS Platform: MacOS Task ToDo that's neither a Bug, nor a Feature
Milestone

Comments

@ilexp
Copy link
Member

ilexp commented Feb 14, 2016

Create a small project with Duality (or just use one of the sample projects) and check if it runs on MacOS using Mono. It will likely not - determine the breaking point and document it here, so it can be evaluated how to fix it.

This is specifically about launcher and core, not the editor.

Related: Issue #288

@ilexp ilexp added Task ToDo that's neither a Bug, nor a Feature Core Area: Duality runtime or launcher Help Wanted Contributions especially appreciated labels Feb 14, 2016
@ilexp ilexp added this to the General Improvements milestone Feb 14, 2016
@ilexp ilexp added the MacOS Platform: MacOS label Feb 17, 2016
@sappho192
Copy link

I've tested with my friend's MacBook Pro, and all the sample project(Input, Shader, Audio Handling) threw same error regarding System.Drawing.GDIPlus.

Following is the very error log.

[Core] ERR: TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
CallStack:
at System.Drawing.Icon.GetInternalBitmap () <0x11427a1e0 + 0x00040> in :0
at System.Drawing.Icon.ToBitmap () <0x11427a110 + 0x00027> in :0
at (wrapper remoting-invoke-with-check) System.Drawing.Icon:ToBitmap ()
at OpenTK.Platform.MacOS.CocoaNativeWindow.set_Icon (System.Drawing.Icon value) <0x114279e90 + 0x00051> in :0
at OpenTK.NativeWindow.set_Icon (System.Drawing.Icon value) <0x114279e40 + 0x00038> in :0
at Duality.Backend.DefaultOpenTK.NativeWindow..ctor (OpenTK.Graphics.GraphicsMode mode, Duality.Backend.WindowOptions options) <0x1131cbb60 + 0x009f8> in :0
at Duality.Backend.DefaultOpenTK.GraphicsBackend.Duality.Backend.IGraphicsBackend.CreateWindow (Duality.Backend.WindowOptions options) <0x1131cba80 + 0x0007b> in :0
at Duality.DualityApp.OpenWindow (Duality.Backend.WindowOptions options) <0x1131cb910 + 0x000b5> in :0
at Duality.Launcher.Program.Main (System.String[] args) <0x10b914dc0 + 0x00e2e> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () <0x11427a5c0 + 0x001d5> in :0
--- End of inner exception stack trace ---
at System.Drawing.Icon.GetInternalBitmap () <0x11427a1e0 + 0x00040> in :0
at System.Drawing.Icon.ToBitmap () <0x11427a110 + 0x00027> in :0
at (wrapper remoting-invoke-with-check) System.Drawing.Icon:ToBitmap ()
at OpenTK.Platform.MacOS.CocoaNativeWindow.set_Icon (System.Drawing.Icon value) <0x114279e90 + 0x00051> in :0
at OpenTK.NativeWindow.set_Icon (System.Drawing.Icon value) <0x114279e40 + 0x00038> in :0
at Duality.Backend.DefaultOpenTK.NativeWindow..ctor (OpenTK.Graphics.GraphicsMode mode, Duality.Backend.WindowOptions options) <0x1131cbb60 + 0x009f8> in :0
at Duality.Backend.DefaultOpenTK.GraphicsBackend.Duality.Backend.IGraphicsBackend.CreateWindow (Duality.Backend.WindowOptions options) <0x1131cba80 + 0x0007b> in :0
at Duality.DualityApp.OpenWindow (Duality.Backend.WindowOptions options) <0x1131cb910 + 0x000b5> in :0
at Duality.Launcher.Program.Main (System.String[] args) <0x10b914dc0 + 0x00e2e> in :0

You can check full log at following link.
https://gist.github.com/sappho192/b583c14ad851bc826551

@sappho192
Copy link

Plus, those project file are same thing which had been tested by my Ubuntu(Linux).

@ilexp
Copy link
Member Author

ilexp commented Feb 23, 2016

Thanks for testing!

Following is the very error log.

Hmm.. not sure what's happening here. Seems like there might be a problem with the underlying System.Drawing.Bitmap implementation, but this needs investigation. Any info on this appreciated if someone happens to know the issue.

Edit: Some links from a quick research on this:

@mika76
Copy link
Contributor

mika76 commented Apr 13, 2016

I just tested the gravity demo on my apple mac air and it worked perfectly. Mono ver 4.2.3 😄

@phrohdoh
Copy link

OS X 10.11.5
1.4 GHz Intel Core i5
4 GB 1600 MHz DDR3
Intel HD Graphics 5000 1536 MB

Mono JIT compiler version 4.4.0 (tarball Wed Jun 15 18:28:03 BST 2016)

I tested a SpaceInvaders sample I got from @RockyTV and got this:

[Core] Msg: Running DualityLauncher with flags: 
[Core] Msg: Using 'DefaultPluginLoader' to load plugins.
[Core] Msg: Scanning for core plugins...
[Core] Msg: Initializing ISystemBackend...
[Core] Msg:   Assembly loaded: NVorbis
[Core] Msg:   Assembly loaded: System.Xml.XDocument
[Core] Msg:   Assembly loaded: System.Xml.Linq
[Core] Msg:   Assembly loaded: System.Xml
[Core] Msg:   Assembly loaded: System.Linq.Expressions
[Core] Msg:   Assembly loaded: Anonymously Hosted DynamicMethods Assembly
[Core] Msg:   No system backend...
[Core] Msg: Assembly loaded: System.Threading
[Core] Msg: Assembly loaded: System.Text.RegularExpressions
[Core] Msg: Initializing IGraphicsBackend...
[Core] Msg:   No Graphics...
[Core] Msg: Initializing IAudioBackend...
[Core] Msg:   No Audio...
[Core] Msg: Initializing core plugins...
[Core] Msg: DualityApp initialized
            Debug Mode: False
            Command line arguments: 
[Core] Msg: Opening Window...
[Core] Msg: Initializing default content...
[Core] Msg:   Assembly loaded: System.Reflection.Extensions
[Core] ERR:   Unable to retrieve image codec for format 'image/png'. Can't initialize default Pixmap Resources.
[Core] Msg:   Assembly loaded: System.Xml.ReaderWriter
[Core] Msg:   Assembly loaded: System.Text.Encoding
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font' in object Id 129723834. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+GlyphData[]' in object Id 427169525. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Pixmap' in object Id 2035693768. Type not found.
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Rect]]' in object Id 2696347487. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Rect[]' in object Id 1485019246. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Drawing.PixelData]]' in object Id 847900448. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.PixelData[]' in object Id 855378517. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+RenderMode' in object Id 0. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.FontStyle' in object Id 0. Type not found.
[Core] ERR:   Can't load Font from 'Duality.Serialization.XmlSerializer', because an error occurred: 
              Exception: Loading Resource failed
              CallStack:
                at Duality.Resource.Load[T] (Duality.Serialization.Serializer formatter, System.String resPath, System.Action`1 loadCallback, Boolean initResource) <0x10e9eb380 + 0x000bf> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font' in object Id 129723834. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+GlyphData[]' in object Id 427169525. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Pixmap' in object Id 2035693768. Type not found.
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Rect]]' in object Id 2696347487. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Rect[]' in object Id 1485019246. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Drawing.PixelData]]' in object Id 847900448. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.PixelData[]' in object Id 855378517. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10ea058e0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x10e9fd910 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x10e9f7730 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+RenderMode' in object Id 0. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.FontStyle' in object Id 0. Type not found.
[Core] ERR:   Can't load Font from 'Duality.Serialization.XmlSerializer', because an error occurred: 
              Exception: Loading Resource failed
              CallStack:
                at Duality.Resource.Load[T] (Duality.Serialization.Serializer formatter, System.String resPath, System.Action`1 loadCallback, Boolean initResource) <0x10e9eb380 + 0x000bf> in <filename unknown>:0 
[Core] Msg:   ...done!
[Core] Msg: Assembly loaded: DualityPrimitives
[Core] Msg: Assembly loaded: DualityPrimitives

@ilexp
Copy link
Member Author

ilexp commented Jun 28, 2016

Looks like it didn't locate a single plugin, and potentially some other core binaries as well. What does your folder look like? Is the sample you tested available somewhere online?

@phrohdoh
Copy link

total 67696
drwx------  138 thill  staff      4692 Jun 28 16:29 ./
drwx------+  44 thill  staff      1496 Jun 28 16:30 ../
-rwxr-xr-x    1 thill  staff       975 Feb 15 19:07 AppData.dat*
-rwxr-xr-x    1 thill  staff      1157 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\BulletHit.Sound.res*
-rwxr-xr-x    1 thill  staff      1158 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\DangerLoop.Sound.res*
-rwxr-xr-x    1 thill  staff      7942 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\BulletHit.AudioData.res*
-rwxr-xr-x    1 thill  staff     42751 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\DangerLoop.AudioData.res*
-rwxr-xr-x    1 thill  staff     30194 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\DoorLoop.AudioData.res*
-rwxr-xr-x    1 thill  staff     27555 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\EngineLoop.AudioData.res*
-rwxr-xr-x    1 thill  staff     55291 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\Explosion.AudioData.res*
-rwxr-xr-x    1 thill  staff     13747 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\FireWeapon.AudioData.res*
-rwxr-xr-x    1 thill  staff     43245 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\FlightLoop1.AudioData.res*
-rwxr-xr-x    1 thill  staff     54604 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\FlightLoop2.AudioData.res*
-rwxr-xr-x    1 thill  staff     21519 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit.AudioData.res*
-rwxr-xr-x    1 thill  staff     12820 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit1.AudioData.res*
-rwxr-xr-x    1 thill  staff     13068 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit2.AudioData.res*
-rwxr-xr-x    1 thill  staff     13888 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit3.AudioData.res*
-rwxr-xr-x    1 thill  staff     12868 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit4.AudioData.res*
-rwxr-xr-x    1 thill  staff     14196 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit5.AudioData.res*
-rwxr-xr-x    1 thill  staff     12804 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\ObjectHit6.AudioData.res*
-rwxr-xr-x    1 thill  staff     40061 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Data\TriggerActivate.AudioData.res*
-rwxr-xr-x    1 thill  staff      1140 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\DoorLoop.Sound.res*
-rwxr-xr-x    1 thill  staff      1158 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\EngineLoop.Sound.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\Explosion.Sound.res*
-rwxr-xr-x    1 thill  staff      1142 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\FireWeapon1.Sound.res*
-rwxr-xr-x    1 thill  staff      1143 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\FireWeapon2.Sound.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\FlightLoop1.Sound.res*
-rwxr-xr-x    1 thill  staff      1139 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\FlightLoop2.Sound.res*
-rwxr-xr-x    1 thill  staff      1155 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\ObjectHit.Sound.res*
-rwxr-xr-x    1 thill  staff      1160 Feb 15 19:07 Data\DualStickSpaceShooter\Audio\TriggerActivate.Sound.res*
-rwxr-xr-x    1 thill  staff      1530 Feb 15 19:07 Data\DualStickSpaceShooter\Blueprints\ClaymoreEnemy.EnemyBlueprint.res*
-rwxr-xr-x    1 thill  staff       865 Feb 15 19:07 Data\DualStickSpaceShooter\Blueprints\ClaymoreShip.ShipBlueprint.res*
-rwxr-xr-x    1 thill  staff      1276 Feb 15 19:07 Data\DualStickSpaceShooter\Blueprints\PlayerShip.ShipBlueprint.res*
-rwxr-xr-x    1 thill  staff      1199 Feb 15 19:07 Data\DualStickSpaceShooter\Blueprints\RegularBullet.BulletBlueprint.res*
-rwxr-xr-x    1 thill  staff      1410 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AddWhite.Material.res*
-rwxr-xr-x    1 thill  staff      1613 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AlphaBubbles.Material.res*
-rwxr-xr-x    1 thill  staff      1604 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AlphaShards.Material.res*
-rwxr-xr-x    1 thill  staff       515 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AlphaThreshold.DrawTechnique.res*
-rwxr-xr-x    1 thill  staff       594 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AlphaThreshold.FragmentShader.res*
-rwxr-xr-x    1 thill  staff       550 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\AlphaThresholdProgram.ShaderProgram.res*
-rwxr-xr-x    1 thill  staff      1660 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop1.Material.res*
-rwxr-xr-x    1 thill  staff      5768 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop1.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop1.Texture.res*
-rwxr-xr-x    1 thill  staff      1660 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop2.Material.res*
-rwxr-xr-x    1 thill  staff      7180 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop2.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop2.Texture.res*
-rwxr-xr-x    1 thill  staff      1659 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop3.Material.res*
-rwxr-xr-x    1 thill  staff      8580 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop3.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop3.Texture.res*
-rwxr-xr-x    1 thill  staff      1660 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop4.Material.res*
-rwxr-xr-x    1 thill  staff     20461 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop4.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop4.Texture.res*
-rwxr-xr-x    1 thill  staff      1659 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop5.Material.res*
-rwxr-xr-x    1 thill  staff      9516 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop5.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1141 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Background\Backdrop5.Texture.res*
-rwxr-xr-x    1 thill  staff      7896 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Bubbles.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1128 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Bubbles.Texture.res*
-rwxr-xr-x    1 thill  staff      1645 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Bullet.Material.res*
-rwxr-xr-x    1 thill  staff      1225 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Bullet.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1125 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Bullet.Texture.res*
-rwxr-xr-x    1 thill  staff      1302 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadFire.Material.res*
-rwxr-xr-x    1 thill  staff     14065 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadFire.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1151 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadFire.Texture.res*
-rwxr-xr-x    1 thill  staff      1479 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadMove.Material.res*
-rwxr-xr-x    1 thill  staff     20921 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadMove.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1151 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadMove.Texture.res*
-rwxr-xr-x    1 thill  staff      1295 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadRestart.Material.res*
-rwxr-xr-x    1 thill  staff     20980 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadRestart.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1154 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlGamepadRestart.Texture.res*
-rwxr-xr-x    1 thill  staff      1307 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardFire.Material.res*
-rwxr-xr-x    1 thill  staff      3791 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardFire.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1155 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardFire.Texture.res*
-rwxr-xr-x    1 thill  staff      1307 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardMove.Material.res*
-rwxr-xr-x    1 thill  staff      8139 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardMove.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1157 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardMove.Texture.res*
-rwxr-xr-x    1 thill  staff      1301 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardRestart.Material.res*
-rwxr-xr-x    1 thill  staff      2910 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardRestart.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1160 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\ControlInfo\ControlMouseKeyboardRestart.Texture.res*
-rwxr-xr-x    1 thill  staff      1664 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreBody.Material.res*
-rwxr-xr-x    1 thill  staff      1598 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreBody.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1144 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreBody.Texture.res*
-rwxr-xr-x    1 thill  staff      1306 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreEye.Material.res*
-rwxr-xr-x    1 thill  staff      3223 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreEye.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1144 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreEye.Texture.res*
-rwxr-xr-x    1 thill  staff      1663 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreSpike.Material.res*
-rwxr-xr-x    1 thill  staff      1361 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreSpike.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1144 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Enemies\EnemyClaymoreSpike.Texture.res*
-rwxr-xr-x    1 thill  staff      1266 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Fog.Material.res*
-rwxr-xr-x    1 thill  staff      1274 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Glow.Material.res*
-rwxr-xr-x    1 thill  staff     20463 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Glow.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1125 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Glow.Texture.res*
-rwxr-xr-x    1 thill  staff      1646 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\GlowBubbles.Material.res*
-rwxr-xr-x    1 thill  staff      1635 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\GlowShards.Material.res*
-rwxr-xr-x    1 thill  staff    221250 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\HudFont.Font.res*
-rwxr-xr-x    1 thill  staff     86267 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Mosaic.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1129 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Mosaic.Texture.res*
-rwxr-xr-x    1 thill  staff      1646 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Player.Material.res*
-rwxr-xr-x    1 thill  staff      2031 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Player.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1125 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Player.Texture.res*
-rwxr-xr-x    1 thill  staff      9169 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Shards.Pixmap.res*
-rwxr-xr-x    1 thill  staff      1127 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\Shards.Texture.res*
-rwxr-xr-x    1 thill  staff       469 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\SharpAdd.DrawTechnique.res*
-rwxr-xr-x    1 thill  staff       470 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\SharpMask.DrawTechnique.res*
-rwxr-xr-x    1 thill  staff    221144 Feb 15 19:07 Data\DualStickSpaceShooter\Materials\WorldFont.Font.res*
-rwxr-xr-x    1 thill  staff      7914 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\BulletHitSparks.Prefab.res*
-rwxr-xr-x    1 thill  staff      7914 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\BulletHitWorld.Prefab.res*
-rwxr-xr-x    1 thill  staff      7951 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\DamageSmoke.Prefab.res*
-rwxr-xr-x    1 thill  staff     43355 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\Door.Prefab.res*
-rwxr-xr-x    1 thill  staff     39882 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\EnemyClaymore.Prefab.res*
-rwxr-xr-x    1 thill  staff      8237 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\ExplosionClaymoreGlow.Prefab.res*
-rwxr-xr-x    1 thill  staff      7939 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\ExplosionClaymoreSmoke.Prefab.res*
-rwxr-xr-x    1 thill  staff     11017 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\GoalEffect.Prefab.res*
-rwxr-xr-x    1 thill  staff     15269 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\Player.Prefab.res*
-rwxr-xr-x    1 thill  staff      7915 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\ShipDebris.Prefab.res*
-rwxr-xr-x    1 thill  staff     14299 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\SpawnPoint.Prefab.res*
-rwxr-xr-x    1 thill  staff      7930 Feb 15 19:07 Data\DualStickSpaceShooter\Prefabs\TriggerEffect.Prefab.res*
-rwxr-xr-x    1 thill  staff   3526297 Feb 15 19:07 Data\DualStickSpaceShooter\Scenes\ExampleLevel.Scene.res*
-rwxr-xr-x    1 thill  staff     18602 Feb 15 19:07 Data\Scene.Scene.res*
-rwxr-xr-x    1 thill  staff    926720 Feb 15 19:07 Duality.dll*
-rwxr-xr-x    1 thill  staff     55808 Feb 15 19:07 DualityLauncher.exe*
-rwxr-xr-x    1 thill  staff       233 Feb 15 19:07 DualityLauncher.exe.config*
-rwxr-xr-x    1 thill  staff     70144 Feb 15 19:07 DualityPrimitives.dll*
-rwxr-xr-x    1 thill  staff    295424 Feb 15 19:07 FarseerDuality.dll*
-rwxr-xr-x    1 thill  staff     74752 Feb 15 19:07 Microsoft.Web.XmlTransform.dll*
-rwxr-xr-x    1 thill  staff     63488 Feb 15 19:07 NVorbis.dll*
-rwxr-xr-x    1 thill  staff   4302848 Feb 15 19:07 OpenTK.dll*
-rwxr-xr-x    1 thill  staff      1813 Feb 15 19:07 OpenTK.dll.config*
-rwxr-xr-x    1 thill  staff     45056 Feb 15 19:07 OpenTK.GLControl.dll*
-rwxr-xr-x    1 thill  staff      9007 Feb 15 19:07 OpenTK.GLControl.xml*
-rwxr-xr-x    1 thill  staff  22589756 Feb 15 19:07 OpenTK.xml*
-rwxr-xr-x    1 thill  staff     11264 Feb 15 19:07 Plugins\Compatibility.core.dll*
-rwxr-xr-x    1 thill  staff     64512 Feb 15 19:07 Plugins\DefaultOpenTKBackend.core.dll*
-rwxr-xr-x    1 thill  staff     12800 Feb 15 19:07 Plugins\DotNetFrameworkBackend.core.dll*
-rwxr-xr-x    1 thill  staff     62464 Feb 15 19:07 Plugins\DualStickSpaceShooter.core.dll*
-rwxr-xr-x    1 thill  staff      5632 Feb 15 19:07 Plugins\GamePlugin.core.dll*
-rwxr-xr-x    1 thill  staff    402553 Feb 15 19:07 Plugins\OpenALSoft32.dll*
-rwxr-xr-x    1 thill  staff    417320 Feb 15 19:07 Plugins\OpenALSoft64.dll*
-rwxr-xr-x    1 thill  staff       808 Feb 15 19:07 UserData.dat*

@ilexp
Copy link
Member Author

ilexp commented Jun 28, 2016

Huh, that's strange. All the dll files are there, but the log looks like it couldn't locate a single plugin, and even some of the core files, which are defined in the Duality main assembly. I'll throw in some extra debug logs in future versions to help us track down this sort of issue.

Until then, just guessing here: Could this be some sort of security / access issue? I've seen Duality run on a mac before.

@ilexp
Copy link
Member Author

ilexp commented Jun 29, 2016

I've added some logs that could help us find the cause of this. Can you try again with the latest packages?

@phrohdoh
Copy link

@RockyTV If you're up for it would you build and host these again?

@phrohdoh
Copy link

phrohdoh commented Jul 2, 2016

87027c8

[Core] Msg: Running DualityLauncher with flags: 
[Core] Msg: Using 'DefaultPluginLoader' to load plugins.
[Core] Msg: Current Directory: /Users/thill/Downloads/SpaceInvaders
            Command Line: /Users/thill/Downloads/SpaceInvaders/DualityLauncher.exe
            Entry Assembly: DualityLauncher
            Entry Assembly Dir: /Users/thill/Downloads/SpaceInvaders
[Core] Msg: Loaded Assemblies:
              mscorlib
              DualityLauncher
              Duality
              System.Runtime
              System.Core
              System.IO
              System.Collections
              System.Reflection
              System.Runtime.InteropServices
              System.Linq
              DualityPrimitives
              FarseerDuality
              System.Runtime.Extensions
              System.Globalization
              System
              System.Resources.ResourceManager
              System.Diagnostics.Debug
[Core] Msg: Assembly loaded: System.Threading
[Core] Msg: Scanning for core plugins...
[Core] Msg: Initializing ISystemBackend...
[Core] Msg:   Assembly loaded: NVorbis
[Core] Msg:   Assembly loaded: System.Xml.XDocument
[Core] Msg:   Assembly loaded: System.Xml.Linq
[Core] Msg:   Assembly loaded: System.Xml
[Core] Msg:   Assembly loaded: System.Linq.Expressions
[Core] Msg:   Assembly loaded: Anonymously Hosted DynamicMethods Assembly
[Core] Msg:   No system backend...
[Core] Msg: Assembly loaded: System.Text.RegularExpressions
[Core] Msg: Initializing IGraphicsBackend...
[Core] Msg:   No Graphics...
[Core] Msg: Initializing IAudioBackend...
[Core] Msg:   No Audio...
[Core] Msg: Initializing core plugins...
[Core] Msg: DualityApp initialized
            Debug Mode: False
            Command line arguments: 
[Core] Msg: Opening Window...
[Core] Msg: Initializing default content...
[Core] Msg:   Assembly loaded: System.Reflection.Extensions
[Core] ERR:   Unable to retrieve image codec for format 'image/png'. Can't initialize default Pixmap Resources.
[Core] Msg:   Assembly loaded: System.Xml.ReaderWriter
[Core] Msg:   Assembly loaded: System.Text.Encoding
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font' in object Id 129723834. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+GlyphData[]' in object Id 427169525. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.FontMetrics' in object Id 876525375. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Pixmap' in object Id 2035693768. Type not found.
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Rect]]' in object Id 2696347487. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Rect[]' in object Id 1485019246. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Drawing.PixelData]]' in object Id 847900448. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.PixelData[]' in object Id 855378517. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+RenderMode' in object Id 0. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.FontStyle' in object Id 0. Type not found.
[Core] ERR:   Can't load Font from 'Duality.Serialization.XmlSerializer', because an error occurred: 
              Exception: Loading Resource failed
              CallStack:
                at Duality.Resource.Load[T] (Duality.Serialization.Serializer formatter, System.String resPath, System.Action`1 loadCallback, Boolean initResource) <0x11120ddb0 + 0x000bf> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font' in object Id 129723834. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+GlyphData[]' in object Id 427169525. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.FontMetrics' in object Id 876525375. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Resources.Pixmap' in object Id 2035693768. Type not found.
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Rect]]' in object Id 2696347487. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Rect[]' in object Id 1485019246. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'System.Collections.Generic.List`1[[Duality.Drawing.PixelData]]' in object Id 847900448. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.PixelData[]' in object Id 855378517. Type not found.
[Core] ERR:   Error reading object: NullReferenceException: Object reference not set to an instance of an object
              CallStack:
                at Duality.Serialization.XmlSerializer.ReadArray (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x1112281d0 + 0x000bc> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectBody (System.Xml.Linq.XElement element, Duality.Serialization.ObjectHeader header) <0x111220540 + 0x0014a> in <filename unknown>:0 
                at Duality.Serialization.XmlSerializer.ReadObjectData (System.Xml.Linq.XElement element) <0x11121a080 + 0x0038b> in <filename unknown>:0 
[Core] ERR:   Can't resolve Type 'Duality.Resources.Font+RenderMode' in object Id 0. Type not found.
[Core] ERR:   Can't resolve Type 'Duality.Drawing.FontStyle' in object Id 0. Type not found.
[Core] ERR:   Can't load Font from 'Duality.Serialization.XmlSerializer', because an error occurred: 
              Exception: Loading Resource failed
              CallStack:
                at Duality.Resource.Load[T] (Duality.Serialization.Serializer formatter, System.String resPath, System.Action`1 loadCallback, Boolean initResource) <0x11120ddb0 + 0x000bf> in <filename unknown>:0 
[Core] Msg:   ...done!
[Core] Msg: Assembly loaded: DualityPrimitives
[Core] Msg: Assembly loaded: DualityPrimitives

@ilexp
Copy link
Member Author

ilexp commented Jul 2, 2016

Okay, so I must admit I'm stuck here. I'll write up what I think to know, maybe it will make sense to someone and help us clear things up.

What we know

  • Duality is unable to locate any core or backend plugins.
  • Duality is unable to resolve any types, even the ones that are defined within already loaded assemblies, such as Duality.dll or DualityPrimitives.dll.
  • Duality's inability to resolve types is likely caused by the fact that without plugins, there is no system backend that would allow Duality to iterate over loaded assemblies.
  • All other errors and exceptions are very likely followup errors and can be ignored for now. They are not part of the issue, they are part of the symptom.
  • Conclusion: We can focus solely on the issue of not being able to locate or load plugins.

What seems a bit odd

  • Working and executing directory don't seem suspicious
  • The previous console dump shows that there are plugins in place that it should load.
  • The plugin loaded really just boils down to a few path operations and a Directory.EnumerateFiles call. If it would even try to start loading a plugin, we would see a log. What can go wrong enumerating files?

Theories

  • There is a bug in the DefaultPluginLoader code.
  • There is an issue with the testing setup.

How to proceed?

Part of the problem debugging this is that I'm really not very proficient with Unix and MacOS.

Ideally, someone who is able to reproduce the issue would check out the Duality source, open it up in Xamarin Studio, compile the parts that do compile and debug it with the launcher as startup project. I suspect that this option is currently not available though. So instead, I'll start guessing some things based on gut feeling and ask some silly questions in order to rule out potential external causes.

  • How exactly does the command line look you use to execute the application? (Mono's Environment API does seem to hide the enclosing mono call, so the logs on that were not as helpful as intended.)
  • What does it say when you run which mono?
  • What does it say when you run mono version (or whatever the command is called exactly.
  • Does it make a difference whether you use mono or mono64?
  • What do the two columns in your directory console dump mean that say thill and staff?
  • If you chmod the entire directory tree, including the root directory, to full access for everyone, does this change behavior?
  • If you run mono with a prepended sudo, does it change behavior?

To the more Unix-savvy people here, is there any scenario where an application would be prohibited from enumerating files in a directory because of security configs / issues?

@phrohdoh
Copy link

phrohdoh commented Jul 2, 2016

To the more Unix-savvy people here, is there any scenario where an application would be prohibited from enumerating files in a directory because of security configs / issues?

Absolutely. If a directory doesn't have +x for your user then you cannot view its contents in any way.

In both reports I ran this with mono --debug DualityLauncher.exe.

tmba:openra thill $ which mono
/usr/local/bin/mono

tmba:openra thill $ mono --version
Mono JIT compiler version 4.4.0 (tarball Wed Jun 15 18:28:03 BST 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

I get the exact same logfile with mono64.

thill is my user and staff is thill's group (related to file ownership).

All files and dirs are already marked as executable by everyeone (thank Windows for clobbering that) but I went ahead and chmod +x'd them with no discernible difference.

sudo mono --debug DualityLauncher.exe does not change anything (nor should it be relied on).

@ilexp
Copy link
Member Author

ilexp commented Jul 2, 2016

Allright, I've added some more logs. If you're up for another test, I've prepared another package. Should be roughly equal to what @RockyTV gave you.

SpaceShooter.zip

I've also moved some code around, so resolving types no longer depends on the system backend plugin, but on the plugin loader directly. It doesn't help us with the root problem here, but it makes more sense anyway.

@phrohdoh
Copy link

phrohdoh commented Jul 2, 2016

Your OS X users are going to have do to this:
SpaceInvaders$ ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib .

After that...
screen shot 2016-07-02 at 1 17 12 pm

@ilexp
Copy link
Member Author

ilexp commented Jul 2, 2016

I'm so relieved to see this working. Thanks for your testing efforts and the fix you've come up with!

Edit: I believe this might solve the problem that @sappho192 had before as well.

Your OS X users are going to have do to this:
SpaceInvaders$ ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib .

What does this line do exactly, and do you have an idea why it's necessary?

@phrohdoh
Copy link

phrohdoh commented Jul 2, 2016

Without it you will get:

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x000cc] in /private/tmp/mono-20160615-60221-wj8qzs/mono-4.4.0/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:119
  --- End of inner exception stack trace ---
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00077] in /private/tmp/mono-20160615-60221-wj8qzs/mono-4.4.0/mcs/class/System.Drawing/System.Drawing/Image.cs:288
  at System.Drawing.Image.LoadFromStream (System.IO.Stream stream, Boolean keepAlive) [0x00011] in /private/tmp/mono-20160615-60221-wj8qzs/mono-4.4.0/mcs/class/System.Drawing/System.Drawing/Image.cs:162
  at System.Drawing.Image.FromStream (System.IO.Stream stream) [0x00000] in /private/tmp/mono-20160615-60221-wj8qzs/mono-4.4.0/mcs/class/System.Drawing/System.Drawing/Image.cs:141
  at Duality.Backend.DotNetFramework.BitmapImageCodec.Read (System.IO.Stream stream) <0x115d321c0 + 0x000a0> in <filename unknown>:0
  at Duality.Resources.Pixmap+<>c__DisplayClass3.<InitDefaultContent>b__1 (System.IO.Stream stream) <0x115d32130 + 0x0002b> in <filename unknown>:0
  at Duality.Resource+<>c__DisplayClass8`1[T].<InitDefaultContent>b__7 (System.String name) <0x1151a9e60 + 0x00071> in <filename unknown>:0
  at Duality.Resource.InitDefaultContent[T] (System.Func`2 resourceCreator) <0x1151a9050 + 0x001ce> in <filename unknown>:0
  at Duality.Resource.InitDefaultContent[T] (System.String embeddedNameExt, System.Func`2 resourceCreator) <0x1151a8c90 + 0x0021f> in <filename unknown>:0
  at Duality.Resources.Pixmap.InitDefaultContent () <0x115d31830 + 0x0029a> in <filename unknown>:0
  at Duality.ContentProvider.InitDefaultContent () <0x1151a87b0 + 0x0012a> in <filename unknown>:0
  at Duality.DualityApp.InitPostWindow () <0x1151a8690 + 0x00010> in <filename unknown>:0
  at Duality.DualityApp.OpenWindow (Duality.Backend.WindowOptions options) <0x114ac2710 + 0x000e6> in <filename unknown>:0
  at Duality.Launcher.Program.Main (System.String[] args) <0x10e0f6dc0 + 0x00e2e> in <filename unknown>:0

libgdiplus.dylib is the native binary for GDI+ which System.Drawing uses under the hood on OS X.
ln -s creates a symlink.

So your application will pickup the local libgdiplus.dylib which System.Drawing asks for (but the local is just a link, not a copy, so when mono is updated this link will point to the most-current version).

@ilexp
Copy link
Member Author

ilexp commented Jul 2, 2016

So your application will pickup the local libgdiplus.dylib which System.Drawing asks for (but the local is just a link, not a copy, so when mono is updated this link will point to the most-current version).

Ah, nice. Thanks!

What I don't get though, this sounds like it's an entirely different issue than the one before. That log error you posted also wasn't in the previous logs - so, is this a new issue that came up after the first one was out of the way? If yes, how did you solve the first issue with Duality not being able to locate plugins?

@phrohdoh
Copy link

phrohdoh commented Jul 2, 2016

Is what a new issue?
I don't see any issues here.

Having to link this file is just a bit of a wart in Mono.
A bug they don't plan on fixing, IIRC.

I simply unzipped the file you provided, ln -s'd, and ran mono --debug DualityLauncher.exe and was playing.

@ilexp
Copy link
Member Author

ilexp commented Jul 2, 2016

Is what a new issue?
I don't see any issues here.

I'm talking about the one you just solved by adding the symlink 😄 Just trying to make some sense of what happened under the hood, because the gdiplus stuff seems so unrelated to the missing plugin problems the previous logs hinted towards.

I simply unzipped the file you provided, ln -s'd, and ran mono --debug DualityLauncher.exe and was playing.

Okay, so either the gdiplus one was somehow causing Duality not to be able to locate its plugins, or we somehow fixed the plugin one by accident. Weird. But anyway, I can settle with that for now. Thanks again.

@chatpion
Copy link
Contributor

chatpion commented May 15, 2017

A friend has been trying to run using mono (Mono JIT comiler version 5.0.0.100) on a macOs 10.11.6.

We tried ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib ., but it doesn't work with my game (using latest Duality updates)
However, the package that @ilexp prepared worked.

@ilexp Did you add anything special to this package ?

@ilexp
Copy link
Member Author

ilexp commented May 16, 2017

Nope, there shouldn't be anything special in there, except maybe for a few preview changes that weren't in any stable release back then.

So that package worked, but your game didn't?

  1. Can describe what exactly "doesn't work" means? Share the contents of your logfile, console outputs, whatever there is.
  2. Can you zip and upload the game as it is on the machine in question for others to review?

@chatpion
Copy link
Contributor

@ilexp
Copy link
Member Author

ilexp commented May 16, 2017

Hmm.. could this be a permissions issue?

As we can see in line 29 and 30 of the logfile, the Duality launcher isn't able to find any plugin directory or assemblies to load:

[Core] Msg: Plugin Base Directories:
[Core] Msg: Available Assembly Paths:

This (expectedly) leads to not having a system, graphics or audio backend available:

[Core] Msg: Initializing ISystemBackend...
[Core] Msg: ...
[Core] Msg: No system backend...
[Core] Msg: Initializing IGraphicsBackend...
[Core] Msg: No Graphics...
[Core] Msg: Initializing IAudioBackend...
[Core] Msg: No Audio...

So the core question is, why can't it locate the plugin directory? The working directory seems to be correct, assuming that's where the plugin folder is:

Current Directory: /Users/Sebastien/Desktop/LD37-2

The source code where that folder should be identified is here, with the crucial (and default) bit here, which seems trivial.

Can you check file permissions and other OS-related security measures that might prevent the launcher from accessing the file system structures around it?

@chatpion
Copy link
Contributor

chatpion commented May 16, 2017

I don't know if it can't load plugins, since this only happens with games which contains .png files.
I'm not sure if there's an error when no image is used. I'm going to see that.

Edit : Seems there isn't any error
Game used

@ilexp
Copy link
Member Author

ilexp commented May 16, 2017

What has changed between the non-working and the working version? Was it a security / permission issue?

since this only happens with games which contains .png files.

Given the first logfile you posted, it seems unlikely that the error only exists when there are images in the project. Even though there is an image-related error in the log as well, that's a symptom of the underlying issue of not having any backend / plugin available. With no graphics, audio or system backend nothing can be loaded, displayed or played, even though the game logic itself might run fine otherwise.

@chatpion
Copy link
Contributor

Hold on.
I checked the permissions on my Linux machine. In both cases (games with and without the error), everything has read and write permission. However, in games that don't work, there aren't any folders because of \ instead of /.

@ilexp
Copy link
Member Author

ilexp commented May 16, 2017

However, in games that don't work, there aren't any folders because of \ instead of /.

What does "there aren't any folders because of \ instead of /" mean? I'm aware that the primary path separator char differs between Windows and Unix, but the Duality system backend should handle this internally once the system is up - however, in the non-working example the launcher didn't even get there. Are the folders physically missing...? And if yes, how did that happen?

@chatpion
Copy link
Contributor

chatpion commented May 16, 2017

I think I found the culprit !
I packaged my game into a .zip using different ways, then ran them on my Linux machine with mono.

Results :
Game starts if I run a game directly exported (no compression), or compressed using 7zip, winrar and windows.
Game doesn't start if I run a game exported into a zip file using Dualitor !

Why ? Because it seems the zip file created by Dualitor uses \ instead of other caracters, which is not interpreted as a folder, but a huge file name.

@ilexp
Copy link
Member Author

ilexp commented May 17, 2017

Ah, great find! Filed this as a separate issue, see #536.

@deathkiller
Copy link
Contributor

Duality runs with latest Mono (5.2, probably 5.0 too) on macOS 10.11 without any issues.
No need to copy libgdiplus.dylib. It works even with Apple Software Renderer (it's very slow, but without glitches, supports only GLSL 120 and lower). Audio works too, there is already Apple's OpenAL in the OS installed.
It seems that OpenTK.dll.config is not copied from Packages\AdamsLair.OpenTK.1.1.8\lib to game directory automatically and is required to be there.

@ilexp
Copy link
Member Author

ilexp commented Jan 2, 2018

Closing this issue, as it has been shown that Duality games can generally run on MacOS. Open separate issues for specific work items or bugs as they come up.

Thanks to everyone who participated in testing this!

@ilexp ilexp closed this as completed Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Area: Duality runtime or launcher Help Wanted Contributions especially appreciated MacOS Platform: MacOS Task ToDo that's neither a Bug, nor a Feature
Development

No branches or pull requests

6 participants