Welcome, Guest. Please login or register.
May 26, 2024, 04:53:55 AM

Login with username, password and session length
* Home Help Arcade Login Register
.
+  Forum
|-+  Homebrew Player Tracking and EFT Systems.
| |-+  NLG Homebrew Player Tracking and EFT Systems.
| | |-+  Debug SAS DLL for testing
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] 2 3 4 5 Go Down Print
Author Topic: Debug SAS DLL for testing  (Read 60653 times)
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« on: March 10, 2011, 12:11:26 AM »

I have uploaded a debug version of the DLL here: http://users.tpg.com.au/adslcmdn/SASEGMTest/debugddl/SASEGM.dll

To use it, rename the existing DLL to something like SASEGM.dll.old and copy the new one into the same directory. The only reason you need to keep the correct version dll is because the windows installer tracks the version or hashcode and will not uninstall the test app fully if it finds different file versions.


OK, there is a few minor changes I have made that will help those having the "01 :" Problem somewhat. I am aware of a few issues still and I will get to them soon.

What was going wrong? Well for a start SAS is by far the worst protocol I have ever used. Its not really suited to multidrop applications, and making it work is a hack. The reason the IGT program works is it takes everything that is read into the serial port and puts it up on the viewing pane, so it cant really multidrop. What I do is poll and VGM and then wait for a response. I read the serial port asynchronously (otherwise the app would hang all the time) then put the responses in a buffer. When the app starts, depending on computer and serial bus speeds I would sometimes get a chirp from and EGM that would be added to the buffer. When I send a poll for meters or whatever, the oldest response is removed from the buffer. OF course I would always be processing the previous response. Silly Me!

So the difference is now, I check for parity error and throw away chirps. I will eventually feed this back to the test app rather than throwing it away. The problem is that there is no way in windows to detect if each byte has a parity error, another reason SAS is not suited to polling via the serial port.

I am still queuing up responses, but I will remove this feature (bug) soon.

I have also adjusted the serial port read timeouts a bit.

The bonus with the debug version of the dll is that you can all use a program called DBMON (might already be installed on your pc) to view the traces of the dll workings. For those who continue to have issues I can look at the trace to try and figure out what is going wrong.

Let me know how you go!

Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #1 on: March 10, 2011, 12:22:17 AM »

To use it, rename the existing DLL to something like SASEGM.dll.old and copy the new one into the same directory. Let me know how you go!



Did that and got this (screenshot below).

Or are you just supposed to click continue?
Clicking details says this:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.DllNotFoundException: Unable to load DLL 'SASEGM.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at SASEGMTest.SASEGMWrapper.SAS_Initialise(String commPort)
   at SASEGMTest.Form1.buttonInit_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3615 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SASEGMTest
    Assembly Version: 1.0.0.1
    Win32 Version: 1.0.0.1
    CodeBase: file:///C:/Program%20Files/AP/SASEGMTest/SASEGMTest.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




* error.jpg (96.05 KB, 538x602 - viewed 404 times.)
« Last Edit: March 10, 2011, 12:29:09 AM by poppo » Logged
Tilt
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 366
Offline Offline

Gender: Male
Posts: 724



« Reply #2 on: March 10, 2011, 12:38:07 AM »

I'm getting the same error as Poppo too.
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #3 on: March 10, 2011, 12:45:33 AM »

And to add, clicking continue does not work. It doesn't do anything at all now. Previously it worked fine for me with either built in serial or USB serial.
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #4 on: March 10, 2011, 12:53:14 AM »

I'm getting the same error as Poppo too.

Same music I'm afraid.... bawling  Tiny Violin
Click to enlarge screenshot>>>


* screenshot of stuck App.png (86.02 KB, 800x568 - viewed 424 times.)
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #5 on: March 10, 2011, 01:18:18 AM »

Must have buggered the upload. Let me work on it.
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #6 on: March 10, 2011, 01:20:08 AM »

Must have buggered the upload. Let me work on it.


NO
rush! Take your time....
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #7 on: March 10, 2011, 01:32:28 AM »

Nope, seems to be ok here. The dll you download needs to be in the same directory as SASEGMTest.exe


Stayouttadabunker, i take it yours started up ok? Can you download DBMON.exe (should find it on google somewhere) and save some of the trace for me? dbmon is just a command line program, so you need to run it from a command prompt (make you screen buffer 9999 so we can get some decent data). If you cant find dbmon I will upload a copy soon.
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #8 on: March 10, 2011, 01:36:51 AM »

Nope, seems to be ok here. The dll you download needs to be in the same directory as SASEGMTest.exe


It is


* error2.jpg (145.62 KB, 799x600 - viewed 387 times.)
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #9 on: March 10, 2011, 01:44:50 AM »

Bizzare. Not sure about that one. I just downloaded it to my dev pc, then put it in the directory where my install was and it works fine. Maybe the debug version needs some other library to make it work. If boredom prevails dependency walker will show this.

I'll see what stayouttadabunker comes back with and take a look at the trace before I put another upload.
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #10 on: March 10, 2011, 01:46:25 AM »

DBMon here if required: http://users.tpg.com.au/adslcmdn/SASEGMTest/debugdll/Dbmon.Exe
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #11 on: March 10, 2011, 01:49:46 AM »

If boredom prevails dependency walker will show this.


Didn't have these errors before.

<edit> And I don't have those missing files.


* error3.jpg (325.63 KB, 978x633 - viewed 451 times.)
« Last Edit: March 10, 2011, 01:58:13 AM by poppo » Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #12 on: March 10, 2011, 01:56:39 AM »

Yup, thought that may be the case. Not sure how many installed the VC10 runtime, but looks like that is the issue. There is obviously a few more libraries needed for debug builds. Previous version was release build. If your dll was previously working I would leave as is.

The main aim of the debug build was to track down issues.

VC++ 2010 redistributable is here http://www.microsoft.com/downloads/en/details.aspx?FamilyID=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #13 on: March 10, 2011, 02:01:03 AM »

andy,
I downloaded the database monitor but the bloody thing completely blackens out
my entire screen with an old square mouse cursor that I can move around but I see nothing.
Is there a way to reduce the screen size of the dbmon.dll?

I cannot copy & paste the screen shot because I'm forced to use Cntrl,Alt & Del to shut it off.
When I do that, I lose the "print screen" save and cannot show you a screen shot.

I petty much get 928 CPL and a bunch of different commands ranging from "Init" to "Stop" ...lol
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #14 on: March 10, 2011, 02:05:40 AM »

andy,
I downloaded the database monitor but the bloody thing completely blackens out
my entire screen with an old square mouse cursor that I can move around but I see nothing.
Is there a way to reduce the screen size of the dbmon.dll?

lol. did you donwload the one I put up? I think IBM has a program called dbmon too, which is for as400 databased! We need the microsoft version, which is actually stands for debug monitor! To get it out of full screen mode hit alt + enter

Also, just start a command prompt (start->run->cmd) and then rund dbmon from that. You wont see any action until you start the test app and hit initialise. To increase the screen buffer click on the c:\ icon top left of the window and choose properties.
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #15 on: March 10, 2011, 02:07:15 AM »

lol  thanks pardon my computer ineptness...lol
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #16 on: March 10, 2011, 02:11:36 AM »

Yup, thought that may be the case. Not sure how many installed the VC10 runtime, but looks like that is the issue.

VC++ 2010 redistributable is here http://www.microsoft.com/downloads/en/details.aspx?FamilyID=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84


I already had the VC++ 2010 redistributable and still a no go, and don't have those missing files. Even did a repair and same results.

« Last Edit: March 10, 2011, 02:26:49 AM by poppo » Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #17 on: March 10, 2011, 02:18:44 AM »

dbmon is black and blank.
It's like it's not running even though the Test App is "Initialized"...
Click to enlarge if needed.
I gotta go to bed soon...
see the little clock on the bottom right?
My E.S.T. time here...yawn  zzzzzzz
Foster's the late night bird...lol>>>


* blank dbmon screen.png (40.5 KB, 789x572 - viewed 363 times.)
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #18 on: March 10, 2011, 02:22:33 AM »

wow, its so much easier when visual studio is installed!!! I'll do some reading and see what I can figure out regarding debug tracing. Its definatly time for me to create a virtual machine with no visual studio.
Logged
Tilt
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 366
Offline Offline

Gender: Male
Posts: 724



« Reply #19 on: March 10, 2011, 02:24:19 AM »

Same as poppo again here too.  I already had 2010 installed as well.
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #20 on: March 10, 2011, 02:25:17 AM »

andy,
What do you mean by visual studio...?
A different program?
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #21 on: March 10, 2011, 02:27:00 AM »

Not sure if this is the issue, but a quick google turned up this about the missing wer.dll

 'trying to run the debug version of the executable (the VC redist doesn't include the debug version of the VC++ runtime)'
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #22 on: March 10, 2011, 02:33:54 AM »

I think the "executable" is being the Test App "start" button..or the "Initialize" button.
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #23 on: March 10, 2011, 02:38:03 AM »

andy,
What do you mean by visual studio...?
A different program?

Yup. All the source code is written and compiled using a program called visual studio 2010. When you install it, it installs all the libraries and debug libraries.
Obviously none of the debug libraries are included in the vc redistributable, which now leads me to think you may not be running the latest dll!


I think I can force the installer to include debug libraries, I will have a go.


BTW. Normally when distributing a program, we have a bunch of testers that will install and test it for you, so all the problems get picked up before a release. This is not the case here, I am running solo!
Logged
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #24 on: March 10, 2011, 02:42:25 AM »

BTW. Normally when distributing a program, we have a bunch of testers that will install
and test it for you, so all the problems get picked up before a release.
This is not the case here, I am running solo!


That's where you're wrong dude!
We're with ya every step of the way!! lol  Cactus Road Runner Snoopy Walking The Dog MUMMY CoolChicken
Logged
Pages: [1] 2 3 4 5 Go Up Print 
« previous next »
Jump to:  


If you find this site helpful, Please Consider Making a small donation to help defray the cost of hosting and bandwidth.



Newlifegames.com    Newlifegames.net    Newlifegames.org
   New Life Games    NewLifeGames  NLG  We Bring new Life to old Games    1-888-NLG-SLOTS
Are all Copyright and Trademarks of New Life Games LLC 1992 - 2021


FAIR USE NOTICE:

This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner.
We make such material available in an effort to advance awareness and understanding of the issues involved.
We believe this constitutes a fair use of any such copyrighted material as provided for in section 107 of the US Copyright Law.
In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those
who have expressed a prior interest in receiving the included information for research and educational purposes.

For more information please visit: http://www.law.cornell.edu/uscode/17/107.shtml.

If you wish to use copyrighted material from this site for purposes of your own that go beyond fair use,
you must obtain permission directly from the copyright owner.

NewLifeGames.net Web-Site is optimized for use with Fire-Fox and a minimum screen resolution of 1280x768 pixels.


Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Loon Designed by Mystica
Updated by Runic Warrior
Page created in 0.119 seconds with 18 queries.