Comments (4)
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.
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.
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.
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)
- XCPsim: Invalid counter in XCP transport layer header HOT 9
- Segmentation Fault using local variables.. HOT 1
- Memory leak pthread_create HOT 1
- New release version
- Multiple instances for c++ application
- CPP_Demo memory dump
- New Release Version
- No function to create physical calibration parameter
- Help HOT 3
- New Release Version
- The functionality corresponding to XCP_ENABLE_SO has not been implemented HOT 1
- Can XCPlite and CANape be run on the same machine? HOT 2
- Why does XcpSetDaqListMode overwrites flags to be mode? HOT 1
- Possibility using virtual address HOT 3
- Timeout: No response of the request msg received HOT 7
- Heap-use-after-free in socketGetLocalAddr
- XcpCreateEvent cycleTimeNs parameter mismatch in C_Demo HOT 1
- git markings in the source files HOT 1
- Failed to compile on Windows HOT 1
- XcpServerReceiveThread can't be terminated cleanly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcplite.