• 0

An error occurring during compiling


Question

i'm building an Hide and seek game using csharp here is the code, it has 2 interfaces , 2 independent classes, 6 other classes which inherit from the interface and the other 2 classes, the code has zero errors and runs when pressed start. But some times during execution the code starts running and give me this error it pints to the line currentLocation.Exits.Name

 

So hears the cod for the entire program

  interface IHasExteriorDoor
    {
        string DoorDescription { get; }
        Location DoorLocation { get; set; }
    }
 interface IHidingPlace
    {
        string HidingPlaceName { get; }
    }
abstract class Location
    {
        public Location(string name)
        {
            this.name = name;
        }
        public Location[] Exits;
        private string name;
        public string Name
        {
            get { return name; }
        }
        public virtual string Description
        {
            get
            {
                string description = " You're standing in the " + name + ". You see exits to the following places:";

                for (int i = 0; i < Exits.Length; i++)
                {
                    description += "" + Exits[i].Name;
                    if (i != Exits.Length - 1)
                        description += ",";
                }
                description += ".";
                return description;
            }
        }
    }
class Opponent
    {
        private Random random;
        private Location myLocation;
        public Opponent(Location startingLocation)
        {
            myLocation = startingLocation;
            random = new Random();
        }
        public void Move()
        {
            if (myLocation is IHasExteriorDoor)
            {
                IHasExteriorDoor LocationWithDoor = myLocation as IHasExteriorDoor;
            
            if (random.Next(2) == 1)
                myLocation = LocationWithDoor.DoorLocation;
        }
        bool hidden = false;
        while(!hidden)
            {
            int rand = random.Next(myLocation.Exits.Length);
            myLocation = myLocation.Exits[rand];
            if(myLocation is IHidingPlace)
            hidden = true;
            }
        }
        public bool Check(Location locationToCheck)
        {
            if (locationToCheck != myLocation)
                return false;
            else
                return true;
        } 
    }
 class OutsideWithDoor : Outside, IHasExteriorDoor
    {
        public OutsideWithDoor(string name, bool hot, string doorDescription): base(name, hot)
            {
            this.doorDescription = doorDescription;
            }
        private string doorDescription;
        public string DoorDescription
        {
            get { return doorDescription; }
        }
        private Location doorLocation;
        public Location DoorLocation
        {
            get { return doorLocation; }
            set { doorLocation = value; }
        }
        public override string Description
        {
            get
            {
                return base.Description + "You see " + doorDescription + ".";
            }
        }
    }
 class Outside : Location
    {
        private bool hot;
        public bool Hot { get { return hot; } }

        public Outside(string name, bool hot) : base(name)
        {
            this.hot = hot;
        }
        public override string Description
        {
            get
            {
                string NewDescription = base.Description;
                if (hot)
                    NewDescription += "It's very hot.";
                return NewDescription;
            }
        }
    }
 class OutsideWithHidingPlace : Outside, IHidingPlace
    {
        public OutsideWithHidingPlace(string name, bool hot, string hidingPlaceName) : base(name, hot)
        { this.hidingPlaceName = hidingPlaceName; }

        private string hidingPlaceName;
        public string HidingPlaceName
        {
            get { return hidingPlaceName; }
        }
        public override string Description
        {
            get { return base.Description + "Someone could hide" + hidingPlaceName + "."; }
        }
    }
class RoomwithDoor: RoomWithHidingPlace, IHasExteriorDoor
    {
        public RoomwithDoor(string name, string decoration, string hidingPlaceName, string doorDescription):base(name, decoration, hidingPlaceName)
        { this.doorDescription = doorDescription; }
        private string doorDescription;
        public string DoorDescription
        {
            get { return doorDescription; }
        }
        private Location doorLocation;
        public Location DoorLocation
        {
            get { return doorLocation; }
            set { doorLocation = value; }
        }
    }
class Room: Location
    {
        private string decoration;

        public Room(string name, string decoration):base(name)
        {
            this.decoration = decoration;
        }
        public override string Description
        {
            get
            {
                return base.Description+"You see " + decoration + ".";
            }
        }
    }
 class RoomWithHidingPlace : Room, IHidingPlace
    {
        public RoomWithHidingPlace (string name, string decoration, string hidingPlaceName): base(name, decoration)
        {
            this.hidingPlaceName = hidingPlaceName;
        }
        private string hidingPlaceName;
        public string HidingPlaceName
        {
            get { return hidingPlaceName; }
        }
        public override string Description
        {
         get { return base.Description + "Someone could hide" + hidingPlaceName + "."; }
        }
    }
public partial class Form1 : Form
    {
        int Moves;
        Location currentLocation;

        RoomwithDoor livingRoom;
        RoomWithHidingPlace diningRoom;
        RoomwithDoor kitchen;
        Room stairs;
        RoomWithHidingPlace hallway;
        RoomWithHidingPlace bathroom;
        RoomWithHidingPlace masterBedroom;
        RoomWithHidingPlace secondBedroom;

        OutsideWithDoor frontYard;
        OutsideWithDoor backYard;
        OutsideWithHidingPlace garden;
        OutsideWithHidingPlace driveway;

        Opponent opponent;

        public Form1()
        {
            InitializeComponent();
            CreateObjects();
            opponent = new Opponent(frontYard);
            ResetGame(false);
            MoveToANewLocation(livingRoom);
        }
        private void MoveToANewLocation(Location newLocation)
        {
            Moves++;
            currentLocation = newLocation;
            RedrawForm();
        }
        private void RedrawForm()
        {
            exits.Items.Clear();
            for (int i = 0; i < currentLocation.Exits.Length; i++)
                exits.Items.Add(currentLocation.Exits[i].Name);
            exits.SelectedIndex = 0;
            description.Text = currentLocation.Description + "\r\n(move #" + Moves + ")";
            if(currentLocation is IHidingPlace)
            {
                IHidingPlace hidingPlace = currentLocation as IHidingPlace;
                exits.Text = "Check" + hidingPlace.HidingPlaceName;
                exits.Visible = true;
            }
            else
                exits.Visible = false;
                if (currentLocation is IHasExteriorDoor)
                    goThroughTheDoor.Visible = true;
                else
                    goThroughTheDoor.Visible = false;
        }
        private void CreateObjects()
        {
            livingRoom = new RoomwithDoor("Living Room", "an antique carpet","inside the closet", "an oak door with a brassknob");
            diningRoom = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armorie");
            kitchen = new RoomwithDoor("Kitchen", "stainless steel appliances","in the cabinet", "a screen door");
            stairs = new RoomwithDoor("Kitchen", "stainless steel appliances", "in teh cabinet", "a screen door");
            hallway = new RoomWithHidingPlace("Upstairs Hallway", "a picture of a dog", "in the closet");
            bathroom = new RoomWithHidingPlace("Bathjroom", "a sink and a toilet", "in the shower");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bed", " under the bed");

            frontYard =new OutsideWithDoor("Front Yard", false, "a heavy-looking oak door ");
            backYard = new OutsideWithDoor("Back Yard", true, " a screen door");
            garden = new OutsideWithHidingPlace("Garden", false,"inside the shed");
            driveway = new OutsideWithHidingPlace("Driveway", true, "in the garage");

            diningRoom.Exits = new Location[] { livingRoom, kitchen };
            livingRoom.Exits = new Location[] { diningRoom, stairs };
            kitchen.Exits = new Location[] { diningRoom };
            stairs.Exits = new Location[] { livingRoom, hallway };
            hallway.Exits = new Location[] { stairs, bathroom, masterBedroom, secondBedroom };
            bathroom.Exits = new Location[] { hallway };
            masterBedroom.Exits = new Location[] { hallway };
            secondBedroom.Exits = new Location[] { hallway };
            frontYard.Exits = new Location[] { backYard, garden, driveway };
            backYard.Exits = new Location[] { frontYard, garden, driveway };
            garden.Exits = new Location[] { backYard, frontYard };
            driveway.Exits = new Location[] { backYard, frontYard };

            livingRoom.DoorLocation = frontYard;
            frontYard.DoorLocation = livingRoom;

            kitchen.DoorLocation = backYard;
            backYard.DoorLocation = kitchen;
        }
         private void ResetGame (bool displayMessage)
        {
            if (displayMessage)
            {
                MessageBox.Show("you found me in" + Moves + "moves!");
                IHidingPlace foundLocation = currentLocation as IHidingPlace;
                description.Text = "you found your opponent in " + Moves + "moves! He was hiding" + foundLocation.HidingPlaceName + ".";
            }
            Moves = 0;
            hide.Visible = true;
            goHere.Visible = false;
            check.Visible = false;
            goThroughTheDoor.Visible = false;
            exits.Visible = false;
        }

    

        private void goHere_Click(object sender, EventArgs e)
        {
            MoveToANewLocation(currentLocation.Exits[exits.SelectedIndex]);
        }

        private void goThroughTheDoor_Click(object sender, EventArgs e)
        {
            IHasExteriorDoor hasDoor = currentLocation as IHasExteriorDoor;
            MoveToANewLocation(hasDoor.DoorLocation);
        }

        private void check_Click(object sender, EventArgs e)
        {
            Moves++;
            if (opponent.Check(currentLocation))
                ResetGame(true);
            else
                RedrawForm();
        }

        private void Hide_Click(object sender, EventArgs e)
        {
            hide.Visible = false;
            for (int i = 1; i <= 10; i++)
            {
                opponent.Move();
                description.Text = i + "...";
                Application.DoEvents();
                System.Threading.Thread.Sleep(200);
            }
            description.Text = "Ready or not, here i come!";
            Application.DoEvents();
            System.Threading.Thread.Sleep(500);

            goHere.Visible = true;
            exits.Visible = true;
            MoveToANewLocation(livingRoom);
        }
    }

Although this program contains 0 errors the program stops compiling sometimes and points towards the line current.Exit.Name and give a pop up saying Null reference  exception was handled.

 

Here's how the form looks like FORM

Link to comment
https://www.neowin.net/forum/topic/1323070-an-error-occurring-during-compiling/
Share on other sites

7 answers to this question

Recommended Posts

  • 0
Location currentLocation = null;
// Or
Location currentLocation.Exits = null;

The error is caused because the value is null, this can be caused by either the whole currentLocation to be null or the Exits attribute to be null.

 

If I would have to guess:

 

You start at Location A which has exits B, C and D.

Then you go to exit Location C which has no exits, the attribute "exits" is null, this causes an error in the for loop which expects at least an empty array instead of null.

 

The NullReferenceException is the most common exception I've ever seen in a C# application :p

 

TL;DR

 

Always initialize your arrays/lists or check if they aren't null before using a loop.

 

Also this is not an compilation but an execution error, which means that the code will compile fine and can be distributed to the users which will see their application crash. Therefore it's always recommended to test all scenarios (0, 1 or multiple exits) for bugs before shipping the code.
 

This can be done manually or automated (recommended) with unit tests: https://www.youtube.com/watch?v=rW6LvPP4VvA

 

 

  • 0
  On 21/02/2017 at 12:51, Ch33f said:

Although this program contains 0 errors the program stops compiling sometimes and points towards the line current.Exit.Name and give a pop up saying Null reference  exception was handled.

Expand  

First, this is not a compile-time error! It does not happen while the program is compiling, it happens while the program is running, i.e. after compilation. If you have any confusion about compile- vs run-time you need to clear that up ASAP. The compiler turns your text files (*.cs) into executable files (*.dll, *.exe), which can then run inside an operating system process. Exceptions happen at run-time when your program is legal C# so it compiles, but it still manages to do something wrong (like in this case, dereferencing a null).

 

As @Seahorsepip mentions, if `currentLocation.Exits.Name` throws NullReferenceException then either currentLocation is null or currentLocation.Exits is null. Why are they null? What could you do to make them not null? That's yours to figure out.

 

 

  • Like 1
  • 0

After reading the code, it appears to me your problem is very simple...

 

abstract class Location
    {
        public Location(string name)
        {
            this.name = name;
        }
        public Location[] Exits;

you did not initialize Exits in the base constructor, nor did you initialize it in the inherited constructors as well.

Seems to me somewhere you should have this line somewhere in your constructors.

Exits = new Location[ExitCount];  //Where ExitCount is an integer

 

  • 0
  On 21/02/2017 at 18:19, Seahorsepip said:

The NullReferenceException is the most common exception I've ever seen in a C# application :p

Expand  

For me it's the "Object reference not set to an instance of an object" error (I've caused this in my apps forgetting to set it correctly), and the division by zero errors. I'm working on a C# GTA soundboard, and when I'm tired the object reference error happens a lot :) Caffeine normally helps :)

  • Like 1
  • 0
  On 21/02/2017 at 23:08, sao123 said:

After reading the code, it appears to me your problem is very simple...

Expand  

The exits are given a value in CreateObjects():

See Form1 constructor:

MoveToANewLocation(livingRoom);

Which sets currentLocation to livingRoom (which is generated by CreateObjects() and has the exits value diningRoom and stairs).

So exits don't need to be initialized in the Locations class itself to work but imagine what happens when the following method is called:

MoveToANewLocation(stairs);

And the stairs exits array attribute is not initialized in CreateObjects()?

 

Then it tries to for loop trough null instead of an array and we end up with a NullReferenceException :)

 

So initializing every array in the classes is a quick fix that does indeed solve the NullReferenceException issue in most cases but might not solve the underlying issue, maybe a Location should always have at least 1 exit as example.

 

As I said before it's saves a lot of work when unit tests are made for all use case scenarios(values, actions etc). Then it's directly clear when something stopped working that worked before.

 

  On 21/02/2017 at 23:33, Tidosho said:

For me it's the "Object reference not set to an instance of an object" error (I've caused this in my apps forgetting to set it correctly), and the division by zero errors. I'm working on a C# GTA soundboard, and when I'm tired the object reference error happens a lot :) Caffeine normally helps :)

Expand  

I always get StackOverflowExceptions since I have a habit to write a lot of recursion logic lately :p 

  • 0
  On 21/02/2017 at 23:33, Tidosho said:

For me it's the "Object reference not set to an instance of an object" error (I've caused this in my apps forgetting to set it correctly), and the division by zero errors. I'm working on a C# GTA soundboard, and when I'm tired the object reference error happens a lot :) Caffeine normally helps :)

Expand  

Try F# - no nulls (mostly) among other benefits ;)

  • 0

Thank You for the feedback, i got the program working, exits is the name given to the combo box and its has been initialized in Location class here is the edited version of form.

public partial class Form1 : Form
    {
        int Moves;
        Location currentLocation;

        RoomwithDoor livingRoom;
        RoomWithHidingPlace diningRoom;
        RoomwithDoor kitchen;
        Room stairs;
        RoomWithHidingPlace hallway;
        RoomWithHidingPlace bathroom;
        RoomWithHidingPlace masterBedroom;
        RoomWithHidingPlace secondBedroom;

        OutsideWithDoor frontYard;
        OutsideWithDoor backYard;
        OutsideWithHidingPlace garden;
        OutsideWithHidingPlace driveway;

        Opponent opponent;

        public Form1()
        {
            InitializeComponent();
            CreateObjects();
            opponent = new Opponent(frontYard);
            ResetGame(false);
            MoveToANewLocation(livingRoom);
        }
        private void MoveToANewLocation(Location newLocation)
        {
            Moves++;
            currentLocation = newLocation;
            RedrawForm();
            
        }
        private void RedrawForm()
        {
            exits.Items.Clear();
            for (int i = 0; i < currentLocation.Exits.Length; i++)
                exits.Items.Add(currentLocation.Exits[i].Name);
            exits.SelectedIndex = 0;
            description.Text = currentLocation.Description + "\r\n(move #" + Moves + ")";
            if(currentLocation is IHidingPlace)
            {
                IHidingPlace hidingPlace = currentLocation as IHidingPlace;
                check.Text = "Check" + hidingPlace.HidingPlaceName;
                check.Visible = true;
            }
            else
                check.Visible = false;
                if (currentLocation is IHasExteriorDoor)
                    goThroughTheDoor.Visible = true;
                else
                    goThroughTheDoor.Visible = false;
        }
        private void CreateObjects()
        {
            livingRoom = new RoomwithDoor("Living Room", "an antique carpet","inside the closet", "an oak door with a brassknob");
            diningRoom = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armorie");
            kitchen = new RoomwithDoor("Kitchen", "stainless steel appliances","in the cabinet", "a screen door");
            stairs = new Room("Stairs", "a wooden bannister");
            hallway = new RoomWithHidingPlace("Upstairs Hallway", "a picture of a dog", "in the closet");
            bathroom = new RoomWithHidingPlace("Bathjroom", "a sink and a toilet", "in the shower");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bed", " under the bed");

            frontYard =new OutsideWithDoor("Front Yard", false, "a heavy-looking oak door ");
            backYard = new OutsideWithDoor("Back Yard", true, " a screen door");
            garden = new OutsideWithHidingPlace("Garden", false,"inside the shed");
            driveway = new OutsideWithHidingPlace("Driveway", true, "in the garage");

            diningRoom.Exits = new Location[] { livingRoom, kitchen };
            livingRoom.Exits = new Location[] { diningRoom, stairs };
            kitchen.Exits = new Location[] { diningRoom };
            stairs.Exits = new Location[] { livingRoom, hallway };
            hallway.Exits = new Location[] { stairs, bathroom, masterBedroom, secondBedroom };
            bathroom.Exits = new Location[] { hallway };
            masterBedroom.Exits = new Location[] { hallway };
            secondBedroom.Exits = new Location[] { hallway };
            frontYard.Exits = new Location[] { backYard, garden, driveway };
            backYard.Exits = new Location[] { frontYard, garden, driveway };
            garden.Exits = new Location[] { backYard, frontYard };
            driveway.Exits = new Location[] { backYard, frontYard };

            livingRoom.DoorLocation = frontYard;
            frontYard.DoorLocation = livingRoom;

            kitchen.DoorLocation = backYard;
            backYard.DoorLocation = kitchen;
        }
         private void ResetGame (bool displayMessage)
        {
            if (displayMessage)
            {
                MessageBox.Show("you found me in" + Moves + "moves!");
                IHidingPlace foundLocation = currentLocation as IHidingPlace;
                description.Text = "you found your opponent in " + Moves + "moves! He was hiding" + foundLocation.HidingPlaceName + ".";
            }
            Moves = 0;
            hide.Visible = true;
            goHere.Visible = false;
            check.Visible = false;
            goThroughTheDoor.Visible = false;
            exits.Visible = false;
        }

      /*  private void MoveToANewLocation(Location newLocation)
        {
            currentLocation = newLocation;

            exits.Items.Clear();
            for (int i = 0; i < currentLocation.Exits.Length; i++) 
            exits.Items.Add(currentLocation.Exits[i].Name);
            exits.SelectedIndex = 0;

            description.Text = currentLocation.Description;

            if (currentLocation is IHasExteriorDoor)
                goThroughTheDoor.Visible = true;
            else
                goThroughTheDoor.Visible = false;
        }*/

        private void goHere_Click(object sender, EventArgs e)
        {
            MoveToANewLocation(currentLocation.Exits[exits.SelectedIndex]);
        }

        private void goThroughTheDoor_Click(object sender, EventArgs e)
        {
            IHasExteriorDoor hasDoor = currentLocation as IHasExteriorDoor;
            MoveToANewLocation(hasDoor.DoorLocation);
        }

        private void check_Click(object sender, EventArgs e)
        {
            Moves++;
            if (opponent.Check(currentLocation))
                ResetGame(true);
            else
                RedrawForm();
        }

        private void Hide_Click(object sender, EventArgs e)
        {
            hide.Visible = false;
            for (int i = 1; i <= 10; i++)
            {
                opponent.Move();
                description.Text = i + "...";
                Application.DoEvents();
                System.Threading.Thread.Sleep(200);
            }
            description.Text = "Ready or not, here i come!";
            Application.DoEvents();
            System.Threading.Thread.Sleep(500);

            goHere.Visible = true;
            exits.Visible = true;
            MoveToANewLocation(livingRoom);
        }
    }

 

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft Weekly: useful PowerToys modules, Microsoft Store updates, and video gen in Bing by Taras Buria This week's news recap is here, bringing you the latest stories from the Microsoft world, including useful PowerToys modules, fresh Windows 11 preview builds, AI video generation in Bing, Office updates, gaming news, and more. Quick links: Windows 10 and 11 Windows Insider Program Updates are available Gaming news Great deals to check Windows 11 and Windows 10 Here, we talk about everything happening around Microsoft's latest operating system in the Stable channel and preview builds: new features, removed features, controversies, bugs, interesting findings, and more. And, of course, you may find a word or two about older versions. This week's Windows 11 section kicks off with some stats. StatCounter published its monthly report, showing that Windows 11 slowed its climb a little bit in May 2025. On the gaming side, however, things are much better, with Windows 11 occupying the majority of PCs on Steam. Now, here are some Windows updates you might have missed. Windows 11 versions 23H2 and 22H2 received KB5062170, a small emergency patch that resolved errors when installing recent updates. The patch is available only through the Microsoft Update Catalog, and the company recommends installing it only if your system experiences the 0xc0000098 code when installing the May 2025 security update. Finally, Microsoft released a new Defender update for Windows 11 and 10 installations, fresh recovery updates, and a script for recovering the inetpub folder, which showed up unannounced on systems in April. As Windows 10 is getting closer to the end of support, more companies are urging users to switch. AMD, Dell, and ASUS all urge users to prepare for the "mandatory Windows 11 upgrade," while other companies shamelessly poach Windows 10 users, luring them to Linux. To finish this week's Windows section, here is an ancient CD-burning app that made a surprising 64-bit comeback and now works on modern operating systems, including Windows 11. Windows Insider Program Here is what Microsoft released for Windows Insiders this week: Builds Canary Channel Build 27871 This week's Canary build introduced Start menu improvements (more Phone Link features), small taskbar tweaks, and a long list of various fixes to improve different parts of the operating system. Dev Channel Build 26200.5622 (KB5058512) This build brought new Click to Do features, a dedicated Settings section for Quick Machine recovery, improved Windows Widgets, a new spec card for the Settings app, and a few fixes here and there. Build 26200.5622 also contains a new "Your Device Info" card on the Settings Home page, which makes it easier to find your computer's specs with fewer clicks. Beta Channel Build 26120.4230 (KB5058506) This one is almost identical to build 26200.5622 from the Dev Channel. Release Preview Channel Nothing in the Release Preview Channel this week Besides new builds, Microsoft announced a new update for the Windows Photos app, which is now available to Windows Insiders in all channels. The update introduces AI-powered light controls (Relight), which let you place and control up to three light sources on your photo, and AI-powered search with natural language support. Updates are available This section covers software, firmware, and other notable updates (released and coming soon) from Microsoft and third parties, delivering new features, security fixes, improvements, patches, and more. Microsoft announced a batch of new features for the Microsoft Store. The app is getting an improved Home page with personalized recommendations based on your recent activities, region, and deals. Search now considers additional information when ranking apps in the results, and a Copilot button lets you ask AI about a certain app. Microsoft also brags about significant performance improvements under the hood. This week, we had plenty of various Office updates. Microsoft 365, for one, is getting significant changes to its update channels beginning July 2025. Rollback support will be expanded to two months, the Semi-Annual Enterprise Channel (Preview) is being deprecated, and the Semi-Annual Enterprise Channel will be supported for eight months instead of the current 14. Microsoft also announced the general availability of the new Message Trace in the Exchange Admin Center in Exchange Online, some big updates for the new Outlook for Windows in the June 2025 update, and acknowledged a few issues with Outlook after a recent Calendar feature upgrade. Teams is also getting a "major" change for third-party app settings, and Word is getting SharePoint eSignature support. Bing received a surprising update this week. OpenAI's Sora video generator is now available for free in Bing Video Creator. Now, you do not have to pay for an OpenAI subscription to generate short videos using AI. Way to boost Bing stats, Microsoft! PowerToys Run, a useful and convenient launcher for Windows 10 and 11, recently received three new third-party modules that let you test your internet speed, download videos from hundreds of websites, and check out word definitions, usage, synonyms, and more. Microsoft announced some long-requested changes for Microsoft Edge, but only for those living in the EEA region. Windows will no longer annoy you with setting Edge as your default browser, and Windows Widgets will respect your default browser. Also, Microsoft will let you uninstall the Microsoft Store app, and Windows Search will be able to use other search providers. Speaking of browsers, Microsoft published a blog post that explained why Edge is a faster and smarter alternative to Chrome. If you are picking between the two, the article might help you make the choice (Google has an answer to that with its own article explaining that Chrome is now faster than ever). Also, the company released Edge 138 in the Beta Channel, bringing some important changes and new features, such as a new (sort of new) media control center, AI-powered history search, and more. Here are other updates and releases you may find interesting: Microsoft expanded LinkedIn's CEO role to manage Office apps. Microsoft announced the general availability of two new reasoning AI agents: Research and Analyst. Microsoft and Crowdstrike announced a partnership on threat actor naming. Microsoft will invest $400 million in Switzerland to bolster cloud and AI infrastructure. The annual Build conference is moving away from Seattle. Here are the latest drivers and firmware updates released this week: Intel 32.0.101.6876 non-WHQL with support for four new games and a single fix for intermittent display artifacts. Nvidia 576.66 Hotfix with patches for FC 25 crashes, video bugs in browsers, and more. In addition to that, Nvidia released a new version of the Nvidia App, which introduced a light theme (and automatic theme switching), support for more games, and some bug fixes. AMD Software Pro Edition 25 Q2 with support for Windows Server 2025, new Ryzen processors, and a few fixes. AMD Radeon Software 25.6.1 with the RX 9060 XT support and FSR 4 support for more games. On the gaming side Learn about upcoming game releases, Xbox rumors, new hardware, software updates, freebies, deals, discounts, and more. Hello Games continues relentlessly improving No Man's Sky. The game's latest update, "Beacon," was announced this week. It offers space explorers overhauled settlements, player overseer duties, and much more. The update is now available on all supported platforms, including Nintendo Switch 2. The Witcher 4 from CD Projekt RED might be a few years away. Still, at the State of Unreal 2025 keynote, the developers revealed a tech demo showcasing the capabilities of Unreal Engine 5 on the base PlayStation 5, which managed to pull it off at a solid 60 FPS. Nvidia announced new games that are now available in the GeForce NOW cloud streaming service (you have to own them to play them). The latest drop is a massive one: 25 new games, including FBC: Firebreak, Dune: Awakening, 7 Days to Die, DREADZONE, and more. Game Pass is also getting new games, and the first drop in June is also a pretty big one. You will soon get access to Kingdom: Two Crowns, EA Sports FC 25, FBC: Firebreak, Crash Bandicoot 4: It's About Time, The Alters, and more. Some games are leaving the service, so check out the full list here. Xbox Games Showcase 2025 is happening today. With the show kicking off in just a few hours, check out our recap of what to expect at the show and how to watch it. On the hardware side, we have a new Xbox Storage Expansion Card from Seagate. At a whopping $429.99 price tag, the new card offers an immense amount of space for your games, doubling that of the previously biggest expansion card. Now, you can get an Xbox Storage Expansion Card with 4TB. By the way, it costs as much as the 1TB Xbox Series S. Deals and freebies If you are looking for some new games at lower prices, check out this week's Weekend PC Game Deals, which covers multiple specials and discounts, including some freebies, such as Deathloop from the Epic Games Store. Other gaming news includes the following: Ubisoft is skipping its Forward game showcase for the first time since 2020. Valve released a new beta version of Steam for Linux to address sluggish update installations. Elden Ring Nighteign received its first update with reduced difficulty for solo runs. The Expanse TV show is getting a narrative-driven sci-fi action RPG. Black Myth: Wukong is coming to Xbox in August. Atomic Heart is getting a sequel and an MMO RPG spin-off. Great deals to check Every week, we cover many deals on different hardware and software. The following discounts are still available, so check them out. You might find something you want or need. Crucial X10 8TB Portable SSD - $439.99 | 44% off Apple 2025 MacBook Air 13-inch Laptop with M4 chip - $849 | 15% off 4TB WD_BLACK SN7100 PCIe Gen4 Solid-State Drive - $249.99 | 16% off SAMSUNG Q-Series Soundbar HW-Q900F - $997.99 | 29% off KEF Q Concerto Meta Three-Way Bookshelf Speaker - $1,199.99 | 14% off This link will take you to other issues of the Microsoft Weekly series. You can also support Neowin by registering a free member account or subscribing for extra member benefits, along with an ad-free tier option.
    • No, they aren't because they don't do with that online advertising, they sell with that "spots" in their store. Apple is not an online advertising company. The business model of Microsoft ads is exactly the same with Google ads. They both are ad companies which do online advertising and make though their sites user profiling. Just because Microsoft never managed to be as successful as Google in that business that doesn't mean they are not exactly what Google is. An online advertising company. Both Google, Microsoft and Amazon are online advertising companies. Apple isn't.
    • I'm lost without clippy.
    • Read the books, watched the show. Wish they'd continue the show.
    • By your logic Apple is an ad business too. https://ads.apple.com/
  • Recent Achievements

    • Week One Done
      Ricky Chan earned a badge
      Week One Done
    • Week One Done
      maimutza earned a badge
      Week One Done
    • Week One Done
      abortretryfail earned a badge
      Week One Done
    • First Post
      Mr bot earned a badge
      First Post
    • First Post
      Bkl211 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      483
    2. 2
      +FloatingFatMan
      262
    3. 3
      snowy owl
      240
    4. 4
      ATLien_0
      227
    5. 5
      Edouard
      187
  • Tell a friend

    Love Neowin? Tell a friend!