Zyl Posted September 24, 2012 Report Share Posted September 24, 2012 Hi all ! Currently building a TS custom interface for one of my customer, I decided (this time) to manage user rights directly using TS user manager. Since I applied this solution, LV randomly crashes (or not crash) without giving any message that could help on resolving the issue. This is not the first time I create TS custom interfaces, but this time there are few new things compared to other HMI I built : newer LV | TS versions than usually (LV 2011 SP1.f2 and TS 2010 SP1.f1) user rights are managed using TS user manager For my user manager, I used a functional global to retain the TS engine reference and share through all functions I made to deal with user (I've built a library in order to reuse these functions later). Maybe this is not allowed... what do you think about it ? Quote Link to comment
crelf Posted September 24, 2012 Report Share Posted September 24, 2012 I'm implmeneted the user manager a few times and haven't had any issues - maybe you're not closing a reference somewhere? Can you post your code? Or, at least, trim it down to as little as possible where the issue still occurs (make a little example) so we can fault find. Quote Link to comment
asbo Posted September 24, 2012 Report Share Posted September 24, 2012 Make sure you have the the object leak dialog turned on to illuminate when you're not cleaning up properly. Configure > Station Options > Preferences > Debug Options. Quote Link to comment
Zyl Posted September 25, 2012 Author Report Share Posted September 25, 2012 (edited) Hi Crelf, I can post my code (somehow ugly because of a lack of time and idrectly using the TS API exemple given with LV...). However, I already tried to trim it down... and it seems to crash just after callbacks are registered. So if the issue comes from a callback code, I'm stuck... Else, it would come from the functions made to deal with users and rights. I tried to debug it using DETT, but every time I launch it LV crashes and nothing appears in DETT (it seems like DETT just stop logging...). Asbo, I just didn't get it when you talked about the object leak dialog. It is turned on on my computer. Of course when LV crashes, the debug window doesn't show up. But when my interface runs well, this dialog window doesn't show up either ! I assume that there is no memory leak... Most of the time, when LV crashes, NIERR window indicates it's an acces violation which made it crash. Sometimes, I see a 'pure virtual function call' Visual C++ error window poping-up... Don't know if that help a lot... Edited September 25, 2012 by Zyl Quote Link to comment
crelf Posted September 27, 2012 Report Share Posted September 27, 2012 I can post my code (somehow ugly... All* of our code is ugly at times *Well, expect for mine, of course. Quote Link to comment
asbo Posted September 29, 2012 Report Share Posted September 29, 2012 I can post my code (somehow ugly because of a lack of time and idrectly using the TS API exemple given with LV...). However, I already tried to trim it down... and it seems to crash just after callbacks are registered. So if the issue comes from a callback code, I'm stuck... Else, it would come from the functions made to deal with users and rights. Sounds like you have a starting place. Start dropping callbacks that you're registering for one-by-one until the crash goes away. Depending on what you're registering for, maybe you want to drop breakpoints right at the front of the callback VIs and make sure they're not responsible somehow for the crash. Quote Link to comment
Zyl Posted October 2, 2012 Author Report Share Posted October 2, 2012 Hi ! In fact the code is a bit big to be posted here, and as I'm continuing to develop this software program it's getting bigger everyday. So I guess I won't post it. Just to let you know, the problem really looks like this post I found on NI forums : http://forums.ni.com/t5/NI-TestStand/LabVIEW-Access-Violation-Crashes-from-TestStand/td-p/2004661. Except that I don't communicate with devices for the moment and the situation is reversed (I call TS in a LV app ; they call LV modules in TS). NI France was working on my issue, reproduced the bug, but couldn' explain it. So they transfered to NI US support. They, again, reproduced the bug... but it seems that they could'nt find where it comes from. They are still searching... So as soon as I have a decent answer from them I'll let you know... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.