GithubHelp home page GithubHelp logo

Memory access violation about xcplite HOT 4 CLOSED

vectorgrp avatar vectorgrp commented on September 26, 2024
Memory access violation

from xcplite.

Comments (4)

RainerZ avatar RainerZ commented on September 26, 2024

Hi Christophe,

the code you pointed out is the inner loop of measurement data aquisition. An access violation there is most probably caused by incorrect addresses in the A2L file. Are you sure, you are using an up to date (the generated) A2L file in control desk?

Regards
Rainer

from xcplite.

XTOCON avatar XTOCON commented on September 26, 2024

Hi Rainer,

Thank you for your quick answer.

The problem is 100% reproducible in the sense that the original code always results in an access violation, and the adjusted code never does, with exactly the same A2L file in both cases.

My feeling is that the compiler somehow generates different (optimized?) machine code in both cases explaining the different behavior, but I cannot prove this assumption.

Would you or one of your colleagues be able to reproduce this behavior with an installation of ControlDesk?

Regards

Christophe

from xcplite.

RainerZ avatar RainerZ commented on September 26, 2024

Hi Christophe,

sorry, I have overseen one detail in your code, which indeed changes the behaviour compared to the original code:

uint8_t addr = OdtEntryAddr(e);

XCP addresses are 32 bit values. You casted to 8 bit. Normally, you should have got a compiler warning from this.
As a result, the access violation disapears, but it will measure garbage read from a wrong address. Note that XCPlite constructs pointers from A2L addresses by adding the module load address to the A2L address.

So I still guess, there is a problem with wrong addresses in your A2L.

Please make sure that controldesk really uses the address from the A2L file. Try to reduce your measurement setup to a single signal that fails. Increase the debug output level to see what happens. In higher levels, the DAQ lists are dumped.

Regards

from xcplite.

XTOCON avatar XTOCON commented on September 26, 2024

Hi Rainer,

Thank you for your clear explanation. Unfortunately I was not able to figure out more about this issue.

The good thing is I have code now that works so the issue is no longer blocking but it would be interesting to know from other ControlDesk users if they're facing the same problem.

If you would know any other users that are open to discuss about this issue please let me know.

Regards

Christophe

from xcplite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.