Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / The Matrix1Utils plugins collection

Author
Message
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Jun 2008 20:53
Thanks for spotting it - that's fixed for the next release.

The next release at this point contains one bug fix, one fix due to 6.9, one very minor enhancement and now a help file fix ... I've been kinda busy this month, so this release will be a little lighter than usual unless I find the time to work on it a little.

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Jun 2008 16:15
I have found a bug. You will need to have 3D Cloth & Particles installed to run this code:



As you can see particle effectors are not counted as objects but the help files and actually DBPro it self shows that they are objects.


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.8
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Jun 2008 18:02
It sounds like that plug-in isn't playing by the rules (ie, calling the SetNewObjectFinalProperties function when the object is fully created). I'll see if I can work out some other way to do the object tracking and see if that fixes it.

Do you mind if I send the plug-in directly to you for testing when I've changed it? I don't have that pack (in spite of being a tester for it back in 2003).

Omen
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 24th Jun 2008 19:58
Hehehe, just ran a little Perl script on my server code and it look like roughly 63% of the World of OMEN server code (for the DBPro version) consists of Ian's functions

...so, yeah, I owe him a few pints too

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 24th Jun 2008 22:45
Ian quickly fixed my previously reported bug. Works perfectly now with his latest DLL 19th test version.


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.8
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 26th Jun 2008 09:24
@ IanM,

Your limb commands work a charm- but (with DK Pick Limb fallen down) the really useful commands would be

result = PICK LIMB(CameraID, ObjectID, 2D_X, 2D_Y)

where 'result' would be 0 for Root Limb and -1 if no Limb within selected Object covered by 2D x and y co-ordinates given...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jun 2008 14:44
Waaay outside my area of expertise, but I'll see what I can do. No promises though, but it will be interesting to see how far I get.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 26th Jun 2008 22:21
couldnt hurt to ask... the best work around I have now is along the lines of waiting for mouse click, if cursor covers object then debunking out limbs as objects in posn, checking with pick object against them and then deriving limb from that ie. v v slow....

would be excellent if you could suss it

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 27th Jun 2008 01:19 Edited at: 27th Jun 2008 01:20
@IanM
do you think you could add some thing like if process end()=1
so when someone ends a program dbp will know?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Jul 2008 13:29
I've just added it to my todo list for now.

Here's the latest release - it's just a bug-fix release this time round.

Matrix1Util_15 1.1.0.1
- Ensure that keyboard hook is disabled when plug-in terminates - Was crashing on exit.

Matrix1Util_19 1.1.0.2
- Improved object-creation tracking - Wasn't detecting objects created by the 3D cloth & particles pack.

Matrix1Util_26 1.0.0.4
- Modified to handle changes due to multiple displays in 6.9.
- Switched sync timing to more accurate timer.

Attachments

Login to view attachments
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 12th Jul 2008 21:00
Quote: "Ensure that keyboard hook is disabled when plug-in terminates - Was crashing on exit"


now disable system keys exits when I use esc,alt f4, and all other ways to exit and then returns a error message see pic.
And here's the code i used


Attachments

Login to view attachments
Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 14th Jul 2008 09:51
Wow, I had not checked these plugins out when I thanked you for them on the other thread. WoW! What a help many of these will be. I'm looking foward to using the file commands...heck of a lot easier than originally!

Thanks!
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 15th Jul 2008 05:12
Regarding Olby's comment above, one of my programs which uses the Cloth & Particle pack commands was crashing when I used your Find Free Object() command to assign an object number for a damping effector. I temporarily changed it to hard code a low object number known to be free and it then ran OK. I have noticed that some of the object numbers generated with the Find Free Object() can be pretty high. Perhaps the Cloth & Particle Pack prefers lower numbers for certain physics objects, although I did not notice any expressed limitation in the help files. Perhaps I should use the "start" and "range" parameters available in your command for these purposes.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Jul 2008 15:10
@Ed222,
I'll take another look at it. Can you tell me which OS you are using?

@Nano brain,
Could you say so in your other post then

@Jeff,
The code for the plug-in always returns the lowest number it can. Could it be that the C&P pack isn't properly pushing the ID back into the free list when its object is deleted?

Could you try that - create a cloth object with an ID of 1, then immediately delete it, then finally use the FIND FREE OBJECT to see if it returns an ID of 1.

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 15th Jul 2008 15:42
I'll try tonight. I'll also try capturing whatever object numbers are being generated. I didn't get a problem when using Find Free Object() to generate a cloth ID, or a gravity emitter, just when it created one for the damper. It never got to the point where I had yet deleted any object. The program would just dump with an unspecific "Physics Error" message, no line number, and ran only when I then hard-coded a number for the damper.
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 15th Jul 2008 19:03 Edited at: 15th Jul 2008 19:04
Quote: "@Ed222,
I'll take another look at it. Can you tell me which OS you are using?"

I'm using
-windows xp media center edition 2005
-sp3

Also do you think you could add a volume control for the SW Synth(Midi volume) it be great not having to tell the user to check if their SW Synth volume is turned on every time

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 15th Jul 2008 23:31
Duh! You fixed my problem with the patch for utility 19 that you made in response to Olby's posting. I hadn't installed the patch yet. The problem he was having with particle effectors turned out to be THE SAME problem I was having (although I did not spot it) with gravity effectors. After proposing a free object number for the gravity effector, the command was not recognizing that the effector had now occupied the slot, so it was assigning the same number for the damper when I then called it for that purpose. Everything is fine now. Sorry for the false alarm.
Alex ZhAk
17
Years of Service
User Offline
Joined: 9th Mar 2007
Location: Russia, Moscow
Posted: 18th Jul 2008 14:58 Edited at: 18th Jul 2008 15:21
I think I've found a bug in plugin #28 (winsock). After approx. an hour of normal work, it hangs. All programs, which are using winsock.dll (ICQ, IE, MSN, etc.) hang too. Connection restores, when I close hanged DB Pro application.
I use plugin in a chat program, written on DB Pro (compiler version 6.8). Plugin is used to communicate with server via http protocol.
Tested on systems:
Windows XP Home SP2, Windows Vista

This simple http client code may help:


In fact, winsock.dll stops respond on calls.

We don't have the power, byt we never say never! -Alphaville
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2008 15:35
It sounds like the supply of sockets is being exhausted (there's a maximum of 65535 that can be open per interface). I'll add some tracing to your code and the plug-in to see what's happening.

Thanks for the report

Alex ZhAk
17
Years of Service
User Offline
Joined: 9th Mar 2007
Location: Russia, Moscow
Posted: 18th Jul 2008 18:11
Seems like DELETE SOCKET doesnt work correctly, or SOCKET IS VALID() always return 0. Bug effect floats in time, it can hang in 15 minutes, in 1-2 hours or wont hang at all.

We don't have the power, byt we never say never! -Alphaville
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 18th Jul 2008 18:49
Just how many sockets is it using? Without changing any registry settings you should be allowed a few thousand or so.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2008 21:12 Edited at: 18th Jul 2008 21:14
@Alex,
There's a hole in the logic of your code somewhere. I added logging everywhere there was a DELETE SOCKET, and logged the NEW CONNECT SOCKET, and I was not seeing a delete every loop.

The main receive loop looks like it succeeds, but returns a failure code (I didn't work out why), so a delete is never carried out, leaving the socket in a half-open state - the remote website is closing its end, but your code isn't completing the closure. This leaves the socket in-use and eventually you use up all available sockets.

As soon as I added the following line just prior to the goto, the sockets were closing correctly:


I also noticed that you were grabbing a byte at a time, which makes the download very slow. Instead of that, try to grab all of the available bytes into a memblock or a bank, and write them using my file I/O routines (which are far faster than the DBPro ones).

[EDIT]I forgot to mention the main tool I used to diagnose this - it's called NETSTAT. Just start up a command-line and type in 'netstat -an' and you'll see all open connections and their current state. If you remove the 'n' then the command will attempt to change IP addresses to names, but will run far slower.

Alex ZhAk
17
Years of Service
User Offline
Joined: 9th Mar 2007
Location: Russia, Moscow
Posted: 18th Jul 2008 21:38 Edited at: 18th Jul 2008 21:44
@Benjamin, program uses one socket.

@IanM, you're right. But logic is working correctly: if connection is not present, it connects to host. If error is occured, it disconnects from host and connects to it on next call of start_download() function.
So it connects to host only if:
1) it is a first call of start_download()
2) an arror occured due the latest download session
2) client had been disconnected from the server due the timeout (I don't use Connection: Keep Alive flag at http request)/

We don't have the power, byt we never say never! -Alphaville
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2008 21:44
Ah, I've spotted your error. In the 'start_download' function you always reset the my_channel variable to zero, losing track of the current socket handle if one is already open, and so is always reconnecting.

See, I told you it was you

Alex ZhAk
17
Years of Service
User Offline
Joined: 9th Mar 2007
Location: Russia, Moscow
Posted: 18th Jul 2008 22:12
@IanM,
Hm.. You're right! Thanks for help!
------
P.S. Now we (group of enthusiasts from www.canislupus.ru and wolfs.roadworlds.ru) are involved in interesting project - 'Site in 3D world'. We are writing it on DB Pro (client program) and PHP (on-server scripts). We considered three winsock plugins to DB Pro (GOGA's, Barnsky and Matrix1Util) and decided to use your dll as the fastest and the most stable. If you're interested, we will inform you about creating process.
Best wishes!

We don't have the power, byt we never say never! -Alphaville
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Jul 2008 00:04
That would be great.

If you have any suggestions for new commands that may make things easier for you, just post them here and I'll see what I can do.

That's also an open invitation to anyone else reading this too

Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 19th Jul 2008 02:31
@IanM just incase you missed it from the post above could you add a function to turn the SW Synth(Midi) volume up?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Jul 2008 04:06
I had spotted it and it's on my list - I haven't worked out exactly how it's done yet, but I have found a few clues.

Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 25th Jul 2008 22:07
Awesome dll's Thanks, these are really useful

I need a command that returns a functions own number in the function pointers dll.

Something like GET THIS FUNCTION INDEX is what I'm thinking of
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Jul 2008 22:52
I don't know if that's really worth adding TBH, as it's so easy to write it in DBPro:


Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 25th Jul 2008 22:59
Ah, I hadn't though of doing that.

That should work fine, thanks
RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 3rd Aug 2008 02:51 Edited at: 3rd Aug 2008 02:51
I hope i got the latest version, but in Matrix1Util_03.dll in the string-table
105, "SYSOBJ EXIST[%DD%SysobjExist%Sysobj"
has to be
105, "SYSOBJ EXIST[%DD%SysobjExists%Sysobj"
I had to reshack that

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2008 12:48
Thanks for posting - It's fixed for the next release.

Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 5th Aug 2008 15:08
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Aug 2008 19:08
Not currently, no, and no concrete plans to do it ATM - just some vague intentions for some time in the future. What was it you wanted to do?

Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 6th Aug 2008 00:40
It's ok, I found a hsv to rgb thing quite easily and I can also rewrite the "find free XXX" myself,
just a thought

Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 7th Aug 2008 02:52
WOW, amazing work IanM...some of those commands are just what I was looking for. I can't believe you gave all of this away for free too!!! I will be sure to mention you in all of the programs I make using your plugins that you made the plugin (unless you don't want me too).
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 8th Aug 2008 14:47 Edited at: 8th Aug 2008 14:49
I can't seem to get the Object Size expressions working on the MAKE OBJECT NEW objects, although the Object Angle, Object Exist, and Object In Screen work. Here's the sample program you posted where I've added a few lines to illustrate my problem. I'm using DBP 7.0 beta.


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Aug 2008 15:25 Edited at: 8th Aug 2008 15:27
Actually, this is a problem with DBPro, not the MAKE OBJECT NEW command - the size is zero when it's created (all vertices are placed at 0,0,0), then you've/I've amended it using the vertexdata commands, and it's those commands that haven't reset the size.

Give me a while to work out a fix for it.

[EDIT]
That didn't take long - use the 'hidden' command CALCULATE OBJECT BOUNDS on object 1

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 8th Aug 2008 17:00
Thanks!
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 8th Aug 2008 21:47 Edited at: 8th Aug 2008 21:48
@ IanM
about the Sw Synth windows killer found the soultion
Quote: "SET MUSIC VOLUME. It should change the MIDI volume if the sound loaded with the given sound number is a .mid file."
That was simple

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Aug 2008 12:07 Edited at: 9th Aug 2008 12:11
I have a small problem, which in all likelihood is me having a brain malfunction. It relates to replace all$()



This gets a compilation error -
Quote: "Could not determine parameter type of replace all$(stress2,"/","")..."


I also replaced the last parameter with a string rather than just a double quote, but it didn't work.

RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 9th Aug 2008 12:59
I dont know what version of DBPro/matrix1utils you have, but with 6.9 and latest matrix1utils in Synergy...
..this:

...removes the "/"s and ":"s in both strings...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Aug 2008 13:08 Edited at: 9th Aug 2008 13:09
It worked OK for me too.

The fact that the whole function call is being shown suggests that the plug-in isn't installed in the correct place, so check that out first.

There's another alternative too - I had a problem with the 6.8 release where it couldn't locate a particular command in my bank plug-in, but could locate the rest - never did get to the bottom of it, but maybe you could have the same problem? Try replacing the REPLACE ALL$ with REMOVE ALL$ and see if this fixes it.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Aug 2008 10:52
Doh! I installed all utils, then removed 16, because it clashed with Styx.

I need commands from both so I guess I need to look into changing command names again in the string table.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 17th Aug 2008 11:24
I had to give Styx the axe. At first I renamed Matrix1 commands, but then I upgraded and didn't want to bother with that again. There are specific commands in Styx that are extremely useful but I think they are more situational than anything.


Come see the WIP!
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 23rd Aug 2008 22:43
Hi IanM , I really like your plugins, most of these commands should have been made for the first release of DBPro.

I just have a question about your network dll : is it possible to have a non-blocking Accept command ? I know there is the Set Socket Blocking command but I can't find anything that gives the number of pending connexions on the socket.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Aug 2008 23:18
There isn't anything that will tell you the number of pending connections in the windows API that I'm aware of, and I haven't implemented a non-blocking accept because it isn't really necessary:


Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 23rd Aug 2008 23:25
Thank you, actually, your code was what I was trying to do. Now I feel dumb...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Aug 2008 23:49
It's in the tutorial document and the code that accompanies it - you can find the link to that on the very first post.

If you take a look at the code in EchoServer02, you'll find it in the AcceptNewConnection function (The function does nothing with the socket, but by that point, it's created/connected and added to the internal checklist and can be recovered by the PERFORM CHECKLIST FOR SOCKET command or FIRST SOCKET/NEXT SOCKET functions.)

Login to post a reply

Server time is: 2024-11-22 17:20:49
Your offset time is: 2024-11-22 17:20:49