Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 908137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:40:08+00:00 2026-05-15T16:40:08+00:00

something strange is happening to my code. I am using a library which is

  • 0

something strange is happening to my code. I am using a library which is supposed to work perfectly (nglib from the open-source Netgen mesher). I can link and include everything, but I cannot use this library :

The object I want to use is Ng_Mesh* mesh = Ng_NewMesh ();

The Ng_NewMesh() method is :

   DLL_HEADER Ng_Mesh * Ng_NewMesh ()
   {
      Mesh * mesh = new Mesh;  
      mesh->AddFaceDescriptor (FaceDescriptor (1, 1, 0, 1));
      return (Ng_Mesh*) (void*) mesh;
   }

When I go to locals, it is seen as a void** referring to *mesh which is a void*. It is not NULL because I can add points and other stuff to this object, but with some functions, I get an exception :

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at nglib.Ng_GetPoint(Void** , Int32 , Double* )
at ForwardModelingPlugin.CustomMeshVol3D.tesselate(CustomMeshVol3D* )

nglib.Ng_GetPoint is supposed to have as arguments (Ng_Mesh*, Int32, Double*) which explains this exception.

I don’t know why this casting is happening.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:40:08+00:00Added an answer on May 15, 2026 at 4:40 pm

    Here it says:

    /// Data type for NETGEN mesh
    typedef void * Ng_Mesh;
    

    therefore Ng_Mesh* mesh; is the same as void** mesh;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Something strange is happening in my code where I'm using a StackTrace. It's almost
I'm seeing something very very strange happening in a Flex app I'm maintaining. I've
I'm getting something pretty strange going on when trying to read some data using
I'm experiencing something really strange! I have a div that I'm hiding with JS
I find this very strange, must be something I'm doing wrong, but still... I'm
Something else perhaps? I am already using nHibernate, but I get occasional issues where
I have a strange problem when deleteting records using linq, my suspicion is that
I have a strange problem that is only happening in a single location. I
I am using UITableViewCellStyleValue2 and UITableViewStyleGrouped . Let's start with some code (it's not
I need to solve the following question which i can't get to work by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.