Jump to content

Ultra with VS2019?


SpiderPig
 Share

Recommended Posts

VS2022 is terrible with intellisense not working as it should (mainly with larger projects) and crashes not showing the right info.  Like this, I've got an access violation because it says spawn is empty, yet I'm checking if it's nullptr before I execute that code and it's always worked before.  Unless there's a better way of checking a shared_ptr is empty??

This code has always worked until I change something else that seems irrelevant - obviously it's not, but... I've had many similar errors that when I finally track down the issue it has nothing do to with what VS is telling me.  The only thing that might make this type of error possible is multi-threading but I'm not using threads.

Hence I'd like to try using VS2019 and see if that gives me any better info.  The only problems with shared_ptr's it seems is that some crashes do take you to weird headers and give wrong debugging info. :unsure:  I am curious if anyone else has had problems like this...

VS2022_WrongError.thumb.png.a5d48a2818e46f47e01136bb9edbac3d.png

Link to comment
Share on other sites

Project won't compile in VS2019 unless build tools v143 is installed but it seems it can't be installed on older version.  It can only be used with VS2022.  Changing the build tools to use 2019's v142 results in other errors.  Probably because it needs something that v142 lacks.

Link to comment
Share on other sites

35 minutes ago, SpiderPig said:

VS2022 is terrible with intellisense not working as it should (mainly with larger projects) and crashes not showing the right info.  Like this, I've got an access violation because it says spawn is empty, yet I'm checking if it's nullptr before I execute that code and it's always worked before.  Unless there's a better way of checking a shared_ptr is empty??

This code has always worked until I change something else that seems irrelevant - obviously it's not, but... I've had many similar errors that when I finally track down the issue it has nothing do to with what VS is telling me.  The only thing that might make this type of error possible is multi-threading but I'm not using threads.

Hence I'd like to try using VS2019 and see if that gives me any better info.  The only problems with shared_ptr's it seems is that some crashes do take you to weird headers and give wrong debugging info. :unsure:  I am curious if anyone else has had problems like this...

VS2022_WrongError.thumb.png.a5d48a2818e46f47e01136bb9edbac3d.png

Are you using multiple threads?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

No just the one.  I'm doing an experiment in VS22... this program below doesn't crash.  It does give some warnings.  But in some situations it won't even do that. I think in my issue above I'm accessing an element in the array that goes beyond it's size.  But it should crash at the array saying it's trying to access an an element that does not exist.  I'm going to test this in VS19... it might be a bug with 2022.

#include <iostream>

int main()
{
    int* myArray = new int[256];
    for (int index = 0; index <= 256; index++) {
        myArray[index] = index;
    }

    int value = myArray[300];//will crash here if I make it 512 instead of 300
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...