Re: An app, and dongle calls
I'd try to figure out what my codepath was that bypassed the dongle call first. Or maybe I'd ask myself what the point was if the app is shutting down anyway. What's your plan if it's not there?
Re: An app, and dongle calls
Not quite the same as you but may be of interest. I use a program that sometimes starts up correctly and sometimes doesn't. This seems quite random. I've had a lot of correspondance with the developers and now have been informed by them that the program is 'not multiple core compliant' - ie it will only work correctly all the time if the computer has only one core! I wonder if this situation re multi-core may be the problem with your program?
On a more general level, I wonder how many programs are going to be found that 'sometimes don't work' due to multi-core threading issues? I'm currently working on a re-write of a program which has just this sort of problem with multi-threading on multi-cores. Getting a multi-threaded program to consistently work correctly with a variable number of cores (from 1 to 32 and above) is definitely non-trivial!
Re: An app, and dongle calls
Maybe I'm missing something, but assigning threads to cores is a function of the OS, not the programmer. I would think if there were threading issues, the number of cores should be irrelevant, unless the OS has bugs.
Re: An app, and dongle calls
If the number of cores is 1, then even in a multi-threaded program there is only one thread executing at once. In a multi-core system there could be several threads of the same program executing con-currently on different cores - depending upon how the threads are assigned by the OS. Having multi-threads of the same program execute at the same time can show up subtle bugs in the application code that do not necessarily arise when multi-threads are processed using one core.
Re: An app, and dongle calls
Quote:
Originally Posted by
Jeff Hayat
What I was hoping to learn, is if there is some way to ensure that the aforementioned dongle call is made 100% of the time, as opposed to most of the time.
The way is using hardware USB sniffer. You should be able to take logs typical for normal shutdown as well as problem one. In case those differ somehow, you report the problem to SW vendor. Though I don't think end users should do things like this, and would suggest you to report anyway.
Re: An app, and dongle calls
Thanks much for the responses.
Quote:
Originally Posted by
GCDEF
I'd try to figure out what my codepath was that bypassed the dongle call first.
Ok, you kinda lost me there.... how would I figure out what the path is?
Quote:
Originally Posted by
GCDEF
I'd try to figure out what my codepath was that bypassed the dongle call first. Or maybe I'd ask myself what the point was if the app is shutting down anyway.
The app isn't sutting down; that's why I am here.
Quote:
Originally Posted by
2kaud
Not quite the same as you but may be of interest. I use a program that sometimes starts up correctly and sometimes doesn't. This seems quite random. I've had a lot of correspondance with the developers and now have been informed by them that the program is 'not multiple core compliant' - ie it will only work correctly all the time if the computer has only one core! I wonder if this situation re multi-core may be the problem with your program?
Possibly. I have to check to see if the app is multiple core compliant, and if it is, whether or not the dongle driver is. Did the dev of your sw say the entire app may not function properly, or that the dongle may not function properly?
Quote:
Originally Posted by
Igor Vartanov
The way is using hardware USB sniffer. You should be able to take logs typical for normal shutdown as well as problem one. In case those differ somehow, you report the problem to SW vendor. Though I don't think end users should do things like this, and would suggest you to report anyway.
Ok, just did a goodle search for USB sniffer. I found a few things; basically, it comes down to a visual picture of the traffic passing through USB subsystem. I have yet to try it, but what do I do with the info? Is this just for reporting to the dev and nothing else? I would really like to find a tool that will force the dongle calls that are supposed to be made, but I fear that no such thing exists.
Thanks again.
Re: An app, and dongle calls
When it's hung, break into the code using the debugger and see where you are in the code and how it got there.
Re: An app, and dongle calls
Quote:
Originally Posted by
Jeff Hayat
I would really like to find a tool that will force the dongle calls that are supposed to be made, but I fear that no such thing exists.
I'm not aware of what kind of data interchange is done on USB channel in your SW. So I suppose some special/custom USB driver is in use, developed by the SW vendor. If this is the case, the driver is the entity that performs dongle calls, and I hardly can imagine how you could "force" the driver to do what it does not.
Data interchange is typically done like this: app calls driver API dll, the API dll calls driver, driver issues low level commands to HW (dongle), HW responds back to driver, driver puts received response data to a buffer provided by either API dll or user app. As you can see, there are many entities participating in this exchange. And most probably problem may be in app, API dll or USB driver. Which all are provided by the SW vendor. It is very unlikely that some OS components cause some effects that prevent this chain of components from working correct.
And even if this effect really exists in your particular case, this is SW vendor who is responsible to fix it or provide a solution how to circumvent.
Re: An app, and dongle calls
Quote:
Originally Posted by
GCDEF
When it's hung, break into the code using the debugger and see where you are in the code and how it got there.
Eh, dubugger? What debugger?
Re: An app, and dongle calls
Thank you for your thoughts Igor.
I'm not aware of what kind of data interchange is done on USB channel in your SW. So I suppose some special/custom USB driver is in use, developed by the SW vendor. If this is the case, the driver is the entity that performs dongle calls, and I hardly can imagine how you could "force" the driver to do what it does not.
Yes, the driver was dev'd by the sw vendor. And yeah - "forcing" the driver to do what it does not is a longshot I know.....
It is very unlikely that some OS components cause some effects that prevent this chain of components from working correct.
What about hw components....MOBO components, the chipset....?
And even if this effect really exists in your particular case, this is SW vendor who is responsible to fix it or provide a solution how to circumvent.
Agreed - but this problem has been here across four different versions (not updates), and over four years. If they have not yet fixed it, I fear that they simply will not.
Thanks again.
Re: An app, and dongle calls
Quote:
Originally Posted by
Jeff Hayat
Eh, dubugger? What debugger?
Seriously? You need to learn how to use it. MSDN can explain it better than I can.
Re: An app, and dongle calls
Quote:
Originally Posted by
Jeff Hayat
Yes, the driver was dev'd by the sw vendor. And yeah - "forcing" the driver to do what it does not is a longshot I know.....
As I said, the problem may be in app, or in driver API, or in driver itself. Or in order of calls. Or threading deadlock. Or timings. Or driver unwanted unload. Or something else. Even to investigate what's going on you need a source code, not just a bare belief or desire. ;)
Quote:
What about hw components....MOBO components, the chipset....?
And? What's your idea? Are you going to test through all motherboards from your nearest computer shop? The shot is going to be very long. And expensive for sure. ;)
Quote:
Agreed - but this problem has been here across four different versions (not updates), and over four years. If they have not yet fixed it, I fear that they simply will not.
If so, sorry, but you're in trouble. A problem prior to be fixed must be understood. Your description sounds just like "something doesn't work sometimes." No source code, no logs, no other diagnostics, no clear procedure how to reproduce. This is not the way how engineer problems get fixed. Sorry, I really hate to disappoint people, but under the circumstances the case seems hopeless.
1 Attachment(s)
Re: An app, and dongle calls
Hi Igor, and thanks again for your thoughts. I understand exactly what you are saying, but when it's like this:
Attachment 30923
...it's just something that I feel should be fixed, even tho it may not be reproducible.
Cheers.
Re: An app, and dongle calls
Quote:
Originally Posted by
Jeff Hayat
Hi Igor, and thanks again for your thoughts. I understand exactly what you are saying, but when it's like this:
Attachment 30923
...it's just something that I feel should be fixed, even tho it may not be reproducible.
So in the end, what are you looking for in the Visual C++ forum? I don't see a C++ question, just some musings on a piece of supposed buggy hardware.
If anything, GCDEF suggested the closest thing that has anything to do with the topic of this forum, and that is to use the debugger to debug whatever you're having trouble with.
Regards,
Paul McKenzie