Hello Guest

Author Topic: Open Broadcaster Software, Surfaces issue  (Read 1865 times)

0 Members and 1 Guest are viewing this topic.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Open Broadcaster Software, Surfaces issue
« on: July 14, 2015, 12:48:54 AM »
I've discovered a crash in Otter that only happens when using Open Broadcaster Software.  If you are capturing an Otter game using the Game Capture mode, it seems that the game will crash when creating a Surface after the game has already started (so after the window has been created.)

If anyone out there can test this for themselves it would be a huge help for me to try and confirm that is whats happening, and it's wide spread or not.  If you can download Open Broadcaster Software from here: https://obsproject.com/ (use the Windows 7/8 beta, not the multiplatform) and try capturing your Otter project using Game Capture.  At some point during your game create a new Surface and render some stuff to it, and then render it to the screen, and see if the game will crash at that point.  If you can crash it, it would be awesome if you could post the crash message, the relevant source code, and your hardware specs (mostly video card and operating system matter, I think.)

Thanks!

(here's some test code that I used, you can just copy and paste this if you want)
Code: [Select]
using Otter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OBSCrashTest {
    class Program {
        static void Main(string[] args) {
            var game = new Game("OBS Crash Test");
            game.Color = new Color(0.5f, 0.25f, 0.25f);

            game.Start(new TestScene());
        }
    }

    class TestScene : Scene {

        public TestScene() : base() {

        }

        public override void Update() {
            base.Update();

            if (Input.KeyPressed(Key.S)) {
                Add(new TestEntity());
            }
        }

    }

    class TestEntity : Entity {

        Surface surface = new Surface(100, 100, Color.Black);

        public TestEntity() : base() {
            AddGraphic(surface);
            surface.CenterOrigin();
            SetPosition(Rand.Float(Game.Instance.Width), Rand.Float(Game.Instance.Height));

            surface.AutoClear = false;

            surface.Draw(Image.CreateCircle(30, Color.Red), Rand.Float(100), Rand.Float(100));
        }
    }
}
« Last Edit: July 14, 2015, 01:19:05 AM by Kyle »