Opera Lover | 3 May 00:04 2010
Picon

Compile Neko (1.8.1) with Visual Studio 2008

Hi all,

I am trying to compile Neko using Visual Studio 2008. I am doing that because I am experiencing the problem "Fatal error in gc / SuspendThread failed" randomly in my HaXe SWHX (Flash) application.

More info on:

I am not using mod_neko, so I followed the hint that Nicolas said in that previous post.

But... the problem is that I can not compile Neko! I have the old MSVCRT.lib (vcrt 6.0) but I have problems with some __iob_func that can not be found (!?).

Please, can someone help me with this? Many thanks!!


Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Opera Lover | 4 May 12:44 2010
Picon

SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed


Hi all,
I was in a hurry when posting the previous message to the list about help with compiling Neko.
Now I have time to elaborate my problem. My target system is Windows XP 32bit. I am distributing a Autorun CD
that in turn loads a SWHX Application with the Flash plugin embedded. The user has no need to install
anything to execute the program.
I have done this kind of work before, and never found a problem.
But now, I have coded a HaXe/Flash AS3 map program that loads a lot of JPG images on demand (when scrolling
with the mouse). If the user moves the map, sometimes (not always) the program fails with this alert box:
/- Fatal error in gc --------x-\|                              ||  (X) SuspendThread failed    ||
                             ||                    [  OK  ]  ||                        
     |\------------------------------/
I searched over the mailing lists, forums, blogs, etc. and I found this:
[Neko] Fatal error in gc (Nov 2008)http://lists.motion-twin.com/pipermail/neko/2008-November/002442.htmlhttp://lists.motion-twin.com/pipermail/neko/2008-November/002443.html
In that thread, Nicolas Cannasse tells that the problem is related to GC.DLL library used and some
Antivirus programs. In fact, if I attach a Visual Studio debugger to the program it never fails!
In the same thread, Nicolas suggests:
Nicolas said: "As for your application, if you're not usingmod_neko you can ship a Neko version with the
GC_use_DllMain()commented out and it should work like a charm."
That was I tried, comment the line #120 in alloc.c, inside nekovm_dll project (at Visual Studio Solution).
But, I then faced the following problem: old MSVCRT (6.0) has to be referenced.http://ncannasse.fr/blog/binaries_backward_compatibility
I have an old Visual C++ 6.0 installation, and therefore I can access the required .lib file, but I can not go
any further... The provided Visual Studio 2003 solution does not compile :-(
I do not know how to follow the steps suggested by Matt Campbell on that blog post.
So, I ask you for help with this.
If any of you can compile a Windows Neko executable with that "alloc.c" line commented, and send it to me, I
will be very grateful.
Or, if you can guide me to be able to compile Neko with Visual Studio 2008 and MSVCRT60.lib (which I have), I
also will be very grateful.
Anyway, if you know this error is already fixed in some HaXe/SWHX/Neko version, can you tell me? I am
currently using HaXe 2.0.5, Neko 1.8.1 and SWHX 1.2.0 (all targeting Flash AS3, played with a Flash 10
embedded player).

Thanks for your information and time
Regards 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Opera Lover | 4 May 13:00 2010
Picon

SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed (CR ok)

Hi all,

I was in a hurry when posting the previous message to the list about 
help with compiling Neko.

Now I have time to elaborate my problem. My target system is Windows XP 
32bit. I am distributing a Autorun CD that in turn loads a SWHX 
Application with the Flash plugin embedded. The user has no need to 
install anything to execute the program.

I have done this kind of work before, and never found a problem.

But now, I have coded a HaXe/Flash AS3 map program that loads a lot of 
JPG images on demand (when scrolling with the mouse). If the user moves 
the map, sometimes (not always) the program fails with this alert box:

/- Fatal error in gc --------x-\
|  (X) SuspendThread failed    |
|                    [  OK  ]  |
\------------------------------/

I searched over the mailing lists, forums, blogs, etc. and I found this:

[Neko] Fatal error in gc (Nov 2008)
http://lists.motion-twin.com/pipermail/neko/2008-November/002442.html
http://lists.motion-twin.com/pipermail/neko/2008-November/002443.html

In that thread, Nicolas Cannasse tells that the problem is related to 
GC.DLL library used and some Antivirus programs. In fact, if I attach a 
Visual Studio debugger to the program it never fails!

In the same thread, Nicolas suggests:

Nicolas said: "As for your application, if you're not using
mod_neko you can ship a Neko version with the GC_use_DllMain()
commented out and it should work like a charm."

That was I tried, comment the line #120 in alloc.c, inside nekovm_dll 
project (at Visual Studio Solution).

But, I then faced the following problem: old MSVCRT (6.0) has to be 
referenced.
http://ncannasse.fr/blog/binaries_backward_compatibility

I have an old Visual C++ 6.0 installation, and therefore I can access 
the required .lib file, but I can not go any further... The provided 
Visual Studio 2003 solution does not compile :-(

I do not know how to follow the steps suggested by Matt Campbell on that 
blog post.

So, I ask you for help with this.

If any of you can compile a Windows Neko executable with that "alloc.c" 
line commented, and send it to me, I will be very grateful.

Or, if you can guide me to be able to compile Neko with Visual Studio 
2008 and MSVCRT60.lib (which I have), I also will be very grateful.

Anyway, if you know this error is already fixed in some HaXe/SWHX/Neko 
version, can you tell me? I am currently using HaXe 2.0.5, Neko 1.8.1 
and SWHX 1.2.0 (all targeting Flash AS3, played with a Flash 10 embedded 
player).

Thanks for your information and time

Regards

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Nicolas Cannasse | 4 May 14:05 2010

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed

Opera Lover a écrit :
> Hi all,
> I was in a hurry when posting the previous message to the list about help with compiling Neko.
> Now I have time to elaborate my problem. My target system is Windows XP 32bit. I am distributing a Autorun CD
that in turn loads a SWHX Application with the Flash plugin embedded. The user has no need to install
anything to execute the program.
> I have done this kind of work before, and never found a problem.
> But now, I have coded a HaXe/Flash AS3 map program that loads a lot of JPG images on demand (when scrolling
with the mouse). If the user moves the map, sometimes (not always) the program fails with this alert box:
> /- Fatal error in gc --------x-\|                              ||  (X) SuspendThread failed    ||                              ||                    [  OK  ]  ||                              |\------------------------------/
> I searched over the mailing lists, forums, blogs, etc. and I found this:
> [Neko] Fatal error in gc (Nov 2008)http://lists.motion-twin.com/pipermail/neko/2008-November/002442.htmlhttp://lists.motion-twin.com/pipermail/neko/2008-November/002443.html
> In that thread, Nicolas Cannasse tells that the problem is related to GC.DLL library used and some
Antivirus programs. In fact, if I attach a Visual Studio debugger to the program it never fails!
> In the same thread, Nicolas suggests:
> Nicolas said: "As for your application, if you're not usingmod_neko you can ship a Neko version with the
GC_use_DllMain()commented out and it should work like a charm."
> That was I tried, comment the line #120 in alloc.c, inside nekovm_dll project (at Visual Studio Solution).
> But, I then faced the following problem: old MSVCRT (6.0) has to be referenced.http://ncannasse.fr/blog/binaries_backward_compatibility
> I have an old Visual C++ 6.0 installation, and therefore I can access the required .lib file, but I can not go
any further... The provided Visual Studio 2003 solution does not compile :-(
> I do not know how to follow the steps suggested by Matt Campbell on that blog post.
> So, I ask you for help with this.
> If any of you can compile a Windows Neko executable with that "alloc.c" line commented, and send it to me, I
will be very grateful.
> Or, if you can guide me to be able to compile Neko with Visual Studio 2008 and MSVCRT60.lib (which I have), I
also will be very grateful.
> Anyway, if you know this error is already fixed in some HaXe/SWHX/Neko version, can you tell me? I am
currently using HaXe 2.0.5, Neko 1.8.1 and SWHX 1.2.0 (all targeting Flash AS3, played with a Flash 10
embedded player).

You can try to recompile Neko + all neko libraries with your 
VisualStudio, since you maybe don't have to use MSVCRT 6.0

Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Opera Lover | 5 May 12:44 2010
Picon

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed

On 04/05/2010 14:05, Nicolas Cannasse wrote:
>
> You can try to recompile Neko + all neko libraries with your 
> VisualStudio, since you maybe don't have to use MSVCRT 6.0
>
> Nicolas
>

Hi Nicolas,

That is the problem, I need to target MSVCRT 6.0 because my app should 
not require users to install anything (I think that Windows XP shipped 
with that DLL).

By the way, will I need to recompile also the Neko libraries? I though 
that I will be able to use their precompiled binaries (I though I only 
needed to comment the GC_use_DllMain() line in alloc.c).

Can some of you already able to compile Neko for Windows please compile 
a Neko binary with this small change (using MSVCRT 6.0)? Many thanks.

Regards

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

jmerrill | 5 May 18:11 2010

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed


IIRC, you're delivering your software on a CD.  You should be able to include any version of MSVCRT that you want on the CD in the same directory as your other executables, and that's what will be used when the code runs.

I hope that info is useful to you.  (You might want to download Process Explorer from sysinternals.com.  It will let you see what DLLs a process has loaded -- to confirm that the DLL you're delivering is the one that the process is loading.)

J. Merrill

From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/05/2010 06:46 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>




On 04/05/2010 14:05, Nicolas Cannasse wrote:
>
> You can try to recompile Neko + all neko libraries with your
> VisualStudio, since you maybe don't have to use MSVCRT 6.0
>
> Nicolas
>

Hi Nicolas,

That is the problem, I need to target MSVCRT 6.0 because my app should
not require users to install anything (I think that Windows XP shipped
with that DLL).

By the way, will I need to recompile also the Neko libraries? I though
that I will be able to use their precompiled binaries (I though I only
needed to comment the GC_use_DllMain() line in alloc.c).

Can some of you already able to compile Neko for Windows please compile
a Neko binary with this small change (using MSVCRT 6.0)? Many thanks.

Regards

--
Neko : One VM to run them all
(http://nekovm.org)



--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Opera Lover | 7 May 12:48 2010
Picon

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed

Hi again,

I tried that you said (putting DLLs in the same folder that recompiled Neko is), but I ended with a Neko.exe that can not start in a Windows XP SP3 clean environment (no .NET installed). So I think I will have to try the MSVCRT 6.0 route again...

Any hint/help about that? Many thanks!
 

On 05/05/2010 18:11, jmerrill <at> mmm.com wrote:

IIRC, you're delivering your software on a CD.  You should be able to include any version of MSVCRT that you want on the CD in the same directory as your other executables, and that's what will be used when the code runs.

I hope that info is useful to you.  (You might want to download Process Explorer from sysinternals.com.  It will let you see what DLLs a process has loaded -- to confirm that the DLL you're delivering is the one that the process is loading.)

J. Merrill

From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/05/2010 06:46 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>




On 04/05/2010 14:05, Nicolas Cannasse wrote:
>
> You can try to recompile Neko + all neko libraries with your
> VisualStudio, since you maybe don't have to use MSVCRT 6.0
>
> Nicolas
>

Hi Nicolas,

That is the problem, I need to target MSVCRT 6.0 because my app should
not require users to install anything (I think that Windows XP shipped
with that DLL).

By the way, will I need to recompile also the Neko libraries? I though
that I will be able to use their precompiled binaries (I though I only
needed to comment the GC_use_DllMain() line in alloc.c).

Can some of you already able to compile Neko for Windows please compile
a Neko binary with this small change (using MSVCRT 6.0)? Many thanks.

Regards

--
Neko : One VM to run them all
(http://nekovm.org)





--

-- 
Neko : One VM to run them all
(http://nekovm.org)
jmerrill | 7 May 21:20 2010

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed


What's the "cannot start" symptom that you see?  You might be able to use Process Monitor (from the same source as Process Explorer) to determine that -- just as a possible example -- the version of MSVCRT that you put into your directory requires a matching ABCD.DLL that you'd also have to include in your directory, because it doesn't come with XP SP3.

Process Monitor is not super-easy to use.  If it's Neko.exe that can't start, set a Process Name filter to specify that, and don't leave it turned on for very long.  (Turn it on, try running neko.exe, then turn it off and look at the accumulated info.)

J. Merrill



From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/07/2010 06:50 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) -        Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>




Hi again,

I tried that you said (putting DLLs in the same folder that recompiled Neko is), but I ended with a Neko.exe that can not start in a Windows XP SP3 clean environment (no .NET installed). So I think I will have to try the MSVCRT 6.0 route again...

Any hint/help about that? Many thanks!


On 05/05/2010 18:11, jmerrill <at> mmm.com wrote:

IIRC, you're delivering your software on a CD.  You should be able to include any version of MSVCRT that you want on the CD in the same directory as your other executables, and that's what will be used when the code runs.

I hope that info is useful to you.  (You might want to download Process Explorer from sysinternals.com.  It will let you see what DLLs a process has loaded -- to confirm that the DLL you're delivering is the one that the process is loading.)

J. Merrill
From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/05/2010 06:46 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>





On 04/05/2010 14:05, Nicolas Cannasse wrote:
>
> You can try to recompile Neko + all neko libraries with your
> VisualStudio, since you maybe don't have to use MSVCRT 6.0
>
> Nicolas
>

Hi Nicolas,

That is the problem, I need to target MSVCRT 6.0 because my app should
not require users to install anything (I think that Windows XP shipped
with that DLL).

By the way, will I need to recompile also the Neko libraries? I though
that I will be able to use their precompiled binaries (I though I only
needed to comment the GC_use_DllMain() line in alloc.c).

Can some of you already able to compile Neko for Windows please compile
a Neko binary with this small change (using MSVCRT 6.0)? Many thanks.

Regards

--
Neko : One VM to run them all
(http://nekovm.org)




--
Neko : One VM to run them all
(http://nekovm.org)

--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Bo Lorentsen | 9 May 11:17 2010
Picon

How objects are accessed

Hi ...

I have been looking into Neko quite a lot lately, as it seems to be a 
project with some good momentum (thanks to HaXe i quess). I have tried 
to make my own language once (http://trac.lue.dk/tea), and it fun to 
make a language, but its hard maintain it outside its narrow domain.

Well, the VM in tea are stack based (not very optimal, but fun to 
write), so the type system was the really special part (all values was 
the same base type). In the domain i wrote TEA in needed to be able to 
resolve complex types (objects) as late/lazy as possible, but type safe. 
The reason for this was that I had a DB, and all elements (tables) in 
the database needed to be visible to the language, but I only created 
the full object if the script tried to access the object (this was at 
compile time, not runtime). Also, I need to define the lazy object based 
on meta data, and not just by loading data (that i did not have, at 
compile time).

This method made it possible to validate if the scripts was accessing 
the prober elements in the DB, and that the types was right (based on 
meta data directly from DB), and when there were very few subjects left 
to resolve besides bade controle statements :-)

Also, I used refcount for values, as I disliked the sweep delete problem 
(strange delays), and I just love destructor's, for non memory resources :-)

So my question is, it it possible to in Neko to create types lazy, at 
compile time like descried, or something like it ? Also is it possible 
to have real refcount values, and destructor's ?

Kind regards ...

/BL

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Opera Lover | 10 May 17:17 2010
Picon

Re: SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile Neko help needed

Hi again J.Merrill,

When I execute recompiled neko.exe in a command prompt (cmd.exe) it simply says:
"The system cannot execute the specified program." (not quite verbose IMHO)

Now, if I go to the event viewer, the error details are:

Error, Event ID: 32
Description: Dependent Assembly Microsoft.VC90.CRT could not be found and Last Error was The referenced assembly is not installed on your system.

Error, Event ID: 59
Description: Resolve Partial Assembly failed for Microsoft.VC90.CRT. Reference error message: The referenced assembly is not installed on your system.
.

So I think it does not work with simply copying the required DLLs in the same folder as the neko.exe (as in .NET, where this approach works). I also tried with Dependency Walker (a Visual Studio tool) to copy all the required DLLs:
- msvcm90.dll
- msvcp90.dll
- msvcr90.dll

So, I am afraid that I am back with the original problem... trying to recompile neko.exe with MSVCRT 6.0.

Thanks for your help :-)


On 07/05/2010 21:20, jmerrill <at> mmm.com wrote:

What's the "cannot start" symptom that you see?  You might be able to use Process Monitor (from the same source as Process Explorer) to determine that -- just as a possible example -- the version of MSVCRT that you put into your directory requires a matching ABCD.DLL that you'd also have to include in your directory, because it doesn't come with XP SP3.

Process Monitor is not super-easy to use.  If it's Neko.exe that can't start, set a Process Name filter to specify that, and don't leave it turned on for very long.  (Turn it on, try running neko.exe, then turn it off and look at the accumulated info.)

J. Merrill



From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/07/2010 06:50 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) -        Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>




Hi again,

I tried that you said (putting DLLs in the same folder that recompiled Neko is), but I ended with a Neko.exe that can not start in a Windows XP SP3 clean environment (no .NET installed). So I think I will have to try the MSVCRT 6.0 route again...

Any hint/help about that? Many thanks!


On 05/05/2010 18:11, jmerrill <at> mmm.com wrote:

IIRC, you're delivering your software on a CD.  You should be able to include any version of MSVCRT that you want on the CD in the same directory as your other executables, and that's what will be used when the code runs.

I hope that info is useful to you.  (You might want to download Process Explorer from sysinternals.com.  It will let you see what DLLs a process has loaded -- to confirm that the DLL you're delivering is the one that the process is loading.)

J. Merrill
From: Opera Lover <opera362 <at> hotmail.com>
To: neko <at> lists.motion-twin.com
Date: 05/05/2010 06:46 AM
Subject: Re: [Neko] SuspendThread problem (SHWX + Neko + GC.DLL) - Recompile        Neko help needed
Sent by: <neko-bounces <at> lists.motion-twin.com>





On 04/05/2010 14:05, Nicolas Cannasse wrote:
>
> You can try to recompile Neko + all neko libraries with your
> VisualStudio, since you maybe don't have to use MSVCRT 6.0
>
> Nicolas
>

Hi Nicolas,

That is the problem, I need to target MSVCRT 6.0 because my app should
not require users to install anything (I think that Windows XP shipped
with that DLL).

By the way, will I need to recompile also the Neko libraries? I though
that I will be able to use their precompiled binaries (I though I only
needed to comment the GC_use_DllMain() line in alloc.c).

Can some of you already able to compile Neko for Windows please compile
a Neko binary with this small change (using MSVCRT 6.0)? Many thanks.

Regards

--
Neko : One VM to run them all
(http://nekovm.org)


--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Gmane