1. Bound program doesn't execute

For some reason this forum changes all my formatting. Please read it anyway.

I'm running Version 4.0.0 beta 2 (r2670) for Windows on Vista Home. This little test program works fine if interpreted with euiw, but the bound version fails to execute. What am I doing wrong and how do I do it right?

Program:

 
--  code generated by Win32Lib IDE v1.0.4 Build Apr-22-2008 
 
constant TheProgramType="exw" 
  
include Win32Lib.ew 
without warning 
 
-------------------------------------------------------------------------------- 
--  Window Window1 
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) 
constant PushButton2 = createEx( PushButton, "PushButton2", Window1, 104, 92, 88, 28, 0, 0 ) 
--------------------------------------------------------- 
-------------------------------------------------------------------------------- 
procedure PushButton2_onClick (integer self, integer event, sequence params)--params is () 
	object comp 
	comp = message_box("How now, brown cow?", "Cow condition",MB_OK) 
	 
end procedure 
setHandler( PushButton2, w32HClick, routine_id("PushButton2_onClick")) 
--------------------------------------------------------- 
 
WinMain( Window1,Normal ) 

bindw.bat: 
@echo off 
euiw %EUDIR%\source\bind.ex %1 %2 %3 %4 %5 %6 %7 %8 %9 
 
Error file: 
C:\euphoria_4b\IDE.exe\Temp_2.exw:1 
A machine-level exception occurred during execution of this statement  
 
Global & Local Variables 

new topic     » topic index » view message » categorize

2. Re: Bound program doesn't execute

FredRansom said...

For some reason this forum changes all my formatting. Please read it anyway.

If you look below the edit box, there are some common formatting tips that you can use in the forum. If you put eucode tags around code, you'll get automatic line breaks and syntax coloring. Also use the triple curly brackets for stuff like console output.

FredRansom said...

I'm running Version 4.0.0 beta 2 (r2670) for Windows on Vista Home. This little test program works fine if interpreted with euiw, but the bound version fails to execute. What am I doing wrong and how do I do it right?

The only ticket I see for the binder is ticket:71: "The bound program fails with error message <299> when the program resides in an absolute path that is longer than 128 characters." This doesn't sound like your issue, but it has been fixed since the last beta release. Could you confirm that you're not running from a long path, and try running from a shorter path if you are?

I'm not on windows right now, but I was able to bind the demo/allsorts.ex program and run it successfully. Can you try binding a simple program like this and see if it works?

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Bound program doesn't execute

I tried binding other windows programs and they worked OK. The problem seems to be with win32lib. I'm using the beta for EU4 from the downloads.

I updated the binaries to r2714 from the downloads. Now this little program won't bind at all. There are a lot of errors concerning SLASH and the such-like.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Bound program doesn't execute

FredRansom said...

I tried binding other windows programs and they worked OK. The problem seems to be with win32lib. I'm using the beta for EU4 from the downloads.

I updated the binaries to r2714 from the downloads. Now this little program won't bind at all. There are a lot of errors concerning SLASH and the such-like.

I've confirmed the issue with the latest version in svn. I have some ideas, but haven't solved it...haven't had enough time to work on it.

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: Bound program doesn't execute

Thanks. I added some code to take care of the "SLASH" issue. Now it binds, but the bound version still won't execute. I gives exactly the same error stated above.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Bound program doesn't execute

FredRansom said...

Thanks. I added some code to take care of the "SLASH" issue. Now it binds, but the bound version still won't execute. I gives exactly the same error stated above.

My guesses were wrong, but I figured out the issue. I opened ticket:132:

ticket 132 said...

n a bound or shrouded program, when routine_id() is called to look for a global routine that is in a file that was not included, a machine level crash happens. The following set of files will demonstrate the bug:

-- bug.ex   
include foo.e  
include bug.e  
  
-- foo.e  
global procedure foo()  
end procedure  
foo()  
  
-- bug.e  
? routine_id("foo")  

Matt

new topic     » goto parent     » topic index » view message » categorize

7. Re: Bound program doesn't execute

mattlewis said...
FredRansom said...

Thanks. I added some code to take care of the "SLASH" issue. Now it binds, but the bound version still won't execute. I gives exactly the same error stated above.

My guesses were wrong, but I figured out the issue. I opened ticket:132:

And then promptly found another issue: ticket:133.

Matt

new topic     » goto parent     » topic index » view message » categorize

8. Re: Bound program doesn't execute

mattlewis said...
mattlewis said...
FredRansom said...

Thanks. I added some code to take care of the "SLASH" issue. Now it binds, but the bound version still won't execute. I gives exactly the same error stated above.

My guesses were wrong, but I figured out the issue. I opened ticket:132:

And then promptly found another issue: ticket:133.

OK, I've fixed both issues, and the bound sample program works for me now.

Matt

new topic     » goto parent     » topic index » view message » categorize

9. Re: Bound program doesn't execute

Sounds great, but where do I get the new code and what do I do with it?

new topic     » goto parent     » topic index » view message » categorize

10. Re: Bound program doesn't execute

FredRansom said...

Sounds great, but where do I get the new code and what do I do with it?

There's a Windows r3080 eubin posted. You can get the standard library, etc. from http://rapideuphoria.svn.sourceforge.net/viewvc/rapideuphoria/trunk.tar.gz?view=tar.

Matt

new topic     » goto parent     » topic index » view message » categorize

11. Re: Bound program doesn't execute

I found the files and implemented them. Now, when I try to bind that little program, I get the following error:
C:\euphoria_4b\source\bind.ex:241
<0074>:: Errors resolving the following references:
C:\euphoria_4b\source\il.e (437): get_eudir
C:\euphoria_4b\source\il.e (241): get_eudir

puts(f, "#!" & get_eudir() & SLASH & "bin" & SLASH)
^


- Defined Words -
EU4
EU400
EU40000
WINDOWS
WIN32
WIN32_GUI
EUI
EU_FULL_RELEASE
-----------------

PS. Code text didn't work for me, so I had to use forced line breaks. Unfortunately, leading spaces are deleted.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Bound program doesn't execute

FredRansom said...

PS. Code text didn't work for me, so I had to use forced line breaks. Unfortunately, leading spaces are deleted.

This 'code text' tag works for me ...

C:\euphoria_4b\source\bind.ex:241 
<0074>:: Errors resolving the following references: 
	C:\euphoria_4b\source\il.e (437): get_eudir 
	C:\euphoria_4b\source\il.e (241): get_eudir 
 
			puts(f, "#!" & get_eudir() & SLASH & "bin" & SLASH) 
			                        ^ 
 
 
--- Defined Words --- 
EU4 
EU400 
EU40000 
WINDOWS 
WIN32 
WIN32_GUI 
EUI 
EU_FULL_RELEASE 
------------------- 

Anyhow, that message seems to indicate that the file 'common.e' is not in the source folder.

new topic     » goto parent     » topic index » view message » categorize

13. Re: Bound program doesn't execute

common.e is in my source folder.

For some reason code text doesn't work for me. I put 2 pound signs at the beginning of code and 2 at the end, but they seem to be ignored. Thus,

    1. line 1 line 2 line 3, etc. ## looks awful.
new topic     » goto parent     » topic index » view message » categorize

14. Re: Bound program doesn't execute

FredRansom said...

common.e is in my source folder.

Ok, so in "C:\euphoria_4b\source\" there exist a file called "common.e". Can you look inside that file to see if it has this line ...

public function get_eudir() 
FredRansom said...

For some reason code text doesn't work for me. I put 2 pound signs at the beginning of code and 2 at the end, but they seem to be ignored. Thus,

    1. line 1 line 2 line 3, etc. ## looks awful.

The tag for showing text, without formatting it, is matching triple-braces. When the triple-braces are placed on lines of their own, the text is shown in monotype and this is the preferred way to show console output.

Your example above should have been coded as ...

{{{
line 1
line 2
line 3, etc.
}}}

If you look below a Reply window, you can see examples for various Creole tags, and this example is among those.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Bound program doesn't execute

Thanks for the info about the braces.

No, get_erdir () wasn't there, so I copied it from c_decl.e into common.e. It bound OK, but when I executed the program I got this error:

C:\euphoria_4b\include\Win32Lib.ew:1371 in function message_box()  
variable <no-name> has not been assigned a value  
    <no-name> = {72'H',111'o',119'w',32' ',110'n',111'o',119'w',44',',32' ', 
98'b',114'r',111'o',119'w',110'n',32' ',99'c',111'o',119'w',63'?'} 
    <no-name> = {67'C',111'o',119'w',32' ',99'c',111'o',110'n',100'd',105'i', 
116't',105'i',111'o',110'n'} 
    <no-name> = 0 
    <no-name> = 0 
    <no-name> = 19395808 
    <no-name> = 17511360 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\IDE.exe\Temp_2.exw:20 in procedure PushButton2_onClick()   
    <no-name> = 18 
    <no-name> = 4 
    <no-name> = {0} 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:20725 in function invokeHandler()   
    <no-name> = 18 
    <no-name> = 4 
    <no-name> = {0} 
    <no-name> = { 
                  {105'i'} 
                } 
    <no-name> = { 
                  {1} 
                } 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = 1 
    <no-name> = 1 
    <no-name> = 1 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:44384 in procedure wmCommand()   
    <no-name> = 18 
    <no-name> = 788586 
    <no-name> = 273 
    <no-name> = 0 
    <no-name> = 919638 
    <no-name> = 0 
    <no-name> = 4 
    <no-name> = 1 
    <no-name> = {} 
    <no-name> = {0} 
    <no-name> = {1,0} 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:45628 in function fDoCommand()   
    <no-name> = 3 
    <no-name> = 788586 
    <no-name> = 273 
    <no-name> = 0 
    <no-name> = 919638 
    <no-name> = -2761 
    <no-name> = {-9987} 
    <no-name> = 18 
    <no-name> = 3 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47120 in function MessageProcessor()   
    <no-name> = -2761 
    <no-name> = 788586 
    <no-name> = 273 
    <no-name> = 0 
    <no-name> = 919638 
    <no-name> = 3 
    <no-name> = 16 
    <no-name> = 1 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47255 in function WndProc()   
    <no-name> = 788586 
    <no-name> = 273 
    <no-name> = 0 
    <no-name> = 919638 
 
^^^ call-back from Windows 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:14016 in function w32Func()   
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = 1 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47099 in function DefProcessing()   
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47120 in function MessageProcessor()   
    <no-name> = -9987 
    <no-name> = 919638 
    <no-name> = 514 
    <no-name> = 0 
    <no-name> = 917552 
    <no-name> = 18 
    <no-name> = 9 
    <no-name> = 2 
    <no-name> = {-9987} 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47261 in function SubProc()   
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
^^^ call-back from Windows 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:14088 in procedure w32Proc()   
    <no-name> = 103'g' 
    <no-name> = {20415604} 
    <no-name> = <no value> 
    <no-name> = 72'H' 
    <no-name> = 0 
    <no-name> = 1 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47691 in procedure eventLoop()   
    <no-name> = {} 
    <no-name> = <no value> 
    <no-name> = 20415604 
    <no-name> = 1 
    <no-name> = 788586 
    <no-name> = <no value> 
    <no-name> = 1 
    <no-name> = 0 
 
... called from C:\euphoria_4b\include\Win32Lib.ew:47942 in procedure WinMain()   
    <no-name> = 3 
    <no-name> = 0 
    <no-name> = -1 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
    <no-name> = <no value> 
 
... called from C:\euphoria_4b\IDE.exe\Temp_2.exw:1  
 
 
Global & Local Variables 
 
 
 
 

new topic     » goto parent     » topic index » view message » categorize

16. Re: Bound program doesn't execute

FredRansom said...

No, get_erdir () wasn't there ...

In that case, you haven't got the current version of the source code in that directory. You need to get all of the current source code first, then build the system. Once that is done, you should be able to use the binder again.

Alternatively, you can get the latest system build from http://jeremy.cowgar.com/eubins/, in which case you won't need the latest source code.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Bound program doesn't execute

DerekParnell said...
FredRansom said...

No, get_erdir () wasn't there ...

In that case, you haven't got the current version of the source code in that directory. You need to get all of the current source code first, then build the system. Once that is done, you should be able to use the binder again.

Alternatively, you can get the latest system build from http://jeremy.cowgar.com/eubins/, in which case you won't need the latest source code.



http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

useless

new topic     » goto parent     » topic index » view message » categorize

18. Re: Bound program doesn't execute

useless said...
DerekParnell said...
FredRansom said...

No, get_erdir () wasn't there ...

In that case, you haven't got the current version of the source code in that directory. You need to get all of the current source code first, then build the system. Once that is done, you should be able to use the binder again.

Alternatively, you can get the latest system build from http://jeremy.cowgar.com/eubins/, in which case you won't need the latest source code.



http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

useless

Hmm, sounds like a problem with the build process. I'll look into it.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Bound program doesn't execute

jimcbrown said...
useless said...

http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

Hmm, sounds like a problem with the build process. I'll look into it.

I used it. The file w/no extension is a .tar file. Give it a .tar extension and extract it again.

However, Jim, if you're looking into it, it might be best to use zip if you can. That's something all window users can use pretty easily. Others might not have the tools for tar/gzip files.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

20. Re: Bound program doesn't execute

jimcbrown said...
useless said...
DerekParnell said...
FredRansom said...

No, get_erdir () wasn't there ...

In that case, you haven't got the current version of the source code in that directory. You need to get all of the current source code first, then build the system. Once that is done, you should be able to use the binder again.

Alternatively, you can get the latest system build from http://jeremy.cowgar.com/eubins/, in which case you won't need the latest source code.



http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

useless

Hmm, sounds like a problem with the build process. I'll look into it.

I can't reproduce the problem. This works fine for me.

new topic     » goto parent     » topic index » view message » categorize

21. Re: Bound program doesn't execute

jeremy said...

However, Jim, if you're looking into it, it might be best to use zip if you can. That's something all window users can use pretty easily. Others might not have the tools for tar/gzip files.

Jeremy

That's not an option on the current build server. I can't install the required command line zip utlility.

Is it possible to have a script on the cowgar.com server extract the tarball and repackage it as a zip file?

new topic     » goto parent     » topic index » view message » categorize

22. Re: Bound program doesn't execute

jeremy said...

I used it. The file w/no extension is a .tar file. Give it a .tar extension and extract it again.

Jeremy

Ok, the name has been updated, so future builds will have the full .tar.gz that is supported by 7z and other utilities.

new topic     » goto parent     » topic index » view message » categorize

23. Re: Bound program doesn't execute

jeremy said...
jimcbrown said...
useless said...

http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

Hmm, sounds like a problem with the build process. I'll look into it.

I used it. The file w/no extension is a .tar file. Give it a .tar extension and extract it again.


Ok, that works.

said...

However, Jim, if you're looking into it, it might be best to use zip if you can. That's something all window users can use pretty easily. Others might not have the tools for tar/gzip files.

Jeremy


Actually, winzip costs money now, 7z and winrar are still free.
I had used winrar to open the .gz file previous post, that's what gave me the un-extensioned file. Winrar treats the un-extensioned file as plain text.
I tried the .gz again with 7z, which, within the 7z gui, opened the un-extensioned file as a .tar properly.
So why not just .ext that un-extensioned file and let it be self-explainatory?
useless

new topic     » goto parent     » topic index » view message » categorize

24. Re: Bound program doesn't execute

useless said...
jeremy said...
jimcbrown said...
useless said...

http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

Hmm, sounds like a problem with the build process. I'll look into it.

I used it. The file w/no extension is a .tar file. Give it a .tar extension and extract it again.


Ok, that works.

said...

However, Jim, if you're looking into it, it might be best to use zip if you can. That's something all window users can use pretty easily. Others might not have the tools for tar/gzip files.

Jeremy


Actually, winzip costs money now, 7z and winrar are still free.
I had used winrar to open the .gz file previous post, that's what gave me the un-extensioned file. Winrar treats the un-extensioned file as plain text.
I tried the .gz again with 7z, which, within the 7z gui, opened the un-extensioned file as a .tar properly.
So why not just .ext that un-extensioned file and let it be self-explainatory?
useless

The file is a .tgz (which is short for .Tar.GZ) and that is the proper extension (along with .tbz for .tar.bz2 files)... I consider 7z to be broken if it can't handle it.

new topic     » goto parent     » topic index » view message » categorize

25. Re: Bound program doesn't execute

jimcbrown said...
useless said...
jeremy said...
jimcbrown said...
useless said...

http://jeremy.cowgar.com/eubins/windows/eubins-3081-20100208.tgz

decompresses to one large file with no extension. What sort of file is it, and how does one use it?

Hmm, sounds like a problem with the build process. I'll look into it.

I used it. The file w/no extension is a .tar file. Give it a .tar extension and extract it again.


Ok, that works.

said...

However, Jim, if you're looking into it, it might be best to use zip if you can. That's something all window users can use pretty easily. Others might not have the tools for tar/gzip files.

Jeremy


Actually, winzip costs money now, 7z and winrar are still free.
I had used winrar to open the .gz file previous post, that's what gave me the un-extensioned file. Winrar treats the un-extensioned file as plain text.
I tried the .gz again with 7z, which, within the 7z gui, opened the un-extensioned file as a .tar properly.
So why not just .ext that un-extensioned file and let it be self-explainatory?
useless

The file is a .tgz (which is short for .Tar.GZ) and that is the proper extension (along with .tbz for .tar.bz2 files)... I consider 7z to be broken if it can't handle it.



I also would possibly consider 7z broken if it could not handle it. However, like i said, 7z opened it, while winrar treated un-extensioned file as text, like i said.

useless

new topic     » goto parent     » topic index » view message » categorize

26. Re: Bound program doesn't execute

useless said...



I also would possibly consider 7z broken if it could not handle it. However, like i said, 7z opened it, while winrar treated un-extensioned file as text, like i said.

useless

However, Jeremy reported that he tested with 7z and it did not work with the .tgz extension in the irc channel. I guess some versions of 7z work and some are broken. *shrug*

new topic     » goto parent     » topic index » view message » categorize

27. Re: Bound program doesn't execute

On Windows I use both 7-Zip and PeaZip. Both can be downloaded free from PortableApps.com.

new topic     » goto parent     » topic index » view message » categorize

28. Re: Bound program doesn't execute

On Windows I use both 7-Zip and PeaZip. Both can be downloaded free from PortableApps.com.

new topic     » goto parent     » topic index » view message » categorize

29. Re: Bound program doesn't execute

On Windows I use both 7-Zip and PeaZip. Both can be downloaded free from PortableApps.com.

I downloaded the latest code from that site based on the build number. That little program binds OK and goes into execution OK, but, when I click the button I still get the same long-winded error: unnamed variables in message_box() in win32lib.ew not being set. I don't understand it because the un-bound version works perfectly.

new topic     » goto parent     » topic index » view message » categorize

30. Re: Bound program doesn't execute

FredRansom said...

I'm running Version 4.0.0 beta 2 (r2670) for Windows on Vista Home. This little test program works fine if interpreted with euiw, but the bound version fails to execute. What am I doing wrong and how do I do it right?

bindw.bat: 
@echo off 
euiw %EUDIR%\source\bind.ex %1 %2 %3 %4 %5 %6 %7 %8 %9 
 
Error file: 
C:\euphoria_4b\IDE.exe\Temp_2.exw:1 
A machine-level exception occurred during execution of this statement  
 
Global & Local Variables 

I think you are using an older method of binding code. I used this ...

bind -w32 Temp2.exw 

and got this result ...

c:\temp>bind -w32 Temp2 
deleted 487 unused routines and 5807 unused variables. 
You may now run Temp2.exe 
 
Press Enter 
c:\temp>Temp2 

which gave me the window with a single button "PushButton2", so I clicked the button and got the message box "Cow condition" with the message "How now, brown cow?".

It works fine for me.

I'm using Windows XP SP3 but I don't think that matters.

new topic     » goto parent     » topic index » view message » categorize

31. Re: Bound program doesn't execute

Thanks. That worked. I edited bind.bat to work with the IDE and copied it to bindw.bat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu