Smart Mobile Studio works, but socket:listen() fails?

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
User avatar
quartexNOR
Posts: 7
Joined: Tue Dec 06, 2016 9:25 pm

Smart Mobile Studio works, but socket:listen() fails?

Post by quartexNOR »

Hi!

First, very impressed by ReactOS! So awesome! Probably the most impressive thing I have seen in 2016 hands down.

The first thing I did was to copy over our system, the Smart Mobile Studio compiler and IDE, and it worked more or less 99.9% out of the box (fantastic!).
PS: if you dont know what SMS is, visit http://www.smartmobilestudio.com and read about it. Basically an object pascal compiler that emits VMT based javascript rather than asm.
Giving you all the cool stuff Delphi and Lazarus have, but for node.js and HTML5.

Interestingly, SMS ships with Chromium embedded, and the webkit engine rendered without any problems. I was actually expecting some problems there since webkit is pretty extensive and calls some heavy duty aspects of WinAPI. Its probably safe to say that it uses most of the advanced features an OS has to offer (memory mapping, threading, semaphores, sockets, pipes - and that is before JSVM + debugging. Not to mention the rendering process).

But all the graphics stuff i threw at it, like cpu tweening, gpu tweening and CSS3 GPU powered effects seem to work (although its hard to tell if the actual GPU was used since I would have to recompile with -gpuMarker option). I have a brand new i7 +32giga+ssd based PC that was assembled for running vmware (I do all my development in VMWare) so it's hard to notice what is GPU or CPU at times.

[ external image ]

I did notice quite a bit of redraw glitches in general. Like window content not updating properly, some misaligned UI elements and border issues, windows leaving trailmarks when you minimize/maximize and move them around the desktop (not just SMS, but other applications as well. Including notepad). But ReactOS is still young so I consider these superficial. I mean, an OS is 90% non-visible code after all :)

What I did have problems with however and that I could use some help with, was starting the built-in server for our IDE. Its a normal http server (Indy Delphi component) set to listen on port 8090. I keep getting the error message: "Socket Error 10022 Invalid argument". I have never seen this error before, even under Wine emulation on Linux. And yes, I naturally tried other ports as well - same error.

Looking it up on google i find the following information:

Code: Select all

WSAEINVAL (10022)  Invalid argument. 
Some invalid argument was supplied (for example, specifying an invalid level 
to the setsockopt() function). In some instances, it also refers to the 
current state of the socket - for instance, calling accept() on a socket 
that is not listen()ing. 
This seems like a bug in ReactOS because SmartMS runs fine on all versions of windows, Linux under Wine - and I even have it running on OSX through wine packager.

Since I'm running this in VMWare with NAT (could not get bridged network mode to work at all), could it be the actual Windows 10 that i run vmware under that refuses the bind (?) Or do i need to set some credentials somewhere? Firefox had no problems running (except its getting old so rendering modern websites left a lot to be desired, but that it works is frikking awesome so I dont care), but that doesnt set a socket in listen mode.

In short -- how can I resolve this? The Indy components are to-the-letter implemented and follows every aspect of the RFC's to the letter. It is (as mentioned) used by uncountable developers in their applications every single day. So with all respect, I think this bug stems from ReactOS and not Indy. But I really want to come up with a work-around.

Other than that I am totally stoked at how cool this project is! And I cant wait until that day when I can install Delphi, C++ builder and Smart Mobile Studio on a USB stick and carry my office in my pocket.
Well, hope someone can give some advice regarding the http listen problem? I would love to promote and evangelize ReactOS and use it for x86 embedded work!

Oh, and node.js refuse to start. It demands Windows 7. Any way we can trick it into working? The binary uses nothing in particular from Windows 7, so its just a conceptual restriction by the node.js consortium.
Getting node.js to run on ReactOS is paramount!
Last edited by quartexNOR on Wed Dec 07, 2016 9:28 am, edited 3 times in total.

hbelusca
Developer
Posts: 1186
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Smart Mobile Studio works, but socket:listen() fails?

Post by hbelusca »

Hi! Interesting screencapture! Is this under ReactOS 0.4.3 that you are running SMS? Also I'm interested to know (as a developer) whether the window title icon is also drawn that big when you run it on a real Windows (2003, or 7 ...).

User avatar
quartexNOR
Posts: 7
Joined: Tue Dec 06, 2016 9:25 pm

Re: Smart Mobile Studio works, but socket:listen() fails?

Post by quartexNOR »

hbelusca wrote:Hi! Interesting screencapture! Is this under ReactOS 0.4.3 that you are running SMS? Also I'm interested to know (as a developer) whether the window title icon is also drawn that big when you run it on a real Windows (2003, or 7 ...).
Hi! No the icon is a standard multi-bitmap resource, so it should have been a small 16x16 icon in this case, with the large icon reserved for the desktop/shortcuts.
Smart is written 100% is Delphi XE7 (give or take a few C++ builder snippets here and there) and is fairly os friendly. I have an XP box around the house that I use for testing, and it runs fine there as well.
This is a living commercial product (commandline compiler is free though). I was hoping to create a special edition for ReactOS that can be in your package manager :)

Not sure about the version, i downloaded it today from the website, and that says: 0.4.3
Running on VMWare 12.1.1.

User avatar
dizt3mp3r
Posts: 1627
Joined: Mon Jun 14, 2010 5:54 pm

Re: Smart Mobile Studio works, but socket:listen() fails?

Post by dizt3mp3r »

I think that is good enough to go into the epic win category despite a few failings it is impressive.
Skillset: VMS sysadmin 20 years, fault Tolerance, cluster, Vax, Alpha, ftSparc. DCL, QB45, VB6, NET, PHP, JS, CMS, Graphics, Project Manager, DOS, Windows admin from 1985. Quad Electronics. Classic cars & motorbikes. Artist watercolours. Historian.

User avatar
quartexNOR
Posts: 7
Joined: Tue Dec 06, 2016 9:25 pm

Re: Smart Mobile Studio works, but socket:listen() fails?

Post by quartexNOR »

hbelusca wrote:Hi! Interesting screencapture! Is this under ReactOS 0.4.3 that you are running SMS? Also I'm interested to know (as a developer) whether the window title icon is also drawn that big when you run it on a real Windows (2003, or 7 ...).
Anything I can do to get the server going? The server component we use is a part of the Delphi and C++ builder's standard install; The package is called Indy and is used by hundreds of thousands of Delphi developers on a daily basis. It has been used in production environments for over a decade, and is used both on Windows, Linux (via FPC/Lazarus) and OS X. It also compiled and works fine for Android and iOS and is pretty much considered rock solid.

This is the first time I have ever seen an exception with regards to socket->listen() (except naturally if the network is unavailable or someone pulled the cable out), but the error message I get is completely alien. Never seen that before.
It doesnt look like an exception Indy would throw, but rather a string issued by the tcp/ip stack of higher up in the food-chain.

It really would be fantastic to figure out what is causing this. We would be more than willing to create a "ReactOS special edition" with a reduced price and extended trial period (its also the cheapest rad tool on the market considering the amount of work and size of our RTL and libraries). Developers that use C++ builder, Delphi or Lazarus tend to jump in and master it in few days. The RTL shares a lot of commonalities with the VCL and LCL frameworks.

It would also be strategically good for ReactOS with concern for web tools. I would imagine getting CLR and dot net to run flawlessly will be a challenge.
But since node.js is by far the most popular client/server technology these days, both for DB middleware and dynamic websites -- Smart Mobile Studio and Lazarus in the package-manager makes sense.

milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Smart Mobile Studio works, but socket:listen() fails?

Post by milon »

This is unlikely to solve it, but you can always try the latest build (https://www.reactos.org/getbuilds/). I know there was work on the socket stuff during GSoC (lwIP integration, see https://reactos.org/blogs/google-soc-lwip-conclusion) this year, but I don't know to what extent that's been committed to Trunk yet.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests