If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Win32API bug
8 posts
• Page 1 of 1
Win32API bug
Hi All,
Anybody else having trouble with the Win32API Ruby library? I'm finding it really useful for calling the Windows API to add new features to FlowStone - however, it seems to crash whenever you try to 'require' it from an exported EXE or VST.
I have copied the necessary files to the same directory as the export, as directed by the manual, and my testing indicates that the file IS being found. But it seems that Ruby fails without even raising an exception as soon as it tries to import the C-extension 'dl.so' (the interfacing code for the API).
Here's a test schematic - I'd be really grateful if anyone could confirm the problem - particularly on Win7/8, as I'm still on XP, so Malc will want to know if the bug is OS specific.
To run the test, you need to follow these steps.
1) - Export the test module to an EXE in a known directory path.
2) - Go to your Flowstone installation directory, i.e. /Program Files/DSPRobotics/Flowstone (or Program Files(x86) if you use Win7/8).
3) Copy the whole of the 'ruby' sub-folder into the same directory as the export to make the library available.
4) Run the EXE.
In the EXE window, you should see...
1) - A list of directories that were searched for the file.
2) - The current working directory, should be the same as the directory where the EXE is placed.
3) - One or more 'Found' messages to say that Win32API was successfully located.
4) - POSSIBLY - a message to say that Win32PI was 'required' successfully.
If you DON'T see the 'require SUCCESS' message, Ruby has bombed out in the same way that I'm seeing here (two different machines show the same problem). Due to Ruby bombing, I can't get any better diagnostics than that - so remember that you are checking that you DON'T see this last message.
If you see a 'LoadError' message, the file has not been found - check that you copied the 'ruby' folder to the right location.
Thanks for any help with this. I'm working on a test/de-bugging suite for FlowStone at the moment that I think folks will find very useful - and I want this to be able to work with exports so that you can debug plugins while they're actually in use within a host. Not having Win32API in exports really screws this up!!
Best wishes,
Trog.
Anybody else having trouble with the Win32API Ruby library? I'm finding it really useful for calling the Windows API to add new features to FlowStone - however, it seems to crash whenever you try to 'require' it from an exported EXE or VST.
I have copied the necessary files to the same directory as the export, as directed by the manual, and my testing indicates that the file IS being found. But it seems that Ruby fails without even raising an exception as soon as it tries to import the C-extension 'dl.so' (the interfacing code for the API).
Here's a test schematic - I'd be really grateful if anyone could confirm the problem - particularly on Win7/8, as I'm still on XP, so Malc will want to know if the bug is OS specific.
To run the test, you need to follow these steps.
1) - Export the test module to an EXE in a known directory path.
2) - Go to your Flowstone installation directory, i.e. /Program Files/DSPRobotics/Flowstone (or Program Files(x86) if you use Win7/8).
3) Copy the whole of the 'ruby' sub-folder into the same directory as the export to make the library available.
4) Run the EXE.
In the EXE window, you should see...
1) - A list of directories that were searched for the file.
2) - The current working directory, should be the same as the directory where the EXE is placed.
3) - One or more 'Found' messages to say that Win32API was successfully located.
4) - POSSIBLY - a message to say that Win32PI was 'required' successfully.
If you DON'T see the 'require SUCCESS' message, Ruby has bombed out in the same way that I'm seeing here (two different machines show the same problem). Due to Ruby bombing, I can't get any better diagnostics than that - so remember that you are checking that you DON'T see this last message.
If you see a 'LoadError' message, the file has not been found - check that you copied the 'ruby' folder to the right location.
Thanks for any help with this. I'm working on a test/de-bugging suite for FlowStone at the moment that I think folks will find very useful - and I want this to be able to work with exports so that you can debug plugins while they're actually in use within a host. Not having Win32API in exports really screws this up!!
Best wishes,
Trog.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Win32API bug
Win 7 no 'require SUCCESS' message
sorry
sorry
Last edited by Xtinct on Fri Jun 20, 2014 4:58 pm, edited 1 time in total.
- Xtinct
- Posts: 106
- Joined: Fri Feb 11, 2011 12:06 am
Re: Win32API bug
Wow, that was fast!
Many thanks, this is exactly what Malc needs to know so that he can get to the source of the bug - I'll pass that info onto him straight away.
No need to apologise - it's not your fault that Flowstone has a bug!
Many thanks, this is exactly what Malc needs to know so that he can get to the source of the bug - I'll pass that info onto him straight away.
Xtinct wrote:sorry
No need to apologise - it's not your fault that Flowstone has a bug!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Win32API bug
Hi Trog!
My System:
Win8 64 bit Quad Core
with Admin rights
cheers,
Walter
My System:
Win8 64 bit Quad Core
with Admin rights
cheers,
Walter
- Attachments
-
- win32API Test_in FS.png (53.92 KiB) Viewed 15928 times
-
- Win32API Test.png (28.92 KiB) Viewed 15928 times
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Win32API bug
Brilliant - thanks Walter.
That pretty much wraps it up then - definitely something in Flowstone.
Looking at the reports, I also notice something else...
The User guide states that you must copy the 'ruby' folder OR have FS installed on the machine. However, no-ones $LOAD_PATH includes the 'win32/common' folder from Program Files - just a duplicate of the working directory relative path. This is why I explicitly asked for folks to copy the folder - were the user guide and $LOAD_PATH correct, this shouldn't be necessary for any of us. Seems that this is "universal" to all installations as well.
Time to mail Malc again!
That pretty much wraps it up then - definitely something in Flowstone.
Looking at the reports, I also notice something else...
The User guide states that you must copy the 'ruby' folder OR have FS installed on the machine. However, no-ones $LOAD_PATH includes the 'win32/common' folder from Program Files - just a duplicate of the working directory relative path. This is why I explicitly asked for folks to copy the folder - were the user guide and $LOAD_PATH correct, this shouldn't be necessary for any of us. Seems that this is "universal" to all installations as well.
Time to mail Malc again!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Win32API bug
Failing on Windows 8 here, too.
However I think it tries to load the lib, when you copy the ruby folder to the root of your EXE filesystem. eg. when the EXE is on drive C, copy the ruby folder to C:/ruby. Problem there is quite bad, though. It crashs the EXE instantly.
However I think it tries to load the lib, when you copy the ruby folder to the root of your EXE filesystem. eg. when the EXE is on drive C, copy the ruby folder to C:/ruby. Problem there is quite bad, though. It crashs the EXE instantly.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Win32API bug
Hi MyCo,
From what I've been able to tell, the problem is with the underlying 'DL' class - 'Win32API' is just a simple wrapper around that to maintain compatibility with older Ruby versions after the original class was deprecated.
'DL' uses an '.so' file - i.e. a compiled 'C' extension - and it seems that this is the sticking point. If you make a 'dummy' Win32API.rb file and put it in the right place, it will require no problem, and I've had no problems requiring my own native Ruby libraries from any folder I care to.
Even adding the proper entry to $LOAD_PATH for the install path version of the file makes no difference.
I've also seen the complete crashing - "Problem encountered, had to close" etc.- but can't quite get a handle on when or why. Your example might give a hint though - some kind of access permission maybe? Allowing items in a folder to execute is a distinct permission from 'read/write' within the OS, IIRC - maybe this applies to the 'dl.so' file because it is a compiled binary?
From what I've been able to tell, the problem is with the underlying 'DL' class - 'Win32API' is just a simple wrapper around that to maintain compatibility with older Ruby versions after the original class was deprecated.
'DL' uses an '.so' file - i.e. a compiled 'C' extension - and it seems that this is the sticking point. If you make a 'dummy' Win32API.rb file and put it in the right place, it will require no problem, and I've had no problems requiring my own native Ruby libraries from any folder I care to.
Even adding the proper entry to $LOAD_PATH for the install path version of the file makes no difference.
I've also seen the complete crashing - "Problem encountered, had to close" etc.- but can't quite get a handle on when or why. Your example might give a hint though - some kind of access permission maybe? Allowing items in a folder to execute is a distinct permission from 'read/write' within the OS, IIRC - maybe this applies to the 'dl.so' file because it is a compiled binary?
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Win32API bug
Just had a mail from Malc about this problem.
It seems it was introduced during the last update. One of the big features was having Ruby statically linked within the exports, to avoid the problems with shared Ruby namespace and make unpacking of the interpreter and .dlls unnecessary.
However, a side effect of this is that Ruby can no longer dynamically link to C-extensions, such as the DL class within Win32API- native Ruby files are fine, but not binary '.so' files.
He's offered to make the old method of embedding Ruby available as an export option, but I'm not too comfortable with giving him extra work to do and slowing down the next release just for little old me - I've yet to see anyone else using Win32API for anything! Much easier for him to just edit the User Guide to make the situation clear.
If anyone else feels that access to Win32API/C-extensions is a "must have" feature, then let me or Malc know. Otherwise it's time for me to roll my sleeves up, fire up Visual Studio, and get to grips with the dreaded C++.
It seems it was introduced during the last update. One of the big features was having Ruby statically linked within the exports, to avoid the problems with shared Ruby namespace and make unpacking of the interpreter and .dlls unnecessary.
However, a side effect of this is that Ruby can no longer dynamically link to C-extensions, such as the DL class within Win32API- native Ruby files are fine, but not binary '.so' files.
He's offered to make the old method of embedding Ruby available as an export option, but I'm not too comfortable with giving him extra work to do and slowing down the next release just for little old me - I've yet to see anyone else using Win32API for anything! Much easier for him to just edit the User Guide to make the situation clear.
If anyone else feels that access to Win32API/C-extensions is a "must have" feature, then let me or Malc know. Otherwise it's time for me to roll my sleeves up, fire up Visual Studio, and get to grips with the dreaded C++.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 43 guests