[Gambas-user] Bug with autocompletion
This happens with Gambas 3 rev 5201. I don't know how to reproduce it, but it has happened with autocompletion when I press Tab. [13] Null object. FCompletion.CompleteItem.730 Any clue? Jussi -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root - BIS
But Desktop.RunAsRoot() does something else..? ...What do you mean ? AFAIK, Desktop.RunAsRoot(whoami) and xdg-su -c whoami should do exactly same thing. However only xdg-su -c whoami works. I will investigate... Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root - BIS
AFAIK, Desktop.RunAsRoot(whoami) and xdg-su -c whoami should do exactly same thing. However only xdg-su -c whoami works. OK, now I understand the problem. Destop.RunAsRoot() uses internally Exec command, and so redirections doesn't work. Instead of Exec there should be Shell..? Benoit? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
Oh, yes, that was the reason I haven't use it! It doesn't have method to return value. So far I have used gksudo with shell command, but generally working solution is needed. Jussi On Sun, Sep 23, 2012 at 11:10 AM, wally wa...@voosen.eu wrote: Hello Jussi, i 've seen in other postingsyou mentioned tests using Desktop.RunAsRoot(whoami) Can you provide a working example how to use Desktop.RunAsRoot, please ? (e.g. how to get the returned usersname) thx wally -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
Private fl As File Public Sub Form_Open() Desktop.RunAsRoot(cat /dev/ttyUSB1 /tmp/a) fl = Open /tmp/a For Read Watch End Public Sub File_Read() Dim s As String s = File.Load(/tmp/a) TextEdit1.Text = s End This is good idea, but instead of /tmp/a, I would use Temp$(): Private fl As File Private sFile As String Public Sub Form_Open() sFile = Temp$() Desktop.RunAsRoot(cat /dev/ttyUSB1sFile) fl = Open sFile For Read Watch End Public Sub File_Read() Dim s As String s = File.Load(sFile) TextEdit1.Text = s End Jussi -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
I tried: sFile = Temp$() Desktop.RunAsRoot(whoamisFile) Do Wait 0.1 Loop Until Exist(sFile) fl = Open sFile For Read Watch But I can only get: Try `whoami --help' for more information. Same command works in terminal: whoami /tmp/gambas.1000/2413/6.tmp So, I'm not sure what is going on... I will look this closer later, when I have more time. Jussi On Sun, Sep 23, 2012 at 7:17 PM, Ru Vuott vu...@yahoo.it wrote: --- Dom 23/9/12, Jussi Lahtinen jussi.lahti...@gmail.com ha scritto: This is good idea, but instead of /tmp/a, I would use Temp$(): Private fl As File Private sFile As String Public Sub Form_Open() sFile = Temp$() Desktop.RunAsRoot(cat /dev/ttyUSB1sFile) fl = Open sFile For Read Watch End Public Sub File_Read() Dim s As String s = File.Load(sFile) TextEdit1.Text = s End Jussi --- Well Jussi, the solution is simple, if we use CAT command, because we can re-direct data to a supporting file by: but... if we can read data from a different command ? ...e.g: whoami I cannot read from Terminal window by Gambas function. I am able to write in it, but I can not read yet from a Terminal. :-( Do you have a solution ? Bye vuo -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
I tried your code, and I obtain in TextEdit simply the word: root (But I should be getting: vuott) No. If you run it as root, you should get root! I wonder why it works on your system... What it your system? Jussi -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
I think this would require new option to IDE. But you can make your project to use graphical sudo, and ask password independently of IDE. Jussi On Sat, Sep 22, 2012 at 8:58 AM, wally wa...@voosen.eu wrote: Hello, (how) can i run a project as root from within gambas3 IDE running as user ? thx wally -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
You mean your program is intended to run always as root? Maybe you then need new feature to IDE... or setup virtual machine and there start IDE as root. Jussi On Sat, Sep 22, 2012 at 2:13 PM, wally wa...@voosen.eu wrote: Jussi, but this is not very convnient during development wally -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
Thinking this bit more... I think it would be very difficult to safely enable IDE to run projects as root! So, use virtual machine, there you can mess all you want without problems (as long as you back up sources outside of the virtual machine). Jussi On Sat, Sep 22, 2012 at 3:20 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: You mean your program is intended to run always as root? Maybe you then need new feature to IDE... or setup virtual machine and there start IDE as root. Jussi On Sat, Sep 22, 2012 at 2:13 PM, wally wa...@voosen.eu wrote: Jussi, but this is not very convnient during development wally -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] run project as root
Mmm... No. By looking at the xdg-utils source code, I don't think that Desktop.RunAsRoot() does anything useful. It should be removed or rewritten differently... RunAsRoot() method runs command as root, not the whole program, as I understand was the goal. It still have problems? What do you mean exactly? Jussi -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas error messages
OK, seems that there is no working version of Gambas2 in Ubuntu repository. I have no clue what is going on... Jussi On Fri, Sep 21, 2012 at 10:40 AM, jm j...@martindale-electric.co.uk wrote: Jussi, Finally some difference! miniand@miniand:~$ cd /usr/bin miniand@miniand:/usr/bin$ ls -l gam* lrwxrwxrwx 1 root root 14 Dec 6 2011 gambas2 - gambas2.gambas -rwxr-xr-x 1 root root 427530 Dec 6 2011 gambas2-database-manager.gambas -rwxr-xr-x 1 root root 2372105 Dec 6 2011 gambas2.gambas -rwxr-xr-x 1 root root5600 Dec 5 2011 gamma4scanimage miniand@miniand:/usr/bin$ whereis gbr2 gbr2: /usr/bin/gbr2 /usr/bin/X11/gbr2 /usr/share/man/man1/gbr2.1.gz miniand@miniand:/usr/bin$ gdb gbr2 GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as arm-linux-gnueabi. For bug reporting instructions, please see: http://bugs.launchpad.net/gdb-linaro/... Reading symbols from /usr/bin/gbr2...(no debugging symbols found)...done. (gdb) set args /usr/bin/gambas2 (gdb) run Starting program: /usr/bin/gbr2 /usr/bin/gambas2 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #49: Not a directory: /usr/bin/gambas2/.project [Inferior 1 (process 1145) exited with code 01] (gdb) bt No stack. (gdb) ^CQuit (gdb) bt No stack. (gdb) quit miniand@miniand:/usr/bin$ On Thu, 2012-09-20 at 18:45 +0300, Jussi Lahtinen wrote: Try; set args /usr/bin/gambas2 Jussi On Thu, Sep 20, 2012 at 6:41 PM, jm j...@martindale-electric.co.uk wrote: Sorry Jussi, same result: miniand@miniand:~$ cd /usr/bin miniand@miniand:/usr/bin$ ls gam* gambas2 gambas2-database-manager.gambas gambas2.gambas gamma4scanimage miniand@miniand:/usr/bin$ whereis gbr2 gbr2: /usr/bin/gbr2 /usr/bin/X11/gbr2 /usr/share/man/man1/gbr2.1.gz miniand@miniand:/usr/bin$ gdb gbr2 GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as arm-linux-gnueabi. For bug reporting instructions, please see: http://bugs.launchpad.net/gdb-linaro/... Reading symbols from /usr/bin/gbr2...(no debugging symbols found)...done. (gdb) set args /usr/bin (gdb) run Starting program: /usr/bin/gbr2 /usr/bin [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 1074) exited with code 01] (gdb) bt No stack. (gdb) ^CQuit (gdb) bt No stack. (gdb) quit miniand@miniand:/usr/bin$ On Thu, 2012-09-20 at 18:18 +0300, Jussi Lahtinen wrote: Please do exactly what I told, and send results. Jussi On Thu, Sep 20, 2012 at 5:57 PM, jm j...@martindale-electric.co.uk wrote: Hi Jussi, Just to re-iterate - I tried numerous different options including gbx gbr running compiled pre-made serial port sample, with and without project files, command line etc. etc. all have same result. On Thu, 2012-09-20 at 17:37 +0300, Jussi Lahtinen wrote: You tried to launch Gambas executable with gbx, for that you need to use gbr. gbx is for running source code or evaluating, not for executables. Jussi On Thu, Sep 20, 2012 at 2:44 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 18:21 +0300, Jussi Lahtinen wrote: Or here is something you could do: gdb gbr3 set args /usr/local/bin/gambas3 (or what ever is your install path) run You may need to kill the process with Ctrl + c in debugger. Then with bt, you will get backtrace. Send it here, so we can see what is happening. Jussi (gdb) run Starting program: /usr/bin/gbx2 [Thread debugging using libthread_db enabled] Using host libthread_db library
Re: [Gambas-user] Gambas error messages
Thats why I was originally posting to ask if more could be done for the command line options to output more verbose messages for the rainy day when things go wrong so that we may debug in silence. I don't know what kind of messages you expect to get... We already got this ERROR: #49: Not a directory: /usr/bin/gambas2/.project. So I tried to recompile gambas2 (since there was error in it), and it turns out that libqt (version 3) is missing... damn. I installed libqt3-mt and it's dev, recompiled gbx2, gbc2 and recompiled gambas2. Now everything works. So I expect you have same problem. I personally use only Gambas 3 these days... Jussi -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas error messages
So, gambas2 is not packed correctly in Ubuntu repository. But in fact with my system launching gambas2 gives error message of missing qt library (when I uninstall the libs)... so I think there is yet something else wrong with your system. But check that anyway. Jussi On Fri, Sep 21, 2012 at 11:12 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: Thats why I was originally posting to ask if more could be done for the command line options to output more verbose messages for the rainy day when things go wrong so that we may debug in silence. I don't know what kind of messages you expect to get... We already got this ERROR: #49: Not a directory: /usr/bin/gambas2/.project. So I tried to recompile gambas2 (since there was error in it), and it turns out that libqt (version 3) is missing... damn. I installed libqt3-mt and it's dev, recompiled gbx2, gbc2 and recompiled gambas2. Now everything works. So I expect you have same problem. I personally use only Gambas 3 these days... Jussi -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas error messages
Did you try to install libqt3-mt? e.g firefox --help konqueror --help ssh --help ls --help Anyway I then tried gbr2 --help after realizing what was happening. True, thought --help works with gbx2, gbc2, gbs2, gbs3, gbx3, gbr3 and gbc3, which are command line programs. That also does not work because gambas doesn't have any normal Linux command line friendly options. Gambas compiler (gbc) do have verbose option, among many others. Interpreter doesn't have it, but I have used Gambas about five years without never running into situation where I wouldn't have error message (at least) to terminal, if something went wrong. And with this case, I suspect that there is something wrong in your system that prevents error messages to be printed from Gambas. If the verbose messages are cleverly worded in unique ways, then when they get pasted into forums, they start seeding google with messages that can be searched for and the fixes become more easy to find. And duplication of effort will also reduce. Normally when Gambas program runs into error it will display error message. See attached example. It tells what kind of error and where it happened. How this could be any better? Jussi attachment: error.png-- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas error messages
You tried to launch Gambas executable with gbx, for that you need to use gbr. gbx is for running source code or evaluating, not for executables. Jussi On Thu, Sep 20, 2012 at 2:44 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 18:21 +0300, Jussi Lahtinen wrote: Or here is something you could do: gdb gbr3 set args /usr/local/bin/gambas3 (or what ever is your install path) run You may need to kill the process with Ctrl + c in debugger. Then with bt, you will get backtrace. Send it here, so we can see what is happening. Jussi (gdb) run Starting program: /usr/bin/gbx2 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 12262) exited with code 01] (gdb) bt gives the message no stack. (I tried many different ways of running gdb and all give same answer as above - including set args) hmm.. not sure which file or directory its looking for. On Wed, Sep 19, 2012 at 6:13 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: gambas3 is just program made with Gambas, if it is in infinite loop, interpreter cannot know about it. It just does what it is commanded to do. Just like in any other programming language. Try to run something else to see whether anything works. gbx3 is Gambas interpreter executable, and gbr3 is for executing Gambas executables like gambas3. What example gbx3 --help says? Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v [project] : puts gambas into verbose mode that prints a message before checking for a dependent lib so that if it crashed a meaningful guess can be made as to where to look for a fix. There I don't understand : gambas3 is the IDE, it is a GUI program. If you have missing libs, gambas3 is not compiled. And if it is, you will have error messages on the command line when running it. Strange - no error messages at all. When I run gambas2 from command line, nothing happens as in the command line is completely frozen probably in an infinite loop and unable to show an IDE or output an error message. So it would be good if for example gambas started with a message like initialising when a parameter like -v for verbose is used so that at least we know that part has worked. (Emitting even more detailed message such as which buttons were pressed with a parameter -v2 level where level is a number is another desirable option. Increasing level of reporting can quickly find more complex faults - such as infinite event loops. I know many of these messages are reported to IDE, but there should be an option to get it reported to the console - that is the Linux/Unix way - the console and command line is king - even for a GUI IDE. Driving the IDE should also be command line driven. e.g. options to compile gambas programs should be available as standard from command line options for example without need for IDE to kick into life.) I had a Genesi smartbook that did the same freeze thing on their Ubuntu distro. At the time I didn't need to go forward with it, so I dropped investigating. The MK802 however I must get going because the plan for now is to use OpenBox as the window manager and Gambas as the main application. No doubt I will be trying to compile gambas3 soon for MK802 and sort it somehow. In the mean time I thought I make the suggestion for improved command line options - noting that gambas does not appear to have many options. If you try to open a project which need components that are not install, you will have errors message boxes. So maybe you should try to give more details on how you installed gambas
Re: [Gambas-user] Gambas error messages
Please do exactly what I told, and send results. Jussi On Thu, Sep 20, 2012 at 5:57 PM, jm j...@martindale-electric.co.uk wrote: Hi Jussi, Just to re-iterate - I tried numerous different options including gbx gbr running compiled pre-made serial port sample, with and without project files, command line etc. etc. all have same result. On Thu, 2012-09-20 at 17:37 +0300, Jussi Lahtinen wrote: You tried to launch Gambas executable with gbx, for that you need to use gbr. gbx is for running source code or evaluating, not for executables. Jussi On Thu, Sep 20, 2012 at 2:44 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 18:21 +0300, Jussi Lahtinen wrote: Or here is something you could do: gdb gbr3 set args /usr/local/bin/gambas3 (or what ever is your install path) run You may need to kill the process with Ctrl + c in debugger. Then with bt, you will get backtrace. Send it here, so we can see what is happening. Jussi (gdb) run Starting program: /usr/bin/gbx2 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 12262) exited with code 01] (gdb) bt gives the message no stack. (I tried many different ways of running gdb and all give same answer as above - including set args) hmm.. not sure which file or directory its looking for. On Wed, Sep 19, 2012 at 6:13 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: gambas3 is just program made with Gambas, if it is in infinite loop, interpreter cannot know about it. It just does what it is commanded to do. Just like in any other programming language. Try to run something else to see whether anything works. gbx3 is Gambas interpreter executable, and gbr3 is for executing Gambas executables like gambas3. What example gbx3 --help says? Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v [project] : puts gambas into verbose mode that prints a message before checking for a dependent lib so that if it crashed a meaningful guess can be made as to where to look for a fix. There I don't understand : gambas3 is the IDE, it is a GUI program. If you have missing libs, gambas3 is not compiled. And if it is, you will have error messages on the command line when running it. Strange - no error messages at all. When I run gambas2 from command line, nothing happens as in the command line is completely frozen probably in an infinite loop and unable to show an IDE or output an error message. So it would be good if for example gambas started with a message like initialising when a parameter like -v for verbose is used so that at least we know that part has worked. (Emitting even more detailed message such as which buttons were pressed with a parameter -v2 level where level is a number is another desirable option. Increasing level of reporting can quickly find more complex faults - such as infinite event loops. I know many of these messages are reported to IDE, but there should be an option to get it reported to the console - that is the Linux/Unix way - the console and command line is king - even for a GUI IDE. Driving the IDE should also be command line driven. e.g. options to compile gambas programs should be available as standard from command line options for example without need for IDE to kick into life.) I had a Genesi smartbook that did the same freeze thing on their Ubuntu distro
Re: [Gambas-user] Gambas error messages
(gdb) run Starting program: /usr/bin/gbx2 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 12262) exited with code 01] (gdb) I'll elaborate bit... This is exactly what I expect to see when gbx2 is launched without arguments, as you did. Jussi -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas error messages
Try; set args /usr/bin/gambas2 Jussi On Thu, Sep 20, 2012 at 6:41 PM, jm j...@martindale-electric.co.uk wrote: Sorry Jussi, same result: miniand@miniand:~$ cd /usr/bin miniand@miniand:/usr/bin$ ls gam* gambas2 gambas2-database-manager.gambas gambas2.gambas gamma4scanimage miniand@miniand:/usr/bin$ whereis gbr2 gbr2: /usr/bin/gbr2 /usr/bin/X11/gbr2 /usr/share/man/man1/gbr2.1.gz miniand@miniand:/usr/bin$ gdb gbr2 GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as arm-linux-gnueabi. For bug reporting instructions, please see: http://bugs.launchpad.net/gdb-linaro/... Reading symbols from /usr/bin/gbr2...(no debugging symbols found)...done. (gdb) set args /usr/bin (gdb) run Starting program: /usr/bin/gbr2 /usr/bin [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 1074) exited with code 01] (gdb) bt No stack. (gdb) ^CQuit (gdb) bt No stack. (gdb) quit miniand@miniand:/usr/bin$ On Thu, 2012-09-20 at 18:18 +0300, Jussi Lahtinen wrote: Please do exactly what I told, and send results. Jussi On Thu, Sep 20, 2012 at 5:57 PM, jm j...@martindale-electric.co.uk wrote: Hi Jussi, Just to re-iterate - I tried numerous different options including gbx gbr running compiled pre-made serial port sample, with and without project files, command line etc. etc. all have same result. On Thu, 2012-09-20 at 17:37 +0300, Jussi Lahtinen wrote: You tried to launch Gambas executable with gbx, for that you need to use gbr. gbx is for running source code or evaluating, not for executables. Jussi On Thu, Sep 20, 2012 at 2:44 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 18:21 +0300, Jussi Lahtinen wrote: Or here is something you could do: gdb gbr3 set args /usr/local/bin/gambas3 (or what ever is your install path) run You may need to kill the process with Ctrl + c in debugger. Then with bt, you will get backtrace. Send it here, so we can see what is happening. Jussi (gdb) run Starting program: /usr/bin/gbx2 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/arm-linux-gnueabi/libthread_db.so.1. ERROR: #45: File or directory does not exist [Inferior 1 (process 12262) exited with code 01] (gdb) bt gives the message no stack. (I tried many different ways of running gdb and all give same answer as above - including set args) hmm.. not sure which file or directory its looking for. On Wed, Sep 19, 2012 at 6:13 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: gambas3 is just program made with Gambas, if it is in infinite loop, interpreter cannot know about it. It just does what it is commanded to do. Just like in any other programming language. Try to run something else to see whether anything works. gbx3 is Gambas interpreter executable, and gbr3 is for executing Gambas executables like gambas3. What example gbx3 --help says? Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v
Re: [Gambas-user] Gambas error messages
gambas3 is just program made with Gambas, if it is in infinite loop, interpreter cannot know about it. It just does what it is commanded to do. Just like in any other programming language. Try to run something else to see whether anything works. gbx3 is Gambas interpreter executable, and gbr3 is for executing Gambas executables like gambas3. What example gbx3 --help says? Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v [project] : puts gambas into verbose mode that prints a message before checking for a dependent lib so that if it crashed a meaningful guess can be made as to where to look for a fix. There I don't understand : gambas3 is the IDE, it is a GUI program. If you have missing libs, gambas3 is not compiled. And if it is, you will have error messages on the command line when running it. Strange - no error messages at all. When I run gambas2 from command line, nothing happens as in the command line is completely frozen probably in an infinite loop and unable to show an IDE or output an error message. So it would be good if for example gambas started with a message like initialising when a parameter like -v for verbose is used so that at least we know that part has worked. (Emitting even more detailed message such as which buttons were pressed with a parameter -v2 level where level is a number is another desirable option. Increasing level of reporting can quickly find more complex faults - such as infinite event loops. I know many of these messages are reported to IDE, but there should be an option to get it reported to the console - that is the Linux/Unix way - the console and command line is king - even for a GUI IDE. Driving the IDE should also be command line driven. e.g. options to compile gambas programs should be available as standard from command line options for example without need for IDE to kick into life.) I had a Genesi smartbook that did the same freeze thing on their Ubuntu distro. At the time I didn't need to go forward with it, so I dropped investigating. The MK802 however I must get going because the plan for now is to use OpenBox as the window manager and Gambas as the main application. No doubt I will be trying to compile gambas3 soon for MK802 and sort it somehow. In the mean time I thought I make the suggestion for improved command line options - noting that gambas does not appear to have many options. If you try to open a project which need components that are not install, you will have errors message boxes. So maybe you should try to give more details on how you installed gambas on your system, and more details on your system Gambas2 downloaded from the default repository of Lubuntu 12.04 that came with the distro, by using synaptic. That would point the finger at the maintainers there but as its old its not worth pursuing. I'll probably try to compile gambas3. (no idea what a MK802 is...). ARM systems are quite different. It is the rage in ARMs at the moment - full ARM computer on a USB stick: https://www.miniand.com/products/MK802%20Android%20Mini%20PC (around $50 on ebay) Regards, -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers
Re: [Gambas-user] Gambas error messages
Or here is something you could do: gdb gbr3 set args /usr/local/bin/gambas3 (or what ever is your install path) run You may need to kill the process with Ctrl + c in debugger. Then with bt, you will get backtrace. Send it here, so we can see what is happening. Jussi On Wed, Sep 19, 2012 at 6:13 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: gambas3 is just program made with Gambas, if it is in infinite loop, interpreter cannot know about it. It just does what it is commanded to do. Just like in any other programming language. Try to run something else to see whether anything works. gbx3 is Gambas interpreter executable, and gbr3 is for executing Gambas executables like gambas3. What example gbx3 --help says? Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.ukwrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v [project] : puts gambas into verbose mode that prints a message before checking for a dependent lib so that if it crashed a meaningful guess can be made as to where to look for a fix. There I don't understand : gambas3 is the IDE, it is a GUI program. If you have missing libs, gambas3 is not compiled. And if it is, you will have error messages on the command line when running it. Strange - no error messages at all. When I run gambas2 from command line, nothing happens as in the command line is completely frozen probably in an infinite loop and unable to show an IDE or output an error message. So it would be good if for example gambas started with a message like initialising when a parameter like -v for verbose is used so that at least we know that part has worked. (Emitting even more detailed message such as which buttons were pressed with a parameter -v2 level where level is a number is another desirable option. Increasing level of reporting can quickly find more complex faults - such as infinite event loops. I know many of these messages are reported to IDE, but there should be an option to get it reported to the console - that is the Linux/Unix way - the console and command line is king - even for a GUI IDE. Driving the IDE should also be command line driven. e.g. options to compile gambas programs should be available as standard from command line options for example without need for IDE to kick into life.) I had a Genesi smartbook that did the same freeze thing on their Ubuntu distro. At the time I didn't need to go forward with it, so I dropped investigating. The MK802 however I must get going because the plan for now is to use OpenBox as the window manager and Gambas as the main application. No doubt I will be trying to compile gambas3 soon for MK802 and sort it somehow. In the mean time I thought I make the suggestion for improved command line options - noting that gambas does not appear to have many options. If you try to open a project which need components that are not install, you will have errors message boxes. So maybe you should try to give more details on how you installed gambas on your system, and more details on your system Gambas2 downloaded from the default repository of Lubuntu 12.04 that came with the distro, by using synaptic. That would point the finger at the maintainers there but as its old its not worth pursuing. I'll probably try to compile gambas3. (no idea what a MK802 is...). ARM systems are quite different. It is the rage in ARMs at the moment - full ARM computer on a USB stick: https://www.miniand.com/products/MK802%20Android%20Mini%20PC (around $50 on ebay) Regards, -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263
Re: [Gambas-user] Gambas error messages
Oh and BTW, if you want to compile Gambas executables without IDE, use gbc3. Jussi On Wed, Sep 19, 2012 at 3:57 PM, jm j...@martindale-electric.co.uk wrote: On Wed, 2012-09-19 at 14:03 +0200, Benoît Minisini wrote: Le 19/09/2012 13:55, jm a écrit : Hi, Gambas runs on Linux and I was just wondering if it can do more with regards to error messages when it is run. I've got a MK802 with A10 ARM running Lubuntu. Gambas2 seems to download and install from repository. When run nothing happens. When run from command line it does nothing. (Reading raspberry pi forums where they use ARM and have gambas working, this type of error is down to missing libs.) Doing gambas2 --help does nothing. (Doing gambas3 --help doesn't do conventional help message on Ubuntu Linux.) I was just wondering if it is possible to make gambas behave more like other applications so that its command line responses are more in line with expectations in a Linux environment. e.g. gambas3 --help : generate command line options That's possible, even if gambas3 has no command line options. gambas3 -v [project] : puts gambas into verbose mode that prints a message before checking for a dependent lib so that if it crashed a meaningful guess can be made as to where to look for a fix. There I don't understand : gambas3 is the IDE, it is a GUI program. If you have missing libs, gambas3 is not compiled. And if it is, you will have error messages on the command line when running it. Strange - no error messages at all. When I run gambas2 from command line, nothing happens as in the command line is completely frozen probably in an infinite loop and unable to show an IDE or output an error message. So it would be good if for example gambas started with a message like initialising when a parameter like -v for verbose is used so that at least we know that part has worked. (Emitting even more detailed message such as which buttons were pressed with a parameter -v2 level where level is a number is another desirable option. Increasing level of reporting can quickly find more complex faults - such as infinite event loops. I know many of these messages are reported to IDE, but there should be an option to get it reported to the console - that is the Linux/Unix way - the console and command line is king - even for a GUI IDE. Driving the IDE should also be command line driven. e.g. options to compile gambas programs should be available as standard from command line options for example without need for IDE to kick into life.) I had a Genesi smartbook that did the same freeze thing on their Ubuntu distro. At the time I didn't need to go forward with it, so I dropped investigating. The MK802 however I must get going because the plan for now is to use OpenBox as the window manager and Gambas as the main application. No doubt I will be trying to compile gambas3 soon for MK802 and sort it somehow. In the mean time I thought I make the suggestion for improved command line options - noting that gambas does not appear to have many options. If you try to open a project which need components that are not install, you will have errors message boxes. So maybe you should try to give more details on how you installed gambas on your system, and more details on your system Gambas2 downloaded from the default repository of Lubuntu 12.04 that came with the distro, by using synaptic. That would point the finger at the maintainers there but as its old its not worth pursuing. I'll probably try to compile gambas3. (no idea what a MK802 is...). ARM systems are quite different. It is the rage in ARMs at the moment - full ARM computer on a USB stick: https://www.miniand.com/products/MK802%20Android%20Mini%20PC (around $50 on ebay) Regards, -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net
Re: [Gambas-user] Modal Form
I can confirm this problem with Gambas 3 rev 5152 @ Xubuntu 12.04 64 bit. Problem applies only to GTK+, Qt4 works fine. [System] OperatingSystem=Linux Kernel=3.2.0-30-generic Architecture=x86_64 Memory=4049136 kB DistributionVendor=Ubuntu DistributionRelease=Ubuntu 12.04.1 LTS Desktop=Xfce [Gambas 3] Version=3.3.0 Path=/usr/local/bin/gbx3 [Libraries] Qt4=libQtCore.so.4.8.1 GTK+=libgtk-x11-2.0.so.0.2400.10 Jussi On Mon, Sep 10, 2012 at 2:36 PM, Tiago Baciotti Moreira bacio...@gmail.comwrote: Hello, This is my first post here ;-) My name is Tiago Baciotti Moreira and I am a Brazilian user of Gambas. As an old VB 4.0/5/6 developer, I am very satisfied with Gambas. I researched another options (like RealBasic and Lazarus) but I prefered Gambas I began to write a simple management program in Gambas and it is about 60% finished write now. I made all the CRUD and I am just making the last touches on it. The next step is to make the reports and it seems to be easy. So, I have a simple question: What am I doing wrong about MODAL forms? I have an Main Form and I call a search form with frmPesquisa.ShowModal. The problem is that it does not show as modal, because I can reach and click buttons from the main window. My intent is to not allow the user goes back to the main window without select something first. Thank you very much, Tiago [System] OperatingSystem=Linux Kernel=3.2.0-29-generic Architecture=i686 Memory=3578560 kB DistributionVendor=LinuxMint DistributionRelease=Linux Mint 13 Maya Desktop=Unknown [Gambas 3] Version=3.2.1 Path=/usr/bin/gbx3 [Libraries] Qt4=libQtCore.so.4.8.1 GTK+=libgtk-x11-2.0.so.0.2400.10 -- :: Lista Sistemas: http://goo.gl/xnSog “Contos de Fadas são a pura verdade: não porque nos contam que os dragões existem, mas porque nos contam que eles podem ser vencidos. (G. K. Chesterton)” -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Enumerating multiple objects at once
Hi! Is there way to enumerate multiple objects without merging them first? Something like: For Each hObject In cCollection1 cCollection2 hOneMoreObject ... Next I think it would be more elegant than: For Each hObject In cCollection1 DoSomething(hObject) Next For Each hObject In cCollection2 DoSomething(hObject) Next DoSomething(hOneMoreObject) At least when DoSomething() doesn't have any else use. Or is there some other preferred way? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] 2D arrays
Is this bug? Private Sub ArrayTest(iArr As Array) Print Object.Type(iArr) Print iArr[1, 1] *-- This gives Not an array.* End Public Sub Button1_Click() Dim iArray As New Integer[10, 10] Print Object.Type(iArray) ArrayTest(iArray) End Jussi ArrayBug-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] 2D arrays
OK, thanks! Jussi On Wed, Sep 5, 2012 at 8:21 PM, Emil Lenngren emil.lenng...@gmail.comwrote: You cannot access array elements with the Array type. That is just a base class with no _get method. If you have an unknown array type you must first cast the array to an object, or to the real type. Read more about this here: http://code.google.com/p/gambas/issues/detail?id=175 ;) /Emil 2012/9/5 Jussi Lahtinen jussi.lahti...@gmail.com: Is this bug? Private Sub ArrayTest(iArr As Array) Print Object.Type(iArr) Print iArr[1, 1] *-- This gives Not an array.* End Public Sub Button1_Click() Dim iArray As New Integer[10, 10] Print Object.Type(iArray) ArrayTest(iArray) End Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Bug with list of tasks
With latest revision, only notes beginning with two quotemarks are shown in list. This is shown: ''TODO: This is not shown: 'TODO: I would expect both of them to be found on list. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Using DataBrowser for a table which
I think it was fixed in revision 5075. Just use the latest revision. Jussi On 30 August 2012 13:20, John Rose john.aaron.r...@gmail.com wrote: Benoit, Using nemh's Pre-releases ppa which uses version #5071 to prepare its .deb, my app compiles OK but on running says program returned value 127 displays: symbol lookup error: /usr/lib64/gambas3/gb.gtk.so: undefined symbol: _gtk_window_group_get_current_grab I noticed a thread entitled 'The program has returned the value: 127' which says that it is solved. If I understood correctly, it says to use a newer version but I couldn't find a message stating which one. Could you tell me which version to use so that I can ask nemh (aka kendek) to pckage that version into his ppa? PS I'm using Ubuntu Lucid 64 bit. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Using DataBrowser for a table which
Not fixed in latest sebikul's gambas-daily ppa, which uses svn 3995 is version 3.2.90. I tried that earlier today after the ppa was uploaded. Rev 3995 is from 09 Aug 2011 !?? Latest revision is 5100. What are you talking about? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Using DataBrowser for a table which
OK, got it... different numbering. I don't know what Gambas revision is used for that, but I would guess latest. Can you provide test project to demonstrate the problem? Jussi On Thu, Aug 30, 2012 at 11:16 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: Not fixed in latest sebikul's gambas-daily ppa, which uses svn 3995 is version 3.2.90. I tried that earlier today after the ppa was uploaded. Rev 3995 is from 09 Aug 2011 !?? Latest revision is 5100. What are you talking about? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Question on autohelp in IDE and libaries.
Example: ''This line is visible in help window. br ''This second line too... Public Sub TestSub() ... So, put helplines before declaration of method/function/variable/etc. Jussi On 27 August 2012 23:48, Willy Raets wi...@earthshipbelgium.be wrote: Hi all, Hope someone can help with this one. Seems to me an undocumented feature :-) Intro to the question: When typing Me.Close in IDE code window you get this autohelp function (is there a name for it) that displays Close information (see Screen Info-01.png). I have made a library called SysInfo and when typing SysInfo.ReadAllInfo the autohelp displays no extra info on the method. (see Screen Info-02.png). Question: 1. Is it possible for me to have some extra info on the method displayed in the autohelp? 2. If yes, how do I need to set this up? Please, provide simple example. Thanks, Willy -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Release 3.2.1
I've still received no answer for any web page correlating version numbers versus revision numbers. Anyone have information on this? Version numbers are for general users (stabile releases), revision numbers are for development version of Gambas. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] An arbitrary precision calculator class
I don't have account for Gambas wiki, can you grant it for me? Maybe I would put some other snippets there too. Jussi On 25 August 2012 04:06, Sebi sebi...@gmail.com wrote: Great workaround!! I created a snippets page on the wiki some time ago, you will find a link on the main page. Feel free to add it there! -Original Message- From: Jussi Lahtinen jussi.lahti...@gmail.com Date: Sat, 25 Aug 2012 03:59:58 To: Gambas mailing list for users.Gambas-user@lists.sourceforge.net Reply-To: mailing list for gambas users gambas-user@lists.sourceforge.net Subject: [Gambas-user] An arbitrary precision calculator class Almost forgot... Some weeks(?) ago I noticed that people tend have problems with floating point precision (problem with all general purpose languages). So, I'll share my quick dirty solution. Short but useful code if you need very precise numbers for math, but speed is not crucial. I personally use it for prototyping. This is for class (name it BcClass): Private hPro As Process Public Function _call(sFunc As String) As String Dim ss As String Print #hPro, sFunc Input #hPro, ss Return ss End Public Sub _new(Optional iPrecision As Integer = 100) hPro = Exec [env, BC_LINE_LENGTH=0, bc] For Read Write Print #hPro, scale= CStr(iPrecision) End Public Sub Stop() hPro.Close() End This is how you use it: Dim Calculate As New BcClass(8) Print Calculate(1+2/7^2.4) 1.04081632 And when all calculations are done, end your code with Calculate.Stop(). BTW. Is there some place for code snippets? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas is not multi-threaded, but...
I think I don't have enough time right now to go deeply into this, but I have already done multithreading with Gambas. One of my project has interface class which uses exec command to launch command line program made with Gambas. Argument for the command line program describe what it should do. Like this: hProcess = Exec [gbr3, Application.Path / cmdprog.gambas, CStr(iWhatToDo)] For Input As Process Interface class has of course Process_Read event for the results. What I think would be needed is proper way to send more complex data for the background process and back. As this mature, it is great new feature for Gambas! Jussi On 25 August 2012 01:37, Benoît Minisini gam...@users.sourceforge.netwrote: Hi, In revision #5076, I added a new gb.task component that allows you to run a class in the background. Internally, the interpreter is simply forked. But it's not that simple. :-) How does it work? Once gb.task is checked in the IDE, you get a new class named Task. To run a class in the background: - That class must inherits Task. - It must have a public Main method that takes no argument and returns nothing. That method will be run in the background. As the method is run by a fork, it has access to every other part of the program, except that the main process that run the task will not see any change done by the task! The main process can simply modify some public variables in the task class to define the arguments of the task. But allowing the task to talk to the main process to give the result of its work is not done yet. Maybe the task Main() method will have a Variant return value that will be transparently serialized, sent to the main process, and deserialize. Or maybe the standard output of the task will be redirected to a pipe read by the main process. Or maybe the both solutions... I don't know yet. Another point. I don't think that gb.qt4 or gb.gtk will be usable after the fork. Tell me what you think about all that! Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas is not multi-threaded, but...
Tasks are the same thing, but simpler to use that processes. I will look into this later. And this is *not* multi-threading, but multi-processing. Oh yes, you are right. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] An arbitrary precision calculator class
Almost forgot... Some weeks(?) ago I noticed that people tend have problems with floating point precision (problem with all general purpose languages). So, I'll share my quick dirty solution. Short but useful code if you need very precise numbers for math, but speed is not crucial. I personally use it for prototyping. This is for class (name it BcClass): Private hPro As Process Public Function _call(sFunc As String) As String Dim ss As String Print #hPro, sFunc Input #hPro, ss Return ss End Public Sub _new(Optional iPrecision As Integer = 100) hPro = Exec [env, BC_LINE_LENGTH=0, bc] For Read Write Print #hPro, scale= CStr(iPrecision) End Public Sub Stop() hPro.Close() End This is how you use it: Dim Calculate As New BcClass(8) Print Calculate(1+2/7^2.4) 1.04081632 And when all calculations are done, end your code with Calculate.Stop(). BTW. Is there some place for code snippets? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Check on entered number having more than 6 digits not working
Conversion and checking is two different things... Jussi On 13 August 2012 19:09, nando nand...@nothingsimple.com wrote: That's perfectly fine. Let me offer this plan of attack. Test if it is between -90 and +90 multiply by 1,000,000 into an INTEGER which chops all decimal digits to the right of the decimal point. then if you need float, divide by 1,000,000. But if you do that , don't be surprised for digits farther to the right of the 6th decimal point because it's float. -Fernando -- Original Message --- From: John Rose john.aaron.r...@gmail.com To: GambasUsers MailingList gambas-user@lists.sourceforge.net Sent: Mon, 13 Aug 2012 14:31:32 +0100 Subject: [Gambas-user] Check on entered number having more than 6 digits not working Fernando, The number of digits does matter. The use of this Gambas app is for maintenance of a database which is used by an Android app that I'm currently developing. I don't intend to discuss why the number of digits matters to the Android app except to say that it does. Thus, the Gambas app is required to do this validation. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user --- End of Original Message --- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Printer code request
Hints... ((Key[n] Or Key[N]) And Key.Alt) Here Or and And are bitwise operators. Example: Key[a] = 65 Key[b] = 66 And so... (Key[a] Or Key[b]) = 67 Also Key[n] and Key[N] have same value (78). But, (Key[n] And Key.Alt) will work as long as Key.Code = 0 is not passed. When Key.Alt = False ? (Key[n] And Key.Alt) 0 When Key.Alt = True ? (Key[n] And Key.Alt) 78 Jussi On 11 August 2012 13:16, Benoît Minisini gam...@users.sourceforge.netwrote: Le 11/08/2012 11:58, charlesg a écrit : Benoît Minisini wrote: I don't remember. When? Your file is unreadable. Please join it to your post as a normal attachment. It was a long time ago. Maybe Jun 2011. Search on Mailing list says it has been deleted. I seem to remember you found fault with something. Perhaps you expected me to correct it but I couldn't because I couldn't understand the problem! I use Nabble and cannot for the life of me find how to attach a file. I send again as a tar rather than a gz http://old.nabble.com/file/p34285191/BarcodeG3-0.0.5.tarBarcodeG3-0.0.5.tar I found it. I had found that bug: The Case tests in ChkInput method are incorrect: Select Key.Code Case (key[n] Or Key[N]) And Key.Alt does not mean: If (Key.Code = Key[n] Or Key.Code = Key[N]) And Key.Alt but: If Key.Code = ((Key[n] Or Key[N]) And Key.Alt) And if you want to check against an alphabetic key, you should use Key.Text, not Key.Code. But you didn't answer. As the version didn't change, I guess you didn't fix it. Could you? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Check on entered number having more than 6 digits not working
I cannot reproduce your problem... What is your Gambas version? Jussi On 11 August 2012 17:51, John Rose john.aaron.r...@gmail.com wrote: I'm trying to validate an entered Latitude value as having a maximum of 6 digits after the decimal point. Sometimes it doesn't work. In the case below, it is 48.590278. This should be valid, but the 'Message.Info(More than 6 decimal digits - try again)' line is being executed. As you can see from the Print statements, the check should be OK. Am I missing something really obvious? Public Sub ValueBoxLatitude_LostFocus() Dim latitude As Float Dim f As Float Dim g As Float If IsNull(Last.Value) Then Return latitude = Last.Value If latitude -90 Or latitude 90 Then Message.Info(Must be between -90 and +90 - try again) Last.SetFocus() Stop Event End If f = latitude * 100 g = CFloat(CInt(f)) Print f= f Print g= g If f g Then Message.Info(More than 6 decimal digits - try again) Last.SetFocus() Stop Event End If f=48590278 g=48590278 -- Regards, John +44 1902 331266 +44 7894 211434 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Check on entered number having more than 6 digits not working
I suspect that there was something else wrong with your project. But just in case, I would like to know if someone else can reproduce your problem. Test project is attached. John, can you reproduce your original problem with that test project? Jussi On 11 August 2012 22:10, John Rose john.aaron.r...@gmail.com wrote: Jussi, Gambas 3.2.1 for Lucid from kendek's ppa. PS I've found another solution to the requirement: convert the Float value to a string check on the length of the number of digits before the decimal point by use of Len, Mid Instr functions. -- Regards, John +44 1902 331266 +44 7894 211434 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Test-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Check if a form is opened/show
If Form.Visible is not what you need, then you can declare Opened boolean to form and set it true in Form_Open event. Jussi On 10 August 2012 03:24, rocko sunblast...@gmail.com wrote: Is there a way to check if a form is opened?? If Fmain.Open = True Then do...something endif I tries .Show but got an error. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Printer code request
See Barcode example for how to send things to printer. And this for how to take screenshot: http://gambasdoc.org/help/comp/gb.qt4/desktop/screenshot?v3 Jussi On 10 August 2012 19:54, fulippo_fuli...@tiscali.it fulippo_fuli...@tiscali.it wrote: Dear All I need to send to the printer the active window , or at least all the screen contents , i searched on web but i find poor thinks Thank you in advances Francesco Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 7
Again at home... Everything seems to work! Jussi On 4 August 2012 15:09, Emil Lenngren emil.lenng...@gmail.com wrote: OK, it should work now. 2012/7/28 Emil Lenngren emil.lenng...@gmail.com Can't really do anything right now. I am in Venice now on Vacation :) I come home in 8 days or something. If you want, you can post the llvm output, gdb stacktrace or whatever... /Emil 2012/7/28 Jussi Lahtinen jussi.lahti...@gmail.com Before continuing my vacation again in countryside... Here is some JIT bug. See attachment. Gambas 3 rev 4995 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Adding a date to a number
http://gambasdoc.org/help/lang/dateadd?show Jussi On 9 August 2012 23:33, rocko sunblast...@gmail.com wrote: I have a date box that I want to use for adding a number of days to. EX: say user picks date 9/10/12(American style date format) and enters 30 days in a value box to add to the date and then display that in another text box. But I'm not sure what the formula in Gambas is for adding dates. I want to this: date + 30 days = future date 9/10/12 + 30 = 10/10/12. $date = dateBox.Value + 30 Is there a function for formating dates?? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
Where is stored the oxygen icon theme on your computer? ('/usr/share/icons' on mine) In that same path. Where is stored your XFCE configuration? ('~/.config/xfce4' on mine). Also same. I'm compiling latest revision, let's see if it works... Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Rounding to 2 decimals
ValueBox doesn't take strings. So, I suggest to use TextBoxes and do the conversion properly with Val(). Jussi On 27 July 2012 21:05, rocko sunblast...@gmail.com wrote: On Fri, 2012-07-27 at 19:49 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: On Fri, 2012-07-27 at 19:25 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: Using '.value instead of .text gives an error: Unknown symbol value in class TextBox On Fri, 2012-07-27 at 02:05 +0200, LeszekK wrote: 'Do not use textboxes for mathematical calculations Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.value 'valuebox! not textbox totAmnt = totBox.value 'valuebox! not textbox perAmnt = Round((prmAmnt / totAmnt * 100), 2) ValueBox1.Value = perAmnt % I not tested the code but it should work. First, I herewith want to join the folks who urge to not top-post. If you have a deeper look at the error message above, you'll notice that you still use TextBox instead of ValueBox, right? Regards, Tobi Ah yes the 'ol top vs bottom post --oh well Yes I figured that out and replaced my textBoxes with valueBoxes but still can't get it to work :) OK, so to sum up, two things were wrong with your very first code: a) Used TextBox without conversion - use ValueBox instead b) To round to decimals, the second argument to Round() must be negative - use -2 This gives: Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.Value totAmnt = totBox.Value perAmnt = Round(prmAmnt / totAmnt * 100, -2) Print perAmnt This code works for me (but without the ValueBox input stuff, I used prmAmnt = 2 and totAmnt = 3 hard-coded instead) If this does not work, please say what makes you feel that it didn't work. Regards, Tobi No it does not work for me. The last valueBox remains blank, actually it has a zero in it. The valueBox isn't updating it's value to the calculation, I can't seem to figure out why. I added a print statement and it does print the result in the console but it's not rounding to 2 places, using 2 and 3 gives a result of 66.6699982. I double checked the name and it is the same as in the code, ValueBox1, as I did not rename it like I did with the others. I am using: ValueBox1.Value = perAmnt % -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Rounding to 2 decimals
Issue with Round is more complicated. It is floating point precision problem, which arises from automatic conversion from float to single. You can fix it by changing; Dim perAmnt As Single to Dim perAmnt As Float Jussi On 27 July 2012 21:05, rocko sunblast...@gmail.com wrote: On Fri, 2012-07-27 at 19:49 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: On Fri, 2012-07-27 at 19:25 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: Using '.value instead of .text gives an error: Unknown symbol value in class TextBox On Fri, 2012-07-27 at 02:05 +0200, LeszekK wrote: 'Do not use textboxes for mathematical calculations Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.value 'valuebox! not textbox totAmnt = totBox.value 'valuebox! not textbox perAmnt = Round((prmAmnt / totAmnt * 100), 2) ValueBox1.Value = perAmnt % I not tested the code but it should work. First, I herewith want to join the folks who urge to not top-post. If you have a deeper look at the error message above, you'll notice that you still use TextBox instead of ValueBox, right? Regards, Tobi Ah yes the 'ol top vs bottom post --oh well Yes I figured that out and replaced my textBoxes with valueBoxes but still can't get it to work :) OK, so to sum up, two things were wrong with your very first code: a) Used TextBox without conversion - use ValueBox instead b) To round to decimals, the second argument to Round() must be negative - use -2 This gives: Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.Value totAmnt = totBox.Value perAmnt = Round(prmAmnt / totAmnt * 100, -2) Print perAmnt This code works for me (but without the ValueBox input stuff, I used prmAmnt = 2 and totAmnt = 3 hard-coded instead) If this does not work, please say what makes you feel that it didn't work. Regards, Tobi No it does not work for me. The last valueBox remains blank, actually it has a zero in it. The valueBox isn't updating it's value to the calculation, I can't seem to figure out why. I added a print statement and it does print the result in the console but it's not rounding to 2 places, using 2 and 3 gives a result of 66.6699982. I double checked the name and it is the same as in the code, ValueBox1, as I did not rename it like I did with the others. I am using: ValueBox1.Value = perAmnt % -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Rounding to 2 decimals
Oh, and before using Val() check whether string you got can be converted to number. Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Float If IsNumber(prmBox.Text) = True And If IsNumber(totBox.Text) = True Then prmAmnt = Val(prmBox.Text) totAmnt = Val(totBox.Text) perAmnt = Round(prmAmnt / totAmnt * 100, -2) Print perAmnt Else ''Here handle incorrect input of user... Endif Jussi On 27 July 2012 21:11, Jussi Lahtinen jussi.lahti...@gmail.com wrote: ValueBox doesn't take strings. So, I suggest to use TextBoxes and do the conversion properly with Val(). Jussi On 27 July 2012 21:05, rocko sunblast...@gmail.com wrote: On Fri, 2012-07-27 at 19:49 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: On Fri, 2012-07-27 at 19:25 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: Using '.value instead of .text gives an error: Unknown symbol value in class TextBox On Fri, 2012-07-27 at 02:05 +0200, LeszekK wrote: 'Do not use textboxes for mathematical calculations Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.value 'valuebox! not textbox totAmnt = totBox.value 'valuebox! not textbox perAmnt = Round((prmAmnt / totAmnt * 100), 2) ValueBox1.Value = perAmnt % I not tested the code but it should work. First, I herewith want to join the folks who urge to not top-post. If you have a deeper look at the error message above, you'll notice that you still use TextBox instead of ValueBox, right? Regards, Tobi Ah yes the 'ol top vs bottom post --oh well Yes I figured that out and replaced my textBoxes with valueBoxes but still can't get it to work :) OK, so to sum up, two things were wrong with your very first code: a) Used TextBox without conversion - use ValueBox instead b) To round to decimals, the second argument to Round() must be negative - use -2 This gives: Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.Value totAmnt = totBox.Value perAmnt = Round(prmAmnt / totAmnt * 100, -2) Print perAmnt This code works for me (but without the ValueBox input stuff, I used prmAmnt = 2 and totAmnt = 3 hard-coded instead) If this does not work, please say what makes you feel that it didn't work. Regards, Tobi No it does not work for me. The last valueBox remains blank, actually it has a zero in it. The valueBox isn't updating it's value to the calculation, I can't seem to figure out why. I added a print statement and it does print the result in the console but it's not rounding to 2 places, using 2 and 3 gives a result of 66.6699982. I double checked the name and it is the same as in the code, ValueBox1, as I did not rename it like I did with the others. I am using: ValueBox1.Value = perAmnt % -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Rounding to 2 decimals
If you use TextBox to display the result, then you need to convert to string. resultBox.Text = Str(perAmnt) % These should be fairly easy to find from documentation. All topics: http://www.gambasdoc.org/help?v3 Keywords: http://www.gambasdoc.org/help/lang?v3 Jussi On 27 July 2012 21:21, rocko sunblast...@gmail.com wrote: AHA! That works, I forgot about using 'Float' If I were to use a textBox to display the result, how would I convert it?? Would it be something like: Val(perAmnt) On Fri, 2012-07-27 at 21:14 +0300, Jussi Lahtinen wrote: Issue with Round is more complicated. It is floating point precision problem, which arises from automatic conversion from float to single. You can fix it by changing; Dim perAmnt As Single to Dim perAmnt As Float Jussi On 27 July 2012 21:05, rocko sunblast...@gmail.com wrote: On Fri, 2012-07-27 at 19:49 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: On Fri, 2012-07-27 at 19:25 +0200, Tobias Boege wrote: On Fri, 27 Jul 2012, rocko wrote: Using '.value instead of .text gives an error: Unknown symbol value in class TextBox On Fri, 2012-07-27 at 02:05 +0200, LeszekK wrote: 'Do not use textboxes for mathematical calculations Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.value 'valuebox! not textbox totAmnt = totBox.value 'valuebox! not textbox perAmnt = Round((prmAmnt / totAmnt * 100), 2) ValueBox1.Value = perAmnt % I not tested the code but it should work. First, I herewith want to join the folks who urge to not top-post. If you have a deeper look at the error message above, you'll notice that you still use TextBox instead of ValueBox, right? Regards, Tobi Ah yes the 'ol top vs bottom post --oh well Yes I figured that out and replaced my textBoxes with valueBoxes but still can't get it to work :) OK, so to sum up, two things were wrong with your very first code: a) Used TextBox without conversion - use ValueBox instead b) To round to decimals, the second argument to Round() must be negative - use -2 This gives: Dim prmAmnt As Integer Dim totAmnt As Integer Dim perAmnt As Single prmAmnt = prmBox.Value totAmnt = totBox.Value perAmnt = Round(prmAmnt / totAmnt * 100, -2) Print perAmnt This code works for me (but without the ValueBox input stuff, I used prmAmnt = 2 and totAmnt = 3 hard-coded instead) If this does not work, please say what makes you feel that it didn't work. Regards, Tobi No it does not work for me. The last valueBox remains blank, actually it has a zero in it. The valueBox isn't updating it's value to the calculation, I can't seem to figure out why. I added a print statement and it does print the result in the console but it's not rounding to 2 places, using 2 and 3 gives a result of 66.6699982. I double checked the name and it is the same as in the code, ValueBox1, as I did not rename it like I did with the others. I am using: ValueBox1.Value = perAmnt % -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263
[Gambas-user] JIT bug 7
Before continuing my vacation again in countryside... Here is some JIT bug. See attachment. Gambas 3 rev 4995 @ Xubuntu 12.04 64bit Jussi JITbug7-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
Top posting means the thread has to be read from the bottom up (minor annoyance), but what's really bad is when a single thread continuously mixes top and bottom posting. Then you have chaos. One solution to a mixed order thread (as I did here) is just to snip everything except what you're replying to, but that leaves newcomers in the dark as to the rest of the context. Strange that Gmail took the Outlook Express route... Gmail reorders mails into thread automatically and shows only recent part of the mail (unless you want to see all). So, for gmail users, it doesn't matter at all how you choose to reply. I think it's really handy. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
No success... But now IDE shows correct icons again, but I can't get them right at runtime (in fact I cannot change icons at all) in my test project! Test project is attached. Something wrong in it? My output: DMZ-Black DMZ-White HighContrast HighContrastInverse HumanLoginIcons Humanity Humanity-Dark LowContrast Tango default default.kde4 elementary-xfce elementary-xfce-dark elementaryXubuntu gnome hicolor oxygen gb.form: init stock with icon theme: '/usr/share/icons/oxygen' gb.form: desktop is XFCE gb.form: add icon path: /usr/share/icons/gnome/1x1!2 gb.form: add icon path: stock/2 Jussi On 25 July 2012 17:22, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Where is stored the oxygen icon theme on your computer? ('/usr/share/icons' on mine) In that same path. Where is stored your XFCE configuration? ('~/.config/xfce4' on mine). Also same. I'm compiling latest revision, let's see if it works... Jussi IconTest-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
They are not required, just additional components. Now you should be able to compile Gambas. If not, please compress and send compile logs for us. ( ./reconf-all ./configure -C make sudo make install ) ~/Desktop/compile.log 21 You may need to change word Desktop if your system is not in English. Jussi On 25 July 2012 21:52, rocko sunblast...@gmail.com wrote: I installed all the devs posted on that site. But I'm still getting 'Disabled' error's, although there are a lot less of them. This is after ./configure -C: || THESE COMPONENTS ARE DISABLED: || - gb.gsl || - gb.jit || - gb.media On Wed, 2012-07-25 at 03:24 +0300, Jussi Lahtinen wrote: I think you don't have devs installed! http://gambasdoc.org/help/install/ubuntu?v3view About top-posting... This is how gmail does it automatically, and I don't see any significant difference between top-posters vs non-top-posters... Is this really problem? Jussi On 25 July 2012 03:04, rocko sunblast...@gmail.com wrote: On Wed, 2012-07-25 at 00:16 +0200, Jesus wrote: El 24/07/12 22:26, rocko escribió: DOH! I forgot to run ./reconf -all, ./configure does work, BUT I'm now getting Components Disabled warning after ./configure -C || || THESE COMPONENTS ARE DISABLED: || - gb.cairo || - gb.compress.bzlib2 || - gb.db.mysql || - gb.db.postgresql || - gb.db.sqlite2 || - gb.db.sqlite3 || - gb.desktop || - gb.desktop.gnome || - gb.gsl || - gb.gtk || - gb.gtk.opengl || - gb.image.imlib || - gb.image.io || - gb.jit || - gb.media || - gb.net.curl || - gb.net.smtp || - gb.opengl || - gb.opengl.glsl || - gb.opengl.glu || - gb.pcre || - gb.pdf || - gb.qt4 || - gb.qt4.ext || - gb.qt4.opengl || - gb.qt4.webkit || - gb.sdl || - gb.sdl.sound || - gb.xml.xslt || Please, do not top-posting! Well, I wonder if you are using Ubuntu. If so, I suggest you to use the attached script I've made some time ago. It automates all the process, just run it as a normal user (no root). You'll be asked for root password when running the script. Tell us if you have succeeded. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _ Gambas3 refuses to compile on my machine. I used your script and got dozens of error's, most of them scrolled by too quickly for me to read completely. Do I need qt4 installed?? I have qt3 just not qt4. The last ones at the end are: || Unable to compile gb.eval.highlight || Unable to compile gb.form || Unable to compile gb.form.dialog || Unable to compile gb.form.mdi || Unable to compile gb.db.form || Unable to compile gb.report || Unable to compile gb.chart || Unable to compile gambas3 __ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw
Re: [Gambas-user] Default icons problem
OK, without full path it works, but not completely. Example with theme LowContrast I don't see correct icons. gb.form: init stock with icon theme: 'LowContrast' gb.form: desktop is XFCE gb.form: add icon path: /usr/share/icons/LowContrast/1x1!2 gb.form: add icon path: /usr/share/icons/gnome/1x1!2 gb.form: add icon path: stock/2 Output with oxygen, which seem to work correctly: gb.form: init stock with icon theme: 'oxygen' gb.form: desktop is XFCE gb.form: add icon path: /usr/share/icons/oxygen/1x1!2 gb.form: add icon path: /usr/share/icons/hicolor/1x1!2 gb.form: add icon path: /usr/share/icons/gnome/1x1!2 gb.form: add icon path: stock/2 Jussi On 25 July 2012 22:48, Maria geapla...@yahoo.es wrote: Ok, in a module it works. Jussi example works deleting the path and leaving the name of the icon set. De: Benoît Minisini gam...@users.sourceforge.net Para: Maria geapla...@yahoo.es; mailing list for gambas users gambas-user@lists.sourceforge.net Enviado: Miércoles 25 de julio de 2012 20:41 Asunto: Re: [Gambas-user] Default icons problem Sorry, not before loading the form, but before creating it. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
Just ignore it. Jussi On 25 July 2012 22:50, rocko sunblast...@gmail.com wrote: Forgot to mention I am getting one error when I run gambas3 from the command line: gb.qt4: warning: unable to load Qt translation: en_US.utf8 But gambas3 seems to run fine. On Wed, 2012-07-25 at 21:24 +0200, Jesus wrote: El 25/07/12 02:04, rocko escribió: On Wed, 2012-07-25 at 00:16 +0200, Jesus wrote: El 24/07/12 22:26, rocko escribió: DOH! I forgot to run ./reconf -all, ./configure does work, BUT I'm now getting Components Disabled warning after ./configure -C || Please, do not top-posting! Well, I wonder if you are using Ubuntu. If so, I suggest you to use the attached script I've made some time ago. It automates all the process, just run it as a normal user (no root). You'll be asked for root password when running the script. Tell us if you have succeeded. Gambas3 refuses to compile on my machine. I used your script and got dozens of error's, most of them scrolled by too quickly for me to read completely. Do I need qt4 installed?? I have qt3 just not qt4. The last ones at the end are: || Unable to compile gb.eval.highlight || Unable to compile gb.form || Unable to compile gb.form.dialog || Unable to compile gb.form.mdi || Unable to compile gb.db.form || Unable to compile gb.report || Unable to compile gb.chart || Unable to compile gambas3 Strange, that script installs everything which is needed (except LLVM) and I'm using it in a daily basis without problems. So I can't help you anymore. Good luck. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
Gmail, IMHO, is actually a mess managing threads and messages. I have noticed that it really split opinions. Either you love it or hate it. Why not use Thunderbird or alike? I understand we may use web based mail when not at home or not in our own PC, but... Kevin has answered exactly what I think about it. I have never find any use for Thunderbird etc. I have everything I need in webmail with access from everywhere. I see Thunderbird as just another program to eat memory and CPU cycles, and introducing unnecessary surface for crackers. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
OK, without full path it works, but not completely. I should have pointed that. But I could handle full paths, for icon themes not stored in /usr/share/icons... Good idea. Also I think there should be error/warning message if the theme is missing and debugging is on. Now I got only this from non-existing theme: gb.form: init stock with icon theme: 'huuhuu' gb.form: desktop is XFCE gb.form: add icon path: /usr/share/icons/gnome/1x1!2 gb.form: add icon path: stock/2 And exactly same icons than with LowContrast (seems to be gnome icons, I use Humanity-Dark icons in my Desktop). Please give more details (all icons? just some of them?...) Seems like either all icons are correct in theme, or the theme doesn't work at all (= all icons are wrong). Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
Some themes that are listed in Stock.Themes, doesn't seem to have necessary icons, like hicolor theme. It doesn't have (at least in 16x16) cancel, close, add and play icons. And when I look from Settings manager -- appearance settings, there hicolor is *not* listed. But LowContrast is listed, and it has different path structure. Gnome, oxygen and Tango themes (all working) seems to have structure like this to icons I test: NameOfTheme -- SIZExSIZE -- actions But LowContrast have this kind of folder structure to same icons: NameOfTheme -- SIZExSIZE -- stock So, I think Stock.Themes contains themes that do not have icons (?). And some alternative path structures are not checked..? Also some themes doesn't have icons in all necessary sizes, perhaps this should print warning? Jussi On 25 July 2012 23:54, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, without full path it works, but not completely. I should have pointed that. But I could handle full paths, for icon themes not stored in /usr/share/icons... Good idea. Also I think there should be error/warning message if the theme is missing and debugging is on. Now I got only this from non-existing theme: gb.form: init stock with icon theme: 'huuhuu' gb.form: desktop is XFCE gb.form: add icon path: /usr/share/icons/gnome/1x1!2 gb.form: add icon path: stock/2 And exactly same icons than with LowContrast (seems to be gnome icons, I use Humanity-Dark icons in my Desktop). Please give more details (all icons? just some of them?...) Seems like either all icons are correct in theme, or the theme doesn't work at all (= all icons are wrong). Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
Without Thunderbird, I wouldn't be able to develop Gambas and work at home... In the past I used KMail, but it becomes unusable in the last versions, so I switched to Thunderbird. Yeah, I don't mean to be spiteful. I'm sure it is good software for people who like to use non-web based email client. I mainly use GMail as a spam filter (and to allows the NSA to know what I am doing exactly). Hah! Well, you are dangerous man Benoit, giving such high quality software for free! Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
And when I look from Settings manager -- appearance settings, there hicolor is *not* listed. Because it is marked as Hidden in the index.theme file. Aaaa... OK. But LowContrast is listed, and it has different path structure. Gnome, oxygen and Tango themes (all working) seems to have structure like this to icons I test: NameOfTheme -- SIZExSIZE -- actions But LowContrast have this kind of folder structure to same icons: NameOfTheme -- SIZExSIZE -- stock On my Ubuntu, LowConstrast has the size first, then the types (I have actions, apps, categories, devices stock) Yes, that is what I tried to explain, but with LowContrast, actions folder doesn't contain corresponding icons to what example oxygen have in actions folder. Corresponding icons of LowContrast is in stock folder, not in actions folder. So, I think Stock.Themes contains themes that do not have icons (?). And some alternative path structures are not checked..? Also some themes doesn't have icons in all necessary sizes, perhaps this should print warning? Your forget the inheritance between themes. LowContrast inherits the gnome theme. OK. But with LowContrast theme 48x48 icons are ignored, as they wouldn't exist. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
AFAIK this is not standard and I can't use them. Icon relative paths and names should be the same in all icon themes. I understand. However, I wonder how things work in Xubuntu, since if I chose to use that theme, icons work correctly in Desktop. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Default icons problem
For Each sStr In Stock.Themes Print sStr Next Jussi On 24 July 2012 14:03, Maria geapla...@yahoo.es wrote: Yes, directory name in /usr/share/icons How I use the Stock.Theme property for getting themes? When I wrote it doesn't give me suggestions of themes, thats what you mean? I wrote with lower case all themes, is it right? (some directories have the first letter in upper case) De: Benoît Minisini gam...@users.sourceforge.net Para: Maria geapla...@yahoo.es; mailing list for gambas users gambas-user@lists.sourceforge.net Enviado: Martes 24 de julio de 2012 12:44 Asunto: Re: [Gambas-user] Default icons problem Le 24/07/2012 12:40, Maria a écrit : Hi, Sorry for the late feedback, I had some problems with dependencies in Debian for compiling gambas. Revision #4985 Gambas icons load according with the default icon desktop :-) And I can use svg icon themes...great! The Stock.Theme property I don't know how to use it. I wrote simply Stock.Theme=here_other_themes But it had no effect over application icons. It should. Beware that the name you put there is the name of the directory where icons are stored. Not the name of the theme in the control panel. You can have the list of themes with the 'Stock.Themes' property. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Install problems
I think you don't have devs installed! http://gambasdoc.org/help/install/ubuntu?v3view About top-posting... This is how gmail does it automatically, and I don't see any significant difference between top-posters vs non-top-posters... Is this really problem? Jussi On 25 July 2012 03:04, rocko sunblast...@gmail.com wrote: On Wed, 2012-07-25 at 00:16 +0200, Jesus wrote: El 24/07/12 22:26, rocko escribió: DOH! I forgot to run ./reconf -all, ./configure does work, BUT I'm now getting Components Disabled warning after ./configure -C || || THESE COMPONENTS ARE DISABLED: || - gb.cairo || - gb.compress.bzlib2 || - gb.db.mysql || - gb.db.postgresql || - gb.db.sqlite2 || - gb.db.sqlite3 || - gb.desktop || - gb.desktop.gnome || - gb.gsl || - gb.gtk || - gb.gtk.opengl || - gb.image.imlib || - gb.image.io || - gb.jit || - gb.media || - gb.net.curl || - gb.net.smtp || - gb.opengl || - gb.opengl.glsl || - gb.opengl.glu || - gb.pcre || - gb.pdf || - gb.qt4 || - gb.qt4.ext || - gb.qt4.opengl || - gb.qt4.webkit || - gb.sdl || - gb.sdl.sound || - gb.xml.xslt || Please, do not top-posting! Well, I wonder if you are using Ubuntu. If so, I suggest you to use the attached script I've made some time ago. It automates all the process, just run it as a normal user (no root). You'll be asked for root password when running the script. Tell us if you have succeeded. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _ Gambas3 refuses to compile on my machine. I used your script and got dozens of error's, most of them scrolled by too quickly for me to read completely. Do I need qt4 installed?? I have qt3 just not qt4. The last ones at the end are: || Unable to compile gb.eval.highlight || Unable to compile gb.form || Unable to compile gb.form.dialog || Unable to compile gb.form.mdi || Unable to compile gb.db.form || Unable to compile gb.report || Unable to compile gb.chart || Unable to compile gambas3 __ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Raises the event
I don't think Gambas supports static events. So you need to remove static from declaration, or use sub instead. Why you need myTest() sub to be static? Jussi On 13 July 2012 09:23, Ivan Kern ivan-k...@freenet.de wrote: Hi to all, I have made my own gambas component in gambas2 under ubuntu 10.04. It works well till I want raise an event. I always get an error message Cannot raise event in static function. The code is like this: 'Gambas class file EXPORT STATIC PUBLIC $A AS INTEGER STATIC PUBLIC $B AS INTEGER EVENT TEST(Value as Boolean) STATIC PUBLIC SUB Main() END STATIC PUBLIC SUB myTest() DIM iResult AS INTEGER iResult = $A*$B IF iResult = 2 THEN RAISE TEST(TRUE) ELSE RAISE TEST(FALSE) ENDIF END How can I manage it? Regards, Ivan. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] DIV
? 4.3 DIV 2.1 Type mismatch: wanted Integer, got Float instead Why it take only integers? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] DIV
Doc states, DIV is a synonymous for \ which is the integer division operator. Documentation says Calculates the quotient of two Integer numbers, rounding down. And my question was, in other words, why it calculates quotient for only integer numbers? Output is always integer, but why input should be? Also why MOD takes only integers, in C you can use fmod() if you want to use floats like in math generally. I think DIV and MOD would have more general usage if they would allow floats. Only reason I can see to keep DIV accepting only integers is performance, but is that really issue for single instruction? Right now this seems to be so for just historical reasons. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] DIV
This is for performance reasons: '\' (or DIV) operator is faster than '/'. OK. If you want to use DIV like '/', just use '/'! / is different thing, it doesn't give integer quotient. To get integer quotient from floats I use iQuotient = Floor( a / b ). Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] JIT bug 5
Not yet, able to isolate... ** INTERNAL ERROR ** ** Bad type (12) for VALUE_undo_variant ** Program aborting. Sorry! :-( So, I set break point on ERROR_panic: Breakpoint 1, ERROR_panic ( error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 517{ (gdb) bt #0 ERROR_panic (error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 #1 0x00406bbe in VALUE_undo_variant (value=optimized out) at gbx_value.c:2053 #2 0x00407e0f in VALUE_write (value=0x76626300, addr=0x1011e80, type=optimized out) at gbx_value.c:976 #3 0x00429726 in GB_CollectionSet (col=optimized out, key=optimized out, len=optimized out, value=0x76626300) at gbx_c_collection.c:298 #4 0x7fffe32eeb21 in ?? () #5 0x7fffd2e0 in ?? () #6 0x0009 in ?? () #7 0x00a4a830 in ?? () #8 0x0001 in ?? () #9 0x0002 in ?? () #10 0x7fffe32ee8e0 in ?? () #11 0x0093e628 in ?? () #12 0x0002 in ?? () #13 0x00409b86 in EXEC_enter () at gbx_exec.c:536 #14 0x7fffe4e2c251 in JR_extern_dispatch_object (object=optimized out, index=optimized out) at jit_runtime.c:1014 #15 0x7fffcec0 in ?? () #16 0x7fffe4e219a3 in JIT_compile_and_execute () at jit_compile.cpp:138 ---Type return to continue, or q return to quit--- Backtrace stopped: previous frame inner to this frame (corrupt stack?) Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 4
Yes it works now. But Print 0.6 ^ x did crash, but x = 0.6 ^ x alone did not crash (imMatr[10, 10] += x was needed)! So I wonder was 0.6 ^ x culprit alone? Jussi On 10 July 2012 18:13, Emil Lenngren emil.lenng...@gmail.com wrote: It should work now in revision #4934! /Emil 2012/7/9 Emil Lenngren emil.lenng...@gmail.com From gdb I disassemble the jit function to this: ... 0x77e3f05c: movabs $0x0,%rax 0x77e3f066: callq *%rax ... You can see that llvm replaced the llvm.powi.f64 to a null function :/ 2012/7/9 Emil Lenngren emil.lenng...@gmail.com Public Sub Button1_Click() test(19) End Fast Private Sub test(x As Integer) Print 0.6 ^ x End Does this crash for you as well? I think there is a bug in llvm or something. It doesn't seem to like that I call llvm.powi.f64. I shall see what I can do about it ... /Emil 2012/7/9 Jussi Lahtinen jussi.lahti...@gmail.com In fact the function can be further reduced to: c = CInt((0.6 ^ iEta) / sngCached[iEta]) Jussi On 9 July 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Finally, here it is isolated. See attachment. I don't know why I didn't get it in first try, and yet, I'm not sure what is going on... Gambas 3 rev 4921 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 5
Strange, this crash occurs on somewhere in initialization sub of my project which worked with earlier revision. Jussi On 10 July 2012 22:14, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Not yet, able to isolate... ** INTERNAL ERROR ** ** Bad type (12) for VALUE_undo_variant ** Program aborting. Sorry! :-( So, I set break point on ERROR_panic: Breakpoint 1, ERROR_panic ( error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 517{ (gdb) bt #0 ERROR_panic (error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 #1 0x00406bbe in VALUE_undo_variant (value=optimized out) at gbx_value.c:2053 #2 0x00407e0f in VALUE_write (value=0x76626300, addr=0x1011e80, type=optimized out) at gbx_value.c:976 #3 0x00429726 in GB_CollectionSet (col=optimized out, key=optimized out, len=optimized out, value=0x76626300) at gbx_c_collection.c:298 #4 0x7fffe32eeb21 in ?? () #5 0x7fffd2e0 in ?? () #6 0x0009 in ?? () #7 0x00a4a830 in ?? () #8 0x0001 in ?? () #9 0x0002 in ?? () #10 0x7fffe32ee8e0 in ?? () #11 0x0093e628 in ?? () #12 0x0002 in ?? () #13 0x00409b86 in EXEC_enter () at gbx_exec.c:536 #14 0x7fffe4e2c251 in JR_extern_dispatch_object (object=optimized out, index=optimized out) at jit_runtime.c:1014 #15 0x7fffcec0 in ?? () #16 0x7fffe4e219a3 in JIT_compile_and_execute () at jit_compile.cpp:138 ---Type return to continue, or q return to quit--- Backtrace stopped: previous frame inner to this frame (corrupt stack?) Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 5
OK, see attachment. Jussi On 10 July 2012 22:30, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Strange, this crash occurs on somewhere in initialization sub of my project which worked with earlier revision. Jussi On 10 July 2012 22:14, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Not yet, able to isolate... ** INTERNAL ERROR ** ** Bad type (12) for VALUE_undo_variant ** Program aborting. Sorry! :-( So, I set break point on ERROR_panic: Breakpoint 1, ERROR_panic ( error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 517{ (gdb) bt #0 ERROR_panic (error=0x436524 Bad type (%d) for VALUE_undo_variant) at gb_error.c:517 #1 0x00406bbe in VALUE_undo_variant (value=optimized out) at gbx_value.c:2053 #2 0x00407e0f in VALUE_write (value=0x76626300, addr=0x1011e80, type=optimized out) at gbx_value.c:976 #3 0x00429726 in GB_CollectionSet (col=optimized out, key=optimized out, len=optimized out, value=0x76626300) at gbx_c_collection.c:298 #4 0x7fffe32eeb21 in ?? () #5 0x7fffd2e0 in ?? () #6 0x0009 in ?? () #7 0x00a4a830 in ?? () #8 0x0001 in ?? () #9 0x0002 in ?? () #10 0x7fffe32ee8e0 in ?? () #11 0x0093e628 in ?? () #12 0x0002 in ?? () #13 0x00409b86 in EXEC_enter () at gbx_exec.c:536 #14 0x7fffe4e2c251 in JR_extern_dispatch_object (object=optimized out, index=optimized out) at jit_runtime.c:1014 #15 0x7fffcec0 in ?? () #16 0x7fffe4e219a3 in JIT_compile_and_execute () at jit_compile.cpp:138 ---Type return to continue, or q return to quit--- Backtrace stopped: previous frame inner to this frame (corrupt stack?) Jussi JITbug5-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 4
OK, I didn't know that kind of optimization is done... That explains also why imMatr[10, 10] += x was needed. Jussi On 10 July 2012 22:22, Emil Lenngren emil.lenng...@gmail.com wrote: Because if you only write x = 0.6 ^ x, that statement is completely optimized away, because x is never used later on. If you write Print 0.6 ^ x, the result of the operation is printed, i.e. used. If you write Print 0.6 ^ 2, that is optimized to Print 0.36. /Emil 2012/7/10 Jussi Lahtinen jussi.lahti...@gmail.com Yes it works now. But Print 0.6 ^ x did crash, but x = 0.6 ^ x alone did not crash (imMatr[10, 10] += x was needed)! So I wonder was 0.6 ^ x culprit alone? Jussi On 10 July 2012 18:13, Emil Lenngren emil.lenng...@gmail.com wrote: It should work now in revision #4934! /Emil 2012/7/9 Emil Lenngren emil.lenng...@gmail.com From gdb I disassemble the jit function to this: ... 0x77e3f05c: movabs $0x0,%rax 0x77e3f066: callq *%rax ... You can see that llvm replaced the llvm.powi.f64 to a null function :/ 2012/7/9 Emil Lenngren emil.lenng...@gmail.com Public Sub Button1_Click() test(19) End Fast Private Sub test(x As Integer) Print 0.6 ^ x End Does this crash for you as well? I think there is a bug in llvm or something. It doesn't seem to like that I call llvm.powi.f64. I shall see what I can do about it ... /Emil 2012/7/9 Jussi Lahtinen jussi.lahti...@gmail.com In fact the function can be further reduced to: c = CInt((0.6 ^ iEta) / sngCached[iEta]) Jussi On 9 July 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Finally, here it is isolated. See attachment. I don't know why I didn't get it in first try, and yet, I'm not sure what is going on... Gambas 3 rev 4921 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] JIT bug 4
Finally, here it is isolated. See attachment. I don't know why I didn't get it in first try, and yet, I'm not sure what is going on... Gambas 3 rev 4921 @ Xubuntu 12.04 64bit Jussi JITbug4-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug 4
In fact the function can be further reduced to: c = CInt((0.6 ^ iEta) / sngCached[iEta]) Jussi On 9 July 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Finally, here it is isolated. See attachment. I don't know why I didn't get it in first try, and yet, I'm not sure what is going on... Gambas 3 rev 4921 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
OK. I use gmail and so I didn't see the problem. My thought was to keep these JIT bugs in same thread, but you are right. Jussi On 6 July 2012 18:44, Benoît Minisini gam...@users.sourceforge.net wrote: Le 06/07/2012 17:35, Jussi Lahtinen a écrit : Just quick info before I leave for couple days... ... Can you start a new thread for new bugs ? It becomes hard to read the current one now, it is too deep! Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
Next bug... it's crash and I don't have any clue what causes it. I'm trying to isolate it, but meanwhile here is bt from gdb: Program received signal SIGSEGV, Segmentation fault. 0x7fffe3b0e430 in llvm::BasicBlock::getContext() const () from /usr/lib/libLLVM-3.2svn.so (gdb) bt #0 0x7fffe3b0e430 in llvm::BasicBlock::getContext() const () from /usr/lib/libLLVM-3.2svn.so #1 0x7fffe3b8de4d in llvm::BranchInst::BranchInst(llvm::BasicBlock*, llvm::BasicBlock*, llvm::Value*, llvm::Instruction*) () from /usr/lib/libLLVM-3.2svn.so #2 0x7fffe4e20c87 in Create (InsertBefore=0x0, Cond=0x18cba60, IfFalse=0x30880d0, IfTrue=0x0) at /usr/include/llvm/Instructions.h:2370 #3 llvm::IRBuildertrue, llvm::ConstantFolder, llvm::IRBuilderDefaultInsertertrue ::CreateCondBr (this=0xef1150, Cond=0x18cba60, True=0x0, False=0x30880d0) at /usr/include/llvm/Support/IRBuilder.h:448 #4 0x7fffe4e1c81f in insert_pending_branches () at jit_codegen.cpp:866 #5 JIT_codegen () at jit_codegen.cpp:6535 #6 0x7fffe4e2339c in JIT_compile_and_execute () at jit_compile.cpp:119 #7 0x7fffdbb88223 in ?? () #8 0x7fffe4e2d624 in JR_extern_dispatch_object (object=optimized out, index=optimized out) at jit_runtime.c:965 #9 0x in ?? () Gambas 3 rev 4871 @ Xubuntu 12.04 64bit Jussi On 27 June 2012 19:17, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 27 June 2012 00:12, Emil Lenngren emil.lenng...@gmail.com wrote: It seems like when LLVM reads boolean pointers, it assumes the seven most significant bits are always 0, which is not the case in Gambas. Does the latest revision work? I have no opportunity to even compile it and see if it works at the moment :) /Emil 2012/6/26 Jussi Lahtinen jussi.lahti...@gmail.com .../MagicBug$ GB_JIT=info gbx3 gb.jit: using LLVM 3.2. gb.jit: beginning compiling MainModule.MainModule: gb.jit: beginning compiling MainModule.Main: gb.jit: dumping function MainModule.Main: ; ModuleID = 'jit_mod' target datalayout = e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64 target triple = x86_64-pc-linux-gnu %Value = type { i64, i64, i64, i64 } %ValueFunction = type { i64, i8*, i8*, i8, i8, i16 } %String = type { i64, i8*, i32, i32 } %Void = type { i64, i64, i64, i64 } define void @func_0_MainModule_2() { entry: %0 = load i8** inttoptr (i64 6639552 to i8**) %1 = load i8** inttoptr (i64 6639576 to i8**) %2 = icmp eq i8* %1, %0 br i1 %2, label %if.cont, label %if.then if.then: ; preds = %entry tail call void @stack_corrupted_abort() unreachable if.cont: ; preds = %entry store i8 -1, i8* inttoptr (i64 29188424 to i8*) %3 = load i8** inttoptr (i64 6639552 to i8**) %4 = load i8** inttoptr (i64 6639576 to i8**) %5 = icmp eq i8* %4, %3 br i1 %5, label %if.cont2, label %if.then1 if.then1: ; preds = %if.cont tail call void @stack_corrupted_abort() unreachable if.cont2: ; preds = %if.cont %6 = load i1* inttoptr (i64 29188424 to i1*) br i1 %6, label %block5, label %if.cont7 block5: ; preds = %if.cont2 %7 = load %Value** inttoptr (i64 6639552 to %Value**) %8 = bitcast %Value* %7 to %ValueFunction* %9 = getelementptr %ValueFunction* %8, i64 0, i32 0 store i64 13, i64* %9 %10 = getelementptr %ValueFunction* %8, i64 0, i32 1 store i8* inttoptr (i64 27857320 to i8*), i8** %10 %11 = getelementptr %ValueFunction* %8, i64 0, i32 2 store i8* null, i8** %11 %12 = getelementptr %Value* %7, i64 1 %13 = bitcast %Value* %12 to %String* %14 = getelementptr %String* %13, i64 0, i32 0 store i64 10, i64* %14 %15 = getelementptr %String* %13, i64 0, i32 1 store i8* inttoptr (i64 29162265 to i8*), i8** %15 %16 = getelementptr %String* %13, i64 0, i32 2 store i32 0, i32* %16 %17 = getelementptr %String* %13, i64 0, i32 3 store i32 17, i32* %17 %18 = getelementptr %Value* %7, i64 2 store %Value* %18, %Value** inttoptr (i64 6639552 to %Value**) store i64 29162040, i64* inttoptr (i64 6639624 to i64*) store i8 1, i8* inttoptr (i64 6648048 to i8*) store i8* inttoptr (i64 140276446242864 to i8*), i8** inttoptr (i64 6648040 to i8**) store
Re: [Gambas-user] Bug with JIT and external functions
Yes, it works now! Jussi On 27 June 2012 00:12, Emil Lenngren emil.lenng...@gmail.com wrote: It seems like when LLVM reads boolean pointers, it assumes the seven most significant bits are always 0, which is not the case in Gambas. Does the latest revision work? I have no opportunity to even compile it and see if it works at the moment :) /Emil 2012/6/26 Jussi Lahtinen jussi.lahti...@gmail.com .../MagicBug$ GB_JIT=info gbx3 gb.jit: using LLVM 3.2. gb.jit: beginning compiling MainModule.MainModule: gb.jit: beginning compiling MainModule.Main: gb.jit: dumping function MainModule.Main: ; ModuleID = 'jit_mod' target datalayout = e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64 target triple = x86_64-pc-linux-gnu %Value = type { i64, i64, i64, i64 } %ValueFunction = type { i64, i8*, i8*, i8, i8, i16 } %String = type { i64, i8*, i32, i32 } %Void = type { i64, i64, i64, i64 } define void @func_0_MainModule_2() { entry: %0 = load i8** inttoptr (i64 6639552 to i8**) %1 = load i8** inttoptr (i64 6639576 to i8**) %2 = icmp eq i8* %1, %0 br i1 %2, label %if.cont, label %if.then if.then: ; preds = %entry tail call void @stack_corrupted_abort() unreachable if.cont: ; preds = %entry store i8 -1, i8* inttoptr (i64 29188424 to i8*) %3 = load i8** inttoptr (i64 6639552 to i8**) %4 = load i8** inttoptr (i64 6639576 to i8**) %5 = icmp eq i8* %4, %3 br i1 %5, label %if.cont2, label %if.then1 if.then1: ; preds = %if.cont tail call void @stack_corrupted_abort() unreachable if.cont2: ; preds = %if.cont %6 = load i1* inttoptr (i64 29188424 to i1*) br i1 %6, label %block5, label %if.cont7 block5: ; preds = %if.cont2 %7 = load %Value** inttoptr (i64 6639552 to %Value**) %8 = bitcast %Value* %7 to %ValueFunction* %9 = getelementptr %ValueFunction* %8, i64 0, i32 0 store i64 13, i64* %9 %10 = getelementptr %ValueFunction* %8, i64 0, i32 1 store i8* inttoptr (i64 27857320 to i8*), i8** %10 %11 = getelementptr %ValueFunction* %8, i64 0, i32 2 store i8* null, i8** %11 %12 = getelementptr %Value* %7, i64 1 %13 = bitcast %Value* %12 to %String* %14 = getelementptr %String* %13, i64 0, i32 0 store i64 10, i64* %14 %15 = getelementptr %String* %13, i64 0, i32 1 store i8* inttoptr (i64 29162265 to i8*), i8** %15 %16 = getelementptr %String* %13, i64 0, i32 2 store i32 0, i32* %16 %17 = getelementptr %String* %13, i64 0, i32 3 store i32 17, i32* %17 %18 = getelementptr %Value* %7, i64 2 store %Value* %18, %Value** inttoptr (i64 6639552 to %Value**) store i64 29162040, i64* inttoptr (i64 6639624 to i64*) store i8 1, i8* inttoptr (i64 6648048 to i8*) store i8* inttoptr (i64 140276446242864 to i8*), i8** inttoptr (i64 6648040 to i8**) store i8* null, i8** inttoptr (i64 6648024 to i8**) store i8* inttoptr (i64 27857320 to i8*), i8** inttoptr (i64 6648016 to i8**) store i8 1, i8* inttoptr (i64 6648050 to i8*) tail call void @EXEC_native() %19 = load %Value** inttoptr (i64 6639552 to %Value**) %20 = getelementptr %Value* %19, i64 -1 store %Value* %20, %Value** inttoptr (i64 6639552 to %Value**) %.pre = load i8** inttoptr (i64 6639552 to i8**) %.pre11 = load i8** inttoptr (i64 6639576 to i8**) %21 = icmp eq i8* %.pre11, %.pre br i1 %21, label %if.cont7, label %if.then6 if.then6: ; preds = %block5 tail call void @stack_corrupted_abort() unreachable if.cont7: ; preds = %if.cont2, %block5 %22 = load %Value** inttoptr (i64 6639552 to %Value**) %23 = bitcast %Value* %22 to %ValueFunction* %24 = getelementptr %ValueFunction* %23, i64 0, i32 0 store i64 13, i64* %24 %25 = getelementptr %ValueFunction* %23, i64 0, i32 1 store i8* inttoptr (i64 27857320 to i8*), i8** %25 %26 = getelementptr %ValueFunction* %23, i64 0, i32 2 store i8* null, i8** %26 %27 = getelementptr %Value* %22, i64 1 %28 = bitcast %Value* %27 to %String* %29 = getelementptr %String* %28, i64 0, i32 0 store i64 10, i64* %29 %30 = getelementptr %String* %28, i64 0, i32 1 store i8* inttoptr (i64
Re: [Gambas-user] Bug with JIT and external functions
OK, here is more. This is really really weird. I expect message Everything works!, but I get *only* Something broke!!. But if I add 'Return', under Message(Everything works!), or I remove 'Fast' then everything works as expected. See attachment. Gambas 3 rev 4860 @ Xubuntu 12.04 64bit Jussi On 20 June 2012 20:14, Emil Lenngren emil.lenng...@gmail.com wrote: That bug was actually an interpreter bug, but it is now corrected in the latest revision :) /Emil 2012/6/20 Jussi Lahtinen jussi.lahti...@gmail.com Yeah, I'm also leaving to countryside for Midsummer parties... but I made quick test, and I found another bug (see attachment). Similar problem with argument counting. Jussi On 20 June 2012 19:14, Emil Lenngren emil.lenng...@gmail.com wrote: Tomorrow I will travel away for a week so I cannot do anything then, but just keep sending emails and I will reply when I come home :) /Emil 2012/6/20 Jussi Lahtinen jussi.lahti...@gmail.com So far everything seems to work! I'll continue further testing later. Jussi On 20 June 2012 01:10, Emil Lenngren emil.lenng...@gmail.com wrote: Is revision #4851 useful for you? You can now convert functions in the current running class to pointers. /Emil 2012/6/19 Emil Lenngren emil.lenng...@gmail.com It should work in the latest revision :) 2012/6/19 Emil Lenngren emil.lenng...@gmail.com If you want a quick workaround, you can have non-fast method that creates a callback, and immediately returns it, like: Private Function GenerateCallback() As Pointer Return CallbackFunction End Fast Private Function CallbackFunction() ... End Extern extfunc(cb As Pointer) In somelib Fast Private Function Main() Dim p As Pointer = GenerateCallback() extfunc(p) End /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com No problem, I'm glad to help making Gambas more robust, when ever I have time to do so! And testing things seems to be easy contribution for me... My project has about 120 000 lines of code. And I try JIT with every module and class of it. So I think I will find more bugs... But in some point I must wait support for callbacks to finish that. Jussi On 19 June 2012 21:58, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Kiitos for another bug report :) Hmm.. I forgot that classes can override extern methods as well. That's where the real problem is. /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line
Re: [Gambas-user] Bug with JIT and external functions
27857320 to i8*), i8** inttoptr (i64 6648016 to i8**) store i8 1, i8* inttoptr (i64 6648050 to i8*) tail call void @EXEC_native() %34 = load %Value** inttoptr (i64 6639552 to %Value**) %35 = getelementptr %Value* %34, i64 -1 store %Value* %35, %Value** inttoptr (i64 6639552 to %Value**) %36 = load i8** inttoptr (i64 6639552 to i8**) %37 = load i8** inttoptr (i64 6639576 to i8**) %38 = icmp eq i8* %37, %36 br i1 %38, label %if.cont9, label %if.then8 if.then8: ; preds = %if.cont7 tail call void @stack_corrupted_abort() unreachable if.cont9: ; preds = %if.cont7 store i64 0, i64* getelementptr (%Void* inttoptr (i64 6647920 to %Void*), i64 0, i32 0) tail call void @EXEC_leave_keep() ret void } declare void @stack_corrupted_abort() declare void @EXEC_native() declare void @EXEC_leave_keep() Jussi On 26 June 2012 21:05, Emil Lenngren emil.lenng...@gmail.com wrote: I am in Italy now on holiday so I cannot debug the code, but could you please run gbx3 with GB_JIT=info and post the llvm code? /Emil 2012/6/26 Jussi Lahtinen jussi.lahti...@gmail.com OK, here is more. This is really really weird. I expect message Everything works!, but I get *only* Something broke!!. But if I add 'Return', under Message(Everything works!), or I remove 'Fast' then everything works as expected. See attachment. Gambas 3 rev 4860 @ Xubuntu 12.04 64bit Jussi On 20 June 2012 20:14, Emil Lenngren emil.lenng...@gmail.com wrote: That bug was actually an interpreter bug, but it is now corrected in the latest revision :) /Emil 2012/6/20 Jussi Lahtinen jussi.lahti...@gmail.com Yeah, I'm also leaving to countryside for Midsummer parties... but I made quick test, and I found another bug (see attachment). Similar problem with argument counting. Jussi On 20 June 2012 19:14, Emil Lenngren emil.lenng...@gmail.com wrote: Tomorrow I will travel away for a week so I cannot do anything then, but just keep sending emails and I will reply when I come home :) /Emil 2012/6/20 Jussi Lahtinen jussi.lahti...@gmail.com So far everything seems to work! I'll continue further testing later. Jussi On 20 June 2012 01:10, Emil Lenngren emil.lenng...@gmail.com wrote: Is revision #4851 useful for you? You can now convert functions in the current running class to pointers. /Emil 2012/6/19 Emil Lenngren emil.lenng...@gmail.com It should work in the latest revision :) 2012/6/19 Emil Lenngren emil.lenng...@gmail.com If you want a quick workaround, you can have non-fast method that creates a callback, and immediately returns it, like: Private Function GenerateCallback() As Pointer Return CallbackFunction End Fast Private Function CallbackFunction() ... End Extern extfunc(cb As Pointer) In somelib Fast Private Function Main() Dim p As Pointer = GenerateCallback() extfunc(p) End /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com No problem, I'm glad to help making Gambas more robust, when ever I have time to do so! And testing things seems to be easy contribution for me... My project has about 120 000 lines of code. And I try JIT with every module and class of it. So I think I will find more bugs... But in some point I must wait support for callbacks to finish that. Jussi On 19 June 2012 21:58, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Kiitos for another bug report :) Hmm.. I forgot that classes can override extern methods as well. That's where the real problem is. /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com
Re: [Gambas-user] Bug with JIT and external functions
So far everything seems to work! I'll continue further testing later. Jussi On 20 June 2012 01:10, Emil Lenngren emil.lenng...@gmail.com wrote: Is revision #4851 useful for you? You can now convert functions in the current running class to pointers. /Emil 2012/6/19 Emil Lenngren emil.lenng...@gmail.com It should work in the latest revision :) 2012/6/19 Emil Lenngren emil.lenng...@gmail.com If you want a quick workaround, you can have non-fast method that creates a callback, and immediately returns it, like: Private Function GenerateCallback() As Pointer Return CallbackFunction End Fast Private Function CallbackFunction() ... End Extern extfunc(cb As Pointer) In somelib Fast Private Function Main() Dim p As Pointer = GenerateCallback() extfunc(p) End /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com No problem, I'm glad to help making Gambas more robust, when ever I have time to do so! And testing things seems to be easy contribution for me... My project has about 120 000 lines of code. And I try JIT with every module and class of it. So I think I will find more bugs... But in some point I must wait support for callbacks to finish that. Jussi On 19 June 2012 21:58, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Kiitos for another bug report :) Hmm.. I forgot that classes can override extern methods as well. That's where the real problem is. /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240 #7 0x7fffedc8600e in get_global_function_real ( name=0x7fffedcb9e57 CLASS_free, func=0x40ebf6, ret=optimized out, args=optimized out, vararg=optimized out) at jit_codegen.cpp:276 #8 0x7fffedc8a9dc in operator() (this=synthetic pointer) at jit_codegen.cpp:991 ---Type return to continue, or q return to quit--- #9 gen_ifunref_object_no_nullcheck(llvm::Value*)::lambda() (func=..., cond=0x8999d0, if_name=optimized out, cont_name=optimized out) at jit_codegen.cpp:562 #10 unref_object_no_nullcheck (ptr=0x898ca8) at jit_codegen.cpp:993 #11 0x7fffedc9a44c in codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1566 #12 PushPureObjectVariableExpression
Re: [Gambas-user] Bug with JIT and external functions
Yeah, I'm also leaving to countryside for Midsummer parties... but I made quick test, and I found another bug (see attachment). Similar problem with argument counting. Jussi On 20 June 2012 19:14, Emil Lenngren emil.lenng...@gmail.com wrote: Tomorrow I will travel away for a week so I cannot do anything then, but just keep sending emails and I will reply when I come home :) /Emil 2012/6/20 Jussi Lahtinen jussi.lahti...@gmail.com So far everything seems to work! I'll continue further testing later. Jussi On 20 June 2012 01:10, Emil Lenngren emil.lenng...@gmail.com wrote: Is revision #4851 useful for you? You can now convert functions in the current running class to pointers. /Emil 2012/6/19 Emil Lenngren emil.lenng...@gmail.com It should work in the latest revision :) 2012/6/19 Emil Lenngren emil.lenng...@gmail.com If you want a quick workaround, you can have non-fast method that creates a callback, and immediately returns it, like: Private Function GenerateCallback() As Pointer Return CallbackFunction End Fast Private Function CallbackFunction() ... End Extern extfunc(cb As Pointer) In somelib Fast Private Function Main() Dim p As Pointer = GenerateCallback() extfunc(p) End /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com No problem, I'm glad to help making Gambas more robust, when ever I have time to do so! And testing things seems to be easy contribution for me... My project has about 120 000 lines of code. And I try JIT with every module and class of it. So I think I will find more bugs... But in some point I must wait support for callbacks to finish that. Jussi On 19 June 2012 21:58, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Kiitos for another bug report :) Hmm.. I forgot that classes can override extern methods as well. That's where the real problem is. /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240
Re: [Gambas-user] Bug with JIT and external functions
Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240 #7 0x7fffedc8600e in get_global_function_real ( name=0x7fffedcb9e57 CLASS_free, func=0x40ebf6, ret=optimized out, args=optimized out, vararg=optimized out) at jit_codegen.cpp:276 #8 0x7fffedc8a9dc in operator() (this=synthetic pointer) at jit_codegen.cpp:991 ---Type return to continue, or q return to quit--- #9 gen_ifunref_object_no_nullcheck(llvm::Value*)::lambda() (func=..., cond=0x8999d0, if_name=optimized out, cont_name=optimized out) at jit_codegen.cpp:562 #10 unref_object_no_nullcheck (ptr=0x898ca8) at jit_codegen.cpp:993 #11 0x7fffedc9a44c in codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1566 #12 PushPureObjectVariableExpression::codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1545 #13 0x7fffedca3f0d in SubrExpression::codegen_get_value (this=0x86a450) at jit_codegen.cpp:5898 #14 0x7fffedc8c21d in DropExpression::codegen (this=0x86a4a0) at jit_codegen.cpp:1257 #15 0x7fffedca6fa7 in codegen_statements () at jit_codegen.cpp:855 #16 JIT_codegen () at jit_codegen.cpp:6490 #17 0x7fffedcadc64 in JIT_compile_and_execute () at jit_compile.cpp:119 #18 0x0040a2fb in EXEC_jit_function_loop () at gbx_exec.c:871 #19 0x0040ab22 in EXEC_function_real () at gbx_exec.c:862 #20 0x0041e86d in raise_event (observer=optimized out, object=optimized out, func_id=optimized out, nparam=optimized out) at gbx_api.c:711 #21 0x0041efa6 in GB_Raise (object=0x8b95c8, event_id=16, nparam=0) at gbx_api.c:842 #22 0x75fce3d3 in gb_raise_button_Click (sender=optimized out) Jussi On 18 June 2012 22:08, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Can you please provide more information? A gdb backtrace or something, because I get no errors at all. Everything seems to work for me ... /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com OK, I found it. See attachment. Jussi On 17 June 2012 23:36, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, that is fixed, and I cannot see any problems with compare method anymore. But with my big project, I got this with signal 6; gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. I'm out of time, but as soon as I have time I try to isolate code causing the problem. Jussi On 17 June 2012 20:24, Emil Lenngren emil.lenng...@gmail.com wrote: It should be fixed in revision #4843! /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com Yes, it really works now. And I found a lot of errors by me. But for some reason JIT raises compare method when it shouldn't, and when I tried to isolate the problem I got crash (signal 11). This seems not to be related
Re: [Gambas-user] Bug with JIT and external functions
More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240 #7 0x7fffedc8600e in get_global_function_real ( name=0x7fffedcb9e57 CLASS_free, func=0x40ebf6, ret=optimized out, args=optimized out, vararg=optimized out) at jit_codegen.cpp:276 #8 0x7fffedc8a9dc in operator() (this=synthetic pointer) at jit_codegen.cpp:991 ---Type return to continue, or q return to quit--- #9 gen_ifunref_object_no_nullcheck(llvm::Value*)::lambda() (func=..., cond=0x8999d0, if_name=optimized out, cont_name=optimized out) at jit_codegen.cpp:562 #10 unref_object_no_nullcheck (ptr=0x898ca8) at jit_codegen.cpp:993 #11 0x7fffedc9a44c in codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1566 #12 PushPureObjectVariableExpression::codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1545 #13 0x7fffedca3f0d in SubrExpression::codegen_get_value (this=0x86a450) at jit_codegen.cpp:5898 #14 0x7fffedc8c21d in DropExpression::codegen (this=0x86a4a0) at jit_codegen.cpp:1257 #15 0x7fffedca6fa7 in codegen_statements () at jit_codegen.cpp:855 #16 JIT_codegen () at jit_codegen.cpp:6490 #17 0x7fffedcadc64 in JIT_compile_and_execute () at jit_compile.cpp:119 #18 0x0040a2fb in EXEC_jit_function_loop () at gbx_exec.c:871 #19 0x0040ab22 in EXEC_function_real () at gbx_exec.c:862 #20 0x0041e86d in raise_event (observer=optimized out, object=optimized out, func_id=optimized out, nparam=optimized out) at gbx_api.c:711 #21 0x0041efa6 in GB_Raise (object=0x8b95c8, event_id=16, nparam=0) at gbx_api.c:842 #22 0x75fce3d3 in gb_raise_button_Click (sender=optimized out) Jussi On 18 June 2012 22:08, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Can you please provide more information? A gdb backtrace or something, because I get no errors at all. Everything seems to work for me ... /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com OK, I found it. See attachment. Jussi On 17 June 2012 23:36, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, that is fixed, and I cannot see any problems with compare method anymore. But with my big project, I got this with signal 6; gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. I'm out of time, but as soon as I have time I try to isolate code causing the problem. Jussi On 17 June 2012 20:24, Emil Lenngren emil.lenng...@gmail.com wrote
Re: [Gambas-user] Bug with JIT and external functions
No problem, I'm glad to help making Gambas more robust, when ever I have time to do so! And testing things seems to be easy contribution for me... My project has about 120 000 lines of code. And I try JIT with every module and class of it. So I think I will find more bugs... But in some point I must wait support for callbacks to finish that. Jussi On 19 June 2012 21:58, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Kiitos for another bug report :) Hmm.. I forgot that classes can override extern methods as well. That's where the real problem is. /Emil 2012/6/19 Jussi Lahtinen jussi.lahti...@gmail.com More bugs... Make shared library (just dummy example [or just use binary that is included with project source]); #include math.h int yEta(int x1, int y1, int x2, int y2) {return (int) hypot(x1-x2,y1-y2);} Then run the attached project. With JIT, number of arguments is counted wrong. Jussi On 19 June 2012 21:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Yes, it works now! Jussi On 18 June 2012 22:34, Emil Lenngren emil.lenng...@gmail.com wrote: Does it work in revision #4847? /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240 #7 0x7fffedc8600e in get_global_function_real ( name=0x7fffedcb9e57 CLASS_free, func=0x40ebf6, ret=optimized out, args=optimized out, vararg=optimized out) at jit_codegen.cpp:276 #8 0x7fffedc8a9dc in operator() (this=synthetic pointer) at jit_codegen.cpp:991 ---Type return to continue, or q return to quit--- #9 gen_ifunref_object_no_nullcheck(llvm::Value*)::lambda() (func=..., cond=0x8999d0, if_name=optimized out, cont_name=optimized out) at jit_codegen.cpp:562 #10 unref_object_no_nullcheck (ptr=0x898ca8) at jit_codegen.cpp:993 #11 0x7fffedc9a44c in codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1566 #12 PushPureObjectVariableExpression::codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1545 #13 0x7fffedca3f0d in SubrExpression::codegen_get_value (this=0x86a450) at jit_codegen.cpp:5898 #14 0x7fffedc8c21d in DropExpression::codegen (this=0x86a4a0) at jit_codegen.cpp:1257 #15 0x7fffedca6fa7 in codegen_statements () at jit_codegen.cpp:855 #16 JIT_codegen () at jit_codegen.cpp:6490 #17 0x7fffedcadc64 in JIT_compile_and_execute () at jit_compile.cpp:119 #18 0x0040a2fb in EXEC_jit_function_loop () at gbx_exec.c:871 #19 0x0040ab22 in EXEC_function_real () at gbx_exec.c:862 #20 0x0041e86d in raise_event (observer=optimized out, object=optimized out, func_id=optimized out, nparam=optimized out) at gbx_api.c:711 #21 0x0041efa6 in GB_Raise (object=0x8b95c8, event_id=16, nparam=0) at gbx_api.c:842 #22 0x75fce3d3 in gb_raise_button_Click (sender=optimized out) Jussi On 18 June 2012 22:08, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Can you please provide more information? A gdb backtrace
Re: [Gambas-user] Access global variable from other .class
As far as know, at least CentOS doesn't have a graphical authorisation utility for sudo. Seems so, weird. As far as I know, on some mandriva related distros with gnome desktops installed, it still bumps the user privileges even if -c is used. Also strange... Hmm. I have seen gksu (not gksudo) run in a terminal to do something and then followed by a privileged command that was not denied. Again, this was on a mandriva derived distro. e.g. $ gksu whoami /root $ ifconfig ... Yes, that is possible with gksu or su. But behaviour of these commands is configurable. So, I don't see this as problem. Usually good advice is to use sudo, with it, elevated privileges are used only if next command also start with sudo. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
Maybe it would be possible to write a graphical su entirely in Gambas? The first difficulty I see is how to know if we must use 'su' or 'sudo' to run the command... I have never run into need for su, I always use sudo. Example in Ubuntu as default, you cannot do su root. So su is useful only if you need to change to some other user, but the keyword in Gambas is RunAsRoot. Is there something where sudo would fail? Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
Some systems do not use sudo. Maybe they find it unsecure. Hmmm... I don't know any reason for sudo being insecure compared to su. Do you mean sudo exist, but it's use is restricted like su in Ubuntu..? Otherwise, if sudo doesn't exist then use su -c, if this also fails, then I don't know how that system can be tolerated by anyone. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
OK, I found it. See attachment. Jussi On 17 June 2012 23:36, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, that is fixed, and I cannot see any problems with compare method anymore. But with my big project, I got this with signal 6; gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. I'm out of time, but as soon as I have time I try to isolate code causing the problem. Jussi On 17 June 2012 20:24, Emil Lenngren emil.lenng...@gmail.com wrote: It should be fixed in revision #4843! /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com Yes, it really works now. And I found a lot of errors by me. But for some reason JIT raises compare method when it shouldn't, and when I tried to isolate the problem I got crash (signal 11). This seems not to be related to compare method, so just ignore name of the attached project. I will look it more closely when this is fixed. Jussi On 17 June 2012 19:01, Emil Lenngren emil.lenng...@gmail.com wrote: Yes, it works now :) 2012/6/17 Benoît Minisini gam...@users.sourceforge.net Le 17/06/2012 02:54, Jussi Lahtinen a écrit : Yeah, terminal gives other position... With my actual project, I got error message; wanted string, got blaablaaClass instead. And that error message comes from function (from other module without Fast) which takes two objects are parameters. So either terminal isn't showing the real stack, or there is something else wrong... But my time is up, I'll see it tomorrow (with latest revision). Jussi The incorrect line number problem, as reported by the debugger (and not when you run the program normally!), should be fixed in revision #4841. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user JITStreamBug-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
Starting program: /usr/local/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1. gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. Program received signal SIGABRT, Aborted. 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x77130445 in __GI_raise (sig=optimized out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x77133bab in __GI_abort () at abort.c:91 #2 0x7712910e in __assert_fail_base (fmt=optimized out, assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=optimized out, function=optimized out) at assert.c:94 #3 0x771291b2 in __GI___assert_fail ( assertion=0x7fffed43c3b8 (CurVal == 0 || Addr == 0) \GlobalMapping already established!\, file=0x7fffed43c55b ExecutionEngine.cpp, line=165, function=0x7fffed43d7a0 void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*)) at assert.c:103 #4 0x7fffeca84aae in llvm::ExecutionEngine::addGlobalMapping(llvm::GlobalValue const*, void*) () from /usr/lib/libLLVM-3.2svn.so #5 0x7fffedc85ec7 in register_global_symbol (address=0x40ebf6, value=0x8b2500, name=...) at jit_codegen.cpp:242 #6 register_global_symbol (name=..., value=0x8b2500, address=0x40ebf6) at jit_codegen.cpp:240 #7 0x7fffedc8600e in get_global_function_real ( name=0x7fffedcb9e57 CLASS_free, func=0x40ebf6, ret=optimized out, args=optimized out, vararg=optimized out) at jit_codegen.cpp:276 #8 0x7fffedc8a9dc in operator() (this=synthetic pointer) at jit_codegen.cpp:991 ---Type return to continue, or q return to quit--- #9 gen_ifunref_object_no_nullcheck(llvm::Value*)::lambda() (func=..., cond=0x8999d0, if_name=optimized out, cont_name=optimized out) at jit_codegen.cpp:562 #10 unref_object_no_nullcheck (ptr=0x898ca8) at jit_codegen.cpp:993 #11 0x7fffedc9a44c in codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1566 #12 PushPureObjectVariableExpression::codegen_get_value (this=0x8abba0) at jit_codegen.cpp:1545 #13 0x7fffedca3f0d in SubrExpression::codegen_get_value (this=0x86a450) at jit_codegen.cpp:5898 #14 0x7fffedc8c21d in DropExpression::codegen (this=0x86a4a0) at jit_codegen.cpp:1257 #15 0x7fffedca6fa7 in codegen_statements () at jit_codegen.cpp:855 #16 JIT_codegen () at jit_codegen.cpp:6490 #17 0x7fffedcadc64 in JIT_compile_and_execute () at jit_compile.cpp:119 #18 0x0040a2fb in EXEC_jit_function_loop () at gbx_exec.c:871 #19 0x0040ab22 in EXEC_function_real () at gbx_exec.c:862 #20 0x0041e86d in raise_event (observer=optimized out, object=optimized out, func_id=optimized out, nparam=optimized out) at gbx_api.c:711 #21 0x0041efa6 in GB_Raise (object=0x8b95c8, event_id=16, nparam=0) at gbx_api.c:842 #22 0x75fce3d3 in gb_raise_button_Click (sender=optimized out) Jussi On 18 June 2012 22:08, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. Can you please provide more information? A gdb backtrace or something, because I get no errors at all. Everything seems to work for me ... /Emil 2012/6/18 Jussi Lahtinen jussi.lahti...@gmail.com OK, I found it. See attachment. Jussi On 17 June 2012 23:36, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, that is fixed, and I cannot see any problems with compare method anymore. But with my big project, I got this with signal 6; gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. I'm out of time, but as soon as I have time I try to isolate code causing the problem. Jussi On 17 June 2012 20:24, Emil Lenngren emil.lenng...@gmail.com wrote: It should be fixed in revision #4843! /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com Yes, it really works now. And I found a lot of errors by me. But for some reason JIT raises compare method when it shouldn't, and when I tried to isolate the problem I got crash (signal 11). This seems not to be related to compare method, so just ignore name of the attached project. I will look it more closely when this is fixed. Jussi On 17 June 2012 19:01, Emil Lenngren emil.lenng...@gmail.com wrote: Yes, it works now :) 2012/6/17 Benoît Minisini gam...@users.sourceforge.net Le 17/06/2012 02:54, Jussi Lahtinen a écrit : Yeah, terminal gives other
Re: [Gambas-user] Bug with JIT and external functions
Yes, it really works now. And I found a lot of errors by me. But for some reason JIT raises compare method when it shouldn't, and when I tried to isolate the problem I got crash (signal 11). This seems not to be related to compare method, so just ignore name of the attached project. I will look it more closely when this is fixed. Jussi On 17 June 2012 19:01, Emil Lenngren emil.lenng...@gmail.com wrote: Yes, it works now :) 2012/6/17 Benoît Minisini gam...@users.sourceforge.net Le 17/06/2012 02:54, Jussi Lahtinen a écrit : Yeah, terminal gives other position... With my actual project, I got error message; wanted string, got blaablaaClass instead. And that error message comes from function (from other module without Fast) which takes two objects are parameters. So either terminal isn't showing the real stack, or there is something else wrong... But my time is up, I'll see it tomorrow (with latest revision). Jussi The incorrect line number problem, as reported by the debugger (and not when you run the program normally!), should be fixed in revision #4841. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user JITCompareBug-0.0.1.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
OK, that is fixed, and I cannot see any problems with compare method anymore. But with my big project, I got this with signal 6; gbx3: ExecutionEngine.cpp:165: void llvm::ExecutionEngine::addGlobalMapping(const llvm::GlobalValue*, void*): Assertion `(CurVal == 0 || Addr == 0) GlobalMapping already established!' failed. I'm out of time, but as soon as I have time I try to isolate code causing the problem. Jussi On 17 June 2012 20:24, Emil Lenngren emil.lenng...@gmail.com wrote: It should be fixed in revision #4843! /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com Yes, it really works now. And I found a lot of errors by me. But for some reason JIT raises compare method when it shouldn't, and when I tried to isolate the problem I got crash (signal 11). This seems not to be related to compare method, so just ignore name of the attached project. I will look it more closely when this is fixed. Jussi On 17 June 2012 19:01, Emil Lenngren emil.lenng...@gmail.com wrote: Yes, it works now :) 2012/6/17 Benoît Minisini gam...@users.sourceforge.net Le 17/06/2012 02:54, Jussi Lahtinen a écrit : Yeah, terminal gives other position... With my actual project, I got error message; wanted string, got blaablaaClass instead. And that error message comes from function (from other module without Fast) which takes two objects are parameters. So either terminal isn't showing the real stack, or there is something else wrong... But my time is up, I'll see it tomorrow (with latest revision). Jussi The incorrect line number problem, as reported by the debugger (and not when you run the program normally!), should be fixed in revision #4841. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
No, xdg-su is no longer part of xdg-utils. Do you know reason for this? I have not used the xdg-su script for privilege escalation, but a quick (and I mean quick!) look through it at it stands is not going to be a great success. Privilege escalation means exploitation, not use of intentionally implemented feature to gain higher privileges. http://en.wikipedia.org/wiki/Privilege_escalation The fact is, there isn't and one of the major reasons is the old ongoing su/sudo argument and how certain distros implement their own policies regarding this. (I don't intend on pursuing that argument further here) Is there some desktop distro without graphical sudo!? GKSU/GKSUDO Pro: Easy to use, can handle complex command strings*, easy to configure the authorisation gui to suit Con: There are some security issues, the major one to me is that it escalates the current user's privilege, not the current process. Not true if you use gksudo or gksu with -c. Even more of an issue is that the escalation actually remains in force for a period of time after the gksu command is finished. It is applied only if next commands are used also with sudo/etc. Also this time is fully configurable, and if you want you can force it to stop immediately with sudo -k. * a complex command string being something like 'cd /home/blah/blah;echo pwd; make install; echo Success!' I think you mean 'cd /home/blah/blah;echo pwd; make install echo Success!'. ;) Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Bug with JIT and external functions
See attachment. If you comment out Fast from mTest, all works perfectly. Gambas 3 rev 4837 @ Xubuntu 12.04 64bit Jussi GambasTester-0.9.28.tar.gz Description: GNU Zip compressed data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
From this (integer to integer): Dim iResult As Integer = mTest.DoTests() Type mismatch: wanted Standard type, got Class instead in FMain:9. Jussi On 17 June 2012 02:47, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. What error do you get? The extern part seems to work fine for me... /Emil 2012/6/16 Jussi Lahtinen jussi.lahti...@gmail.com See attachment. If you comment out Fast from mTest, all works perfectly. Gambas 3 rev 4837 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
Aaa... OK, sorry for the trouble. I assumed it is because of extern, because with my actual project I had similar error messages from modules where extern is used. Also the error message is pretty misleading as it points to the line I copypasted. I will investigate more... Jussi On 17 June 2012 03:23, Emil Lenngren emil.lenng...@gmail.com wrote: That has nothing to do with extern ;) The code you are trying to execute is Try oo = [TestClass1]. As that code is always illegal, the jit throws an error directly at compile time, before running the code. That should help people debugging code because if there is an error in an uncommon code path, that error might normally be hard to discover. If the jit compiler sees that error directly upon compile time, you can easier correct the bug. /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com From this (integer to integer): Dim iResult As Integer = mTest.DoTests() Type mismatch: wanted Standard type, got Class instead in FMain:9. Jussi On 17 June 2012 02:47, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. What error do you get? The extern part seems to work fine for me... /Emil 2012/6/16 Jussi Lahtinen jussi.lahti...@gmail.com See attachment. If you comment out Fast from mTest, all works perfectly. Gambas 3 rev 4837 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug with JIT and external functions
Yeah, terminal gives other position... With my actual project, I got error message; wanted string, got blaablaaClass instead. And that error message comes from function (from other module without Fast) which takes two objects are parameters. So either terminal isn't showing the real stack, or there is something else wrong... But my time is up, I'll see it tomorrow (with latest revision). Jussi On 17 June 2012 03:39, Emil Lenngren emil.lenng...@gmail.com wrote: The IDE is strange... If I run gbx3 from the terminal, a correct stack backtrace is shown. The IDE seems to miss a stack frame. I don't know why... /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com Aaa... OK, sorry for the trouble. I assumed it is because of extern, because with my actual project I had similar error messages from modules where extern is used. Also the error message is pretty misleading as it points to the line I copypasted. I will investigate more... Jussi On 17 June 2012 03:23, Emil Lenngren emil.lenng...@gmail.com wrote: That has nothing to do with extern ;) The code you are trying to execute is Try oo = [TestClass1]. As that code is always illegal, the jit throws an error directly at compile time, before running the code. That should help people debugging code because if there is an error in an uncommon code path, that error might normally be hard to discover. If the jit compiler sees that error directly upon compile time, you can easier correct the bug. /Emil 2012/6/17 Jussi Lahtinen jussi.lahti...@gmail.com From this (integer to integer): Dim iResult As Integer = mTest.DoTests() Type mismatch: wanted Standard type, got Class instead in FMain:9. Jussi On 17 June 2012 02:47, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. What error do you get? The extern part seems to work fine for me... /Emil 2012/6/16 Jussi Lahtinen jussi.lahti...@gmail.com See attachment. If you comment out Fast from mTest, all works perfectly. Gambas 3 rev 4837 @ Xubuntu 12.04 64bit Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security
Re: [Gambas-user] Access global variable from other .class
Weird that there isn't any standard about this, or is there..? I think every linux distribution should have link to it's graphical version of sudo/su, with uniform name like GUIsudo. Then you could always call it without knowing which environment is used. Jussi On 14 June 2012 07:58, Bruce bbr...@paddys-hill.net wrote: On Thu, 2012-06-14 at 04:28 +, sundar j wrote: I am trying to write a code for accepting user password in a input box/textbox when user click on button from main form. For user input i have created new form named sudo.form and codes are in sudo.class file. This sudo.class accepts user password through textbox (hidden) and store it in global variable named password. sudo form is shown when user click on button from main form. Now my problem is that how do i access/capture this global variable (password) from main program? For example, accessing module variable (from sudo.module) we do it like: Public Sub function() Dim accept as string . . accept = sudo.password Shell echo amp; accept amp; | sudo -S somecommand . . End Right now i do not have a code to post but will come back later. But the general idea which i am trying to do is explained above. Why not save yourself the bother and just use kdesu, kdesudo, gksu, gksudo or pkexec (whichever fits your distro). As in, for example: Shell gksu -c somecommand These all provide the privilege gui and probably much more security than redoing it yourself. hth Bruce -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
If I remember correctly, you can even save more work by using gb.desktop, Desktop.RunAsRoot() which builds on top of the portland xdg scripts. Before writing anything I should always check what gb.desktop contains... But there seems to be bugs. I tried 'Desktop.RunAsRoot(whoami)'. All I got is: xdg-su: no graphical method available for invoking 'whoami' as 'root' I have gksudo installed ( in /usr/bin/gksudo ) and working. So perhaps Gambas ships broken version of this script..? Also xdg-screensaver activate doesn't work (Desktop.ScreenSaver.Activate). Either the version of that script already installed to my system (xdg-su wasn't installed at all). Xubuntu 12.04 64 bit. Screensaver in use is XScreenSaver 5.15, and GKsu is version 2.0.2. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
OK, I'm stupid. Desktop.ScreenSaver.Activate() doesn't do anything because I have disabled screensaver, so the blank screen I see after 6 min idle, is actually monitor turning off. I will investigate what is wrong with xdg-su... Jussi On 15 June 2012 23:49, tobi tobiasboeg...@googlemail.com wrote: On Fri, 15 Jun 2012, Jussi Lahtinen wrote: If I remember correctly, you can even save more work by using gb.desktop, Desktop.RunAsRoot() which builds on top of the portland xdg scripts. Before writing anything I should always check what gb.desktop contains... But there seems to be bugs. I tried 'Desktop.RunAsRoot(whoami)'. All I got is: xdg-su: no graphical method available for invoking 'whoami' as 'root' I have gksudo installed ( in /usr/bin/gksudo ) and working. So perhaps Gambas ships broken version of this script..? Also xdg-screensaver activate doesn't work (Desktop.ScreenSaver.Activate). Either the version of that script already installed to my system (xdg-su wasn't installed at all). Xubuntu 12.04 64 bit. Screensaver in use is XScreenSaver 5.15, and GKsu is version 2.0.2. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, I was surprised, too, when I saw lately how gb.desktop grew since I last had a look at it. There seem to be a lot of people who want to run programs as root, it's always the same problem to solve... I don't know about the scripts, I personally didn't need them so far but they are distributed in the gb.desktop/src/gb.desktop/xdg-utils/ directory in the source tree. If there is a bug, you might be able to spot it yourself - at least xdg-su seems not really complicated, even to me who is not used to shell scripting to that extend. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
OK, got it. It's now fixed (actually xfce function was missing), tested and attached. Benoit, is this official part of xdg-utils..? Because I have that package installed, but not that script. Jussi On 16 June 2012 00:23, Jussi Lahtinen jussi.lahti...@gmail.com wrote: OK, I'm stupid. Desktop.ScreenSaver.Activate() doesn't do anything because I have disabled screensaver, so the blank screen I see after 6 min idle, is actually monitor turning off. I will investigate what is wrong with xdg-su... Jussi On 15 June 2012 23:49, tobi tobiasboeg...@googlemail.com wrote: On Fri, 15 Jun 2012, Jussi Lahtinen wrote: If I remember correctly, you can even save more work by using gb.desktop, Desktop.RunAsRoot() which builds on top of the portland xdg scripts. Before writing anything I should always check what gb.desktop contains... But there seems to be bugs. I tried 'Desktop.RunAsRoot(whoami)'. All I got is: xdg-su: no graphical method available for invoking 'whoami' as 'root' I have gksudo installed ( in /usr/bin/gksudo ) and working. So perhaps Gambas ships broken version of this script..? Also xdg-screensaver activate doesn't work (Desktop.ScreenSaver.Activate). Either the version of that script already installed to my system (xdg-su wasn't installed at all). Xubuntu 12.04 64 bit. Screensaver in use is XScreenSaver 5.15, and GKsu is version 2.0.2. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, I was surprised, too, when I saw lately how gb.desktop grew since I last had a look at it. There seem to be a lot of people who want to run programs as root, it's always the same problem to solve... I don't know about the scripts, I personally didn't need them so far but they are distributed in the gb.desktop/src/gb.desktop/xdg-utils/ directory in the source tree. If there is a bug, you might be able to spot it yourself - at least xdg-su seems not really complicated, even to me who is not used to shell scripting to that extend. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user xdg-su Description: Binary data -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user