Re: [Gambas-user] segfault with insanely large array of structures
On Mon, 12 Aug 2013, Kevin Fishburne wrote: > I know this code is horrible (it will be changed), but the following > declarations and procedure raise a signal 11 and populate some of > the array properties with non-zero values: > > ' Plan structures and array (server). > Public Struct PlanBlockStructure ' Structure containing individual > block data. > Created As Boolean ' If block PWO has already been created. > Skin As Short ' Block skin. > HeightCurrent As Single ' Current height in feet of block. > HeightTarget As Single ' Target height in feet of block. > Grading As Boolean ' If grading is required. > WorldX As Integer ' Hard coordinates of block once > construction has been initiated. > WorldY As Integer ' Hard coordinates of block once > construction has been initiated. > End Struct > Public Struct PlanStructure ' Structure containing individual plan data. > Block[300, 300] As Struct PlanBlockStructure > Stage As Byte ' Current build stage (0 = design, 1 = clear > and grade, 2 = wall construction, 3 = roofing construction, 4 = > flooring construction, 5 = finished/maintenance). > CurrentX As Short ' Current position in block array. > CurrentY As Short ' Current position in block array. > GradeTo As Single ' Elevation in feet to grade landscape to. > CenterX As Integer ' Build site center coordinate. > CenterY As Integer ' Build site center coordinate. > End Struct > Public Plan[2000] As Struct PlanStructure ' Architecutral plans. > > ' Plan maintenance (server). > Public LastTime As Single = Timer ' Time last architectural plan was > maintained. > > Public Sub Plan_Maintenance() > > ' Maintain architectural plans. > > ' General declarations. > Dim Index As Short' Plan to maintain. > Dim Elevation As Integer ' Elevation of current tile in inches. > Dim Excavation As Integer ' Number of inches to excavate to match > specified grade. > > ' Check if plans are due to be updated. > If Timer < (LastTime + 0.1) Then Return > LastTime = Timer > > ' Cycle through plans. > For Index = 0 To 1999 > > ' Check if plan stage requires maintenance. > If Plan[Index].Stage <> 0 Then > > ' Check plan stage. > Select Case Plan[Index].Stage > > ' Clear and grade. > Case 1 > ' Advance position in plan to next position requiring grading. > Do Until Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].Grading > ' Increment X position in grid. > Plan[Index].CurrentX += 1 > ' Check if X position needs wrapping. > If Plan[Index].CurrentX >= 300 Then > ' Wrap X position. > Plan[Index].CurrentX = 0 > ' Increment Y position in grid. > Plan[Index].CurrentY += 1 > ' Check if Y position needs wrapping. > If Plan[Index].CurrentY >= 300 Then > ' Advance to next stage. > Plan[Index].Stage += 1 > Endif > Endif > Loop > ' Clear snow and vegetation depths. > Tiles.Depth_Assign_Snow(Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldX, > Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldY, 0) > Tiles.Depth_Assign_Vegetation(Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldX, > Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldY, 0) > ' Calculate hard elevation. > Elevation = > Tiles.Depth_Get_Hard(Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldX, > Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldY) > ' Calculate excavation amount. > Excavation = Elevation - Plan[Index].GradeTo * 12 > ' Grade landscape. > Tiles.Excavate(Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldX, > Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldY, Excavation, True) > ' Mark block as graded. > Plan[Index].Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].Grading = False > > ' Wall construction. > Case 2 > > ' Roofing construction. > Case 3 > > ' Flooring construction. > Case 4 > > ' Finished/maintenance. > Case 5 > > > End Select > > Endif > > Next > > End > > ' END OF CODE > > I attached the above code for better readability. It's notable that > if the For...Next loop only addresses the first few indices of > Plan[] that it works, which leads me to believe the array of > structures is improperly allocated, probably due to its ridiculous > size. The fact that some of the array property values read as > non-zero before being assigned makes me think their pointers are > pointing to out-of-process RAM being used by something else > entirely. I suck at low-level pr
[Gambas-user] drag & drop in a tableview cell
[ENG] i made a quick test: http://sourceforge.net/projects/otva/files/2013-08-12_dragdrop_troubles/scheduler-0.0.6.tar.gz/download to check how to make drag&drop in a gridview/tableview cell. both have the .finditem method that returns the object item overed by mouse or a NULL value ... But nor tableview nor gridview have a .ITEM property and gambas ide raises an error strange things appening gambas version 3.4.2 on an ubuntu 12.04 machine [ITA] fatto un rapido test: http://sourceforge.net/projects/otva/files/2013-08-12_dragdrop_troubles/scheduler-0.0.6.tar.gz/download in pratica ne tableview ne gridview hanno FIGLI, benche' entrambe espongano il metodo .findchild lo stesso dovrebbe restituire NULL (se non e' stato trovato alcun figlio) oppure il puntatore as .ITEM ... ma ITEM non e' un metodo supportato da gridview o tableview . MH strana cosa ... -- Messagenet VOIP: 5338759 My blogs: http://altri-media.blogspot.com/ http://subbaqquerie.blogspot.com/ YouTube Channel: AllegFede VIMEO HD videos: http://www.vimeo.com/user1912745/videos -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Microsoft Access database
Hi, Is it possible to connect Microsoft access database with Gambas? If yea, please, an example. Best regards, Ivan -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Microsoft Access database
Not that I know of, but I have written a system to convert MSAccess databases to MySQL/postgresql/MSSQLServer. It's written in java and uses the jackcess library (http://jackcess.sourceforge.net/). I also wrote a server which makes calls to the jackcess library based on simple text commands, so in theory you could make a basic client in Gambas... Let's first see if anyone has already found a way to talk to access dbs directly in Gambas... Kind regards, Caveat On 12/08/13 13:39, Ivan Kern wrote: > > > Hi, > > > > > > Is it possible to connect Microsoft access database with Gambas? > > If yea, please, an example. > > > > Best regards, > > Ivan > > -- > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Microsoft Access database
I would think you should be able to use the ODBC component to connect ot MSAccess? Check this out: http://office.microsoft.com/en-us/access-help/administer-odbc-data-sources-HA010275550.aspx And this: http://gambasdoc.org/help/doc/odbc?en&v3 On Mon, Aug 12, 2013 at 5:26 AM, Caveat wrote: > Not that I know of, but I have written a system to convert MSAccess > databases to MySQL/postgresql/MSSQLServer. It's written in java and > uses the jackcess library (http://jackcess.sourceforge.net/). > > I also wrote a server which makes calls to the jackcess library based on > simple text commands, so in theory you could make a basic client in > Gambas... > > Let's first see if anyone has already found a way to talk to access dbs > directly in Gambas... > > Kind regards, > Caveat > > On 12/08/13 13:39, Ivan Kern wrote: > > > > > > Hi, > > > > > > > > > > > > Is it possible to connect Microsoft access database with Gambas? > > > > If yea, please, an example. > > > > > > > > Best regards, > > > > Ivan > > > > > -- > > Get 100% visibility into Java/.NET code with AppDynamics Lite! > > It's a free troubleshooting tool designed for production. > > Get down to code-level detail for bottlenecks, with <2% overhead. > > Download for free and get started troubleshooting in minutes. > > > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > > ___ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] segfault with insanely large array of structures
Can you make this crash code into runnable project? Jussi On Mon, Aug 12, 2013 at 7:35 AM, Kevin Fishburne < kevinfishbu...@eightvirtues.com> wrote: > I know this code is horrible (it will be changed), but the following > declarations and procedure raise a signal 11 and populate some of the array > properties with non-zero values: > > ' Plan structures and array (server). > Public Struct PlanBlockStructure ' Structure containing individual block > data. > Created As Boolean ' If block PWO has already been created. > Skin As Short ' Block skin. > HeightCurrent As Single ' Current height in feet of block. > HeightTarget As Single ' Target height in feet of block. > Grading As Boolean ' If grading is required. > WorldX As Integer ' Hard coordinates of block once construction > has been initiated. > WorldY As Integer ' Hard coordinates of block once construction > has been initiated. > End Struct > Public Struct PlanStructure ' Structure containing individual plan data. > Block[300, 300] As Struct PlanBlockStructure > Stage As Byte ' Current build stage (0 = design, 1 = clear and > grade, 2 = wall construction, 3 = roofing construction, 4 = flooring > construction, 5 = finished/maintenance). > CurrentX As Short ' Current position in block array. > CurrentY As Short ' Current position in block array. > GradeTo As Single ' Elevation in feet to grade landscape to. > CenterX As Integer ' Build site center coordinate. > CenterY As Integer ' Build site center coordinate. > End Struct > Public Plan[2000] As Struct PlanStructure ' Architecutral plans. > > ' Plan maintenance (server). > Public LastTime As Single = Timer ' Time last architectural plan was > maintained. > > Public Sub Plan_Maintenance() > > ' Maintain architectural plans. > > ' General declarations. > Dim Index As Short' Plan to maintain. > Dim Elevation As Integer ' Elevation of current tile in inches. > Dim Excavation As Integer ' Number of inches to excavate to match > specified grade. > > ' Check if plans are due to be updated. > If Timer < (LastTime + 0.1) Then Return > LastTime = Timer > > ' Cycle through plans. > For Index = 0 To 1999 > > ' Check if plan stage requires maintenance. > If Plan[Index].Stage <> 0 Then > > ' Check plan stage. > Select Case Plan[Index].Stage > > ' Clear and grade. > Case 1 > ' Advance position in plan to next position requiring grading. > Do Until Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].Grading > ' Increment X position in grid. > Plan[Index].CurrentX += 1 > ' Check if X position needs wrapping. > If Plan[Index].CurrentX >= 300 Then > ' Wrap X position. > Plan[Index].CurrentX = 0 > ' Increment Y position in grid. > Plan[Index].CurrentY += 1 > ' Check if Y position needs wrapping. > If Plan[Index].CurrentY >= 300 Then > ' Advance to next stage. > Plan[Index].Stage += 1 > Endif > Endif > Loop > ' Clear snow and vegetation depths. > Tiles.Depth_Assign_Snow(Plan[**Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].WorldX, Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].WorldY, 0) > Tiles.Depth_Assign_Vegetation(**Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].WorldX, Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].WorldY, 0) > ' Calculate hard elevation. > Elevation = Tiles.Depth_Get_Hard(Plan[** > Index].Block[Plan[Index].**CurrentX, Plan[Index].CurrentY].WorldX, > Plan[Index].Block[Plan[Index].**CurrentX, Plan[Index].CurrentY].WorldY) > ' Calculate excavation amount. > Excavation = Elevation - Plan[Index].GradeTo * 12 > ' Grade landscape. > Tiles.Excavate(Plan[Index].**Block[Plan[Index].CurrentX, > Plan[Index].CurrentY].WorldX, Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].WorldY, Excavation, True) > ' Mark block as graded. > Plan[Index].Block[Plan[Index].**CurrentX, > Plan[Index].CurrentY].Grading = False > > ' Wall construction. > Case 2 > > ' Roofing construction. > Case 3 > > ' Flooring construction. > Case 4 > > ' Finished/maintenance. > Case 5 > > > End Select > > Endif > > Next > > End > > ' END OF CODE > > I attached the above code for better readability. It's notable that if the > For...Next loop only addresses the first few indices of Plan[] that it > works, which leads me to believe the array of structures is improperly > allocated, probably due to its ridiculous size. The fact that some of the > array property values read as non-zero before being assigned makes me think > their poin
Re: [Gambas-user] pass parameters to another form invoke where?
Thanka Tobias and Fabien, theres what i think about two solutions: 1) The proposed from tobias are not beatifull but easy to understand and good hack .. From: Tobias Boege > In FAuth you can write: > > Public Sub MyShowModal(theParameter As ...) > ' Do something with theParameter > Me.ShowModal() > End > > Then you would do in FMain: > > hAuth = New FAuth > hAuth.MyShowModal(...) > > instead of using hAuth.ShowModal() directly. > > 2) But i prefer the proposed from Fabien, very elegant... Thanks From: Fabien Bodard > Well Tobi I think you need to complete the idea. > > > in fAuth : > > Private $iId as Integer > Public Value as Integer > Public sub Run(Id as integer) as boolean > dim hForm as new hAuth > $iId = Id > return not hForm.ShowModal() > > End > > Public sub _Load() > > 'Get UserInfo from $iId and then > txtUser.Text = resultuser > > End > > > Public sub btnValidate_Click() > > return > > end > > Public Sub bntCancel_Click() > > > return true > > endif > > 'in the main form > > > if not hAuth.Run(user.id) then print hAuth.Value > > > -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Microsoft Access database
ACCESS db is really just a file ,and not a 'server' like MySQL You need software to install on your linux box to tickle the file. There is something out there, I did use something on a box a while back. (sorry forgot what is was) -- Original Message --- From: Caveat To: gambas-user@lists.sourceforge.net Sent: Mon, 12 Aug 2013 14:26:54 +0200 Subject: Re: [Gambas-user] Microsoft Access database > Not that I know of, but I have written a system to convert MSAccess > databases to MySQL/postgresql/MSSQLServer. It's written in java and > uses the jackcess library (http://jackcess.sourceforge.net/). > > I also wrote a server which makes calls to the jackcess library based on > simple text commands, so in theory you could make a basic client in > Gambas... > > Let's first see if anyone has already found a way to talk to access dbs > directly in Gambas... > > Kind regards, > Caveat > > On 12/08/13 13:39, Ivan Kern wrote: > > > > > > Hi, > > > > > > > > > > > > Is it possible to connect Microsoft access database with Gambas? > > > > If yea, please, an example. > > > > > > > > Best regards, > > > > Ivan > > > > -- > > Get 100% visibility into Java/.NET code with AppDynamics Lite! > > It's a free troubleshooting tool designed for production. > > Get down to code-level detail for bottlenecks, with <2% overhead. > > Download for free and get started troubleshooting in minutes. > > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > > ___ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user --- End of Original Message --- -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Sending mails "solved"
Hi folks, just FYI, for you were so nice to try to get me up with the Gambas SMTP client: Finally, I picked up a discussion Benoit had had with someone else some time ago that it's tricky to really implement authorisation here. Then I remembered another discussion in some forum about a similar thing. So I searched again and found a script named "sendEmail" written in Perl which is easily doing the job. It hasn't been updated since 2009, but it's running out of the box, so I simply use a Shell command to let it send the mails the way I wanted. For Benoit this could be a template to complete his SMTP in Gambas. It's well commented, you can find it at http://caspian.dotconf.net/menu/Software/SendEmail/ Regards Rolf -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Sending mails "solved"
Le 12/08/2013 18:28, Rolf-Werner Eilert a écrit : > Hi folks, > > just FYI, for you were so nice to try to get me up with the Gambas SMTP > client: > > Finally, I picked up a discussion Benoit had had with someone else some > time ago that it's tricky to really implement authorisation here. Then I > remembered another discussion in some forum about a similar thing. So I > searched again and found a script named "sendEmail" written in Perl > which is easily doing the job. > > It hasn't been updated since 2009, but it's running out of the box, so I > simply use a Shell command to let it send the mails the way I wanted. > > For Benoit this could be a template to complete his SMTP in Gambas. It's > well commented, you can find it at > http://caspian.dotconf.net/menu/Software/SendEmail/ > > Regards > > Rolf > SmtpClient supports SSL and TLS authorisation. What was not working? -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Interest in a difficult bug?
Le 10/08/2013 18:57, Tobias Boege a écrit : > On Sat, 10 Aug 2013, Beno?t Minisini wrote: >> Le 10/08/2013 17:33, Beno?t Minisini a ?crit : >>> Le 10/08/2013 14:06, Tobias Boege a ?crit : Hi Benoit, in a project I can reliably reproduce the following message: ** Oops! Internal error! ** ** Cannot write signal #17 into signal pipe: Bad file descriptor ** Program aborting. Sorry! :-( ** Please send a bug report at gam...@users.sourceforge.net Tough, I didn't succeed in isolating the cause. The code deals with one Process object only but uses Exec and Shell quite often. The project also has to deal with some race conditions. I have meanwhile removed that Process object from the code and refactored that part in pure Gambas. My project works flawlessly now. Anyway, are you interested in fixing this issue? I mean, this looks like a bit of work to me (particularly because I have no minimal example for you) and I, for sure, did strange things in the code. Regards, Tobi >>> >>> Of course I'm interested. But I need more precise details, and some way >>> to reproduce it if possible. >>> >> >> Do you use tasks? Do you run processes inside tasks? >> > > No tasks involved. > > I've got a minimal project working! It's not that I wasn't minded giving you > the real project but it isn't just more complex but also needs other > software installed and set up which I didn't want to bother you with. > > Finally, there is a project attached. Its goal is to spawn a sleeping child > process which shall detach from the Gambas process. This way, the process > can run in the background and even survive the Gambas parent process. In > fact, Gambas doesn't even know that the process exists (because it detached > from the shell which was started by the Gambas program into a new session > and the shell died) so Gambas doesn't want to wait for the started child to > terminate. > > In the example, the called program is "sleep". Normally, this would be a > server or something which is intended to survive the starting program. > > The second goal of the program is, whenever the sleep program crashes, to > restart it. To this end, it creates an instance of a shell script. Let $PID > denote the PID of the sleep process: > > while test -d /proc/$PID; sleep 1; done > > This process will terminate as soon as the sleep process terminated. As we > can safely keep this shell script in a Process object (it is not meant to > survive the Gambas program), we can use its Kill event to detect the > detached sleep process' termination and start a new sleep accordingly. > > Enough of the theory. I found two reliable ways to crash the interpreter: > > 1) Segfault. > 1. Start the attached program; > 2. Open a terminal and run "pkill sleep" (or kill the sleep process some >other way). You should see the program reacting on the external crash; >it spawns a new sleep process and documents that with Debug output; > 3. Re-run "pkill sleep". You should see a Segfault. > > 2) Oops. > 1. Start the attached program; > 2. Hit enter in the console window to initiate a "controlled kill" by the >project itself; > 3. Repeat Step 2; > 4. Open a terminal and run "pkill sleep" to provoke an external kill; > 5. Repeat Step 2. The oops is about a Bad file descriptor when writing >signal #17 (SIGCHLD) to the signal pipe. > > Actually, the 2nd way doesn't seem too reliable as I *sometimes* get a > segfault with this method, too. These two things must be related somewhere. > > Hope this helps. > > Regards, > Tobi > No crash at all there. The line: Shell "setsid sleep 1" Wait never returns until the sleep is exausted or if I kill it manually. Then we enter the next loop which never terminate, as "pgrep sleep" now always return nothing. -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Interest in a difficult bug?
Le 12/08/2013 18:47, Benoît Minisini a écrit : > > No crash at all there. The line: > > Shell "setsid sleep 1" Wait > > never returns until the sleep is exausted or if I kill it manually. Then > we enter the next loop which never terminate, as "pgrep sleep" now > always return nothing. > OK, got it. I had to add a "&" at the end of the shell command. -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] segfault with insanely large array of structures
Le 12/08/2013 06:35, Kevin Fishburne a écrit : > I know this code is horrible (it will be changed), but the following > declarations and procedure raise a signal 11 and populate some of the > array properties with non-zero values: > > ' Plan structures and array (server). > Public Struct PlanBlockStructure ' Structure containing individual block > data. >Created As Boolean ' If block PWO has already been created. >Skin As Short ' Block skin. >HeightCurrent As Single ' Current height in feet of block. >HeightTarget As Single ' Target height in feet of block. >Grading As Boolean ' If grading is required. >WorldX As Integer ' Hard coordinates of block once construction > has been initiated. >WorldY As Integer ' Hard coordinates of block once construction > has been initiated. > End Struct > Public Struct PlanStructure ' Structure containing individual plan data. >Block[300, 300] As Struct PlanBlockStructure >Stage As Byte ' Current build stage (0 = design, 1 = clear and > grade, 2 = wall construction, 3 = roofing construction, 4 = flooring > construction, 5 = finished/maintenance). >CurrentX As Short ' Current position in block array. >CurrentY As Short ' Current position in block array. >GradeTo As Single ' Elevation in feet to grade landscape to. >CenterX As Integer ' Build site center coordinate. >CenterY As Integer ' Build site center coordinate. > End Struct > Public Plan[2000] As Struct PlanStructure ' Architecutral plans. > Without a little project that reproduces the crash or at least an indication of where it crashes exactly, I can't do anything. But I can tell you that if you use embedded arrays (the "xxx[xxx] As ..." declarations), everything is allocated inside the object structure. It should work (independently of the available RAM, as Linux memory allocation is always successful, it crashes only when you want to access it). But 3,3 Gb being greater than 2^31, maybe there is bug somewhere, or it is too big to allocate that in one shot even to the kernel. -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] ListView.Current.MoveFirst() upside down
Hi, attached is a simple project which uses ListView.Current.MoveFirst() to move the double-clicked item to the top of the ListView. However, MoveFirst() moves the item to the last position while MoveLast() moves to the first position. Am I misunderstanding how ListView thinks about first and last elements? Is the direction reversed? If so, why? Regards, Tobi listview-current-movefirst-0.0.1.tar.gz Description: Binary data -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Interest in a difficult bug?
Le 12/08/2013 18:48, Benoît Minisini a écrit : > Le 12/08/2013 18:47, Benoît Minisini a écrit : >> >> No crash at all there. The line: >> >> Shell "setsid sleep 1" Wait >> >> never returns until the sleep is exausted or if I kill it manually. Then >> we enter the next loop which never terminate, as "pgrep sleep" now >> always return nothing. >> > > OK, got it. I had to add a "&" at the end of the shell command. > The two bugs should be fixed by revision #5790. Regards, -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Microsoft Access database
Some ideas... Are you running MS Access on the same system under wine? Or on a remote machine? Do you need to actually connect to ms access or can you import the access database in to MySQL or Postgres? Access is actually a program. It's data-store is a file(s). Access also has a funny query language that looks almost like T-SQL but is not quite... It has been a long time since I did this, 2008-2009... But it was both possible then to both connect to and import data from an Access database. I am sure if you search and read you will find a solution. I recall the import used mbtools. But my code is now gone and I cannot recall all the details. Once you know how to accomplish the task at hand, you can use GAMBAS to program the process. Perhaps by calling mbtools or by directly accessing the access database. Also you might find the MSSQL linux server helpful. Never used it but it should allow serving an access data store over odbc. On Mon, Aug 12, 2013 at 8:20 AM, nando wrote: > ACCESS db is really just a file ,and not a 'server' like MySQL > You need software to install on your linux box to tickle the file. > There is something out there, I did use something on a box a while back. > (sorry forgot what is was) > > > -- Original Message --- > From: Caveat > To: gambas-user@lists.sourceforge.net > Sent: Mon, 12 Aug 2013 14:26:54 +0200 > Subject: Re: [Gambas-user] Microsoft Access database > > > Not that I know of, but I have written a system to convert MSAccess > > databases to MySQL/postgresql/MSSQLServer. It's written in java and > > uses the jackcess library (http://jackcess.sourceforge.net/). > > > > I also wrote a server which makes calls to the jackcess library based on > > simple text commands, so in theory you could make a basic client in > > Gambas... > > > > Let's first see if anyone has already found a way to talk to access dbs > > directly in Gambas... > > > > Kind regards, > > Caveat > > > > On 12/08/13 13:39, Ivan Kern wrote: > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > Is it possible to connect Microsoft access database with Gambas? > > > > > > If yea, please, an example. > > > > > > > > > > > > Best regards, > > > > > > Ivan > > > > > > > -- > > > Get 100% visibility into Java/.NET code with AppDynamics Lite! > > > It's a free troubleshooting tool designed for production. > > > Get down to code-level detail for bottlenecks, with <2% overhead. > > > Download for free and get started troubleshooting in minutes. > > > > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > > > ___ > > > Gambas-user mailing list > > > Gambas-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > -- > > Get 100% visibility into Java/.NET code with AppDynamics Lite! > > It's a free troubleshooting tool designed for production. > > Get down to code-level detail for bottlenecks, with <2% overhead. > > Download for free and get started troubleshooting in minutes. > > > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > > ___ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > --- End of Original Message --- > > > > -- > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to interpret the "circular references" message?
Le 06/08/2013 13:32, Tobias Boege a écrit : > Hi, > > I have got some circular references in my project which I want to get rid > of. Actually I haven't really got an idea of where the cause could lie so I > wonder if there is anything useful in the message from Gambas. > > My questions are: What does the order of the classes signify? What are these > numbers before each class? > > Regards, > Tobi > The order means nothing. The number is the number of objects allocated for each class. Regards, -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Starting a Process and forgetting about it
Le 07/08/2013 10:08, Tobias Boege a écrit : > Hi, > > in a project I need to start a server Process and watch its Kill event while > the program is running. The server shall, however, continue to run even > after my program exits. > > I'm kind of stuck here: If I create a Process, Gambas keeps watching it and > doesn't shutdown the program until the process dies. Can I somehow tell > Gambas to forget about that Process and just exit? > > I have used the Quit instruction until a minute ago (without any errors or > complaints) to get the program down ultimately but as I know this is a Bad > Idea: here's my mail. > > Now I'm working around this problem like that: I use the Shell instruction > to start a shell as the child process Gambas watches. I can safely kill the > shell which makes Gambas happy and reparents the server to init which is > also fine. I have either to document this workaround because IMHO it's quite > subtle or have an explicit way of having Gambas forget about a Process... > > Regards, > Tobi > I added the Process.Ignore() method in revision #5791 for that. Tell me if it works for you. Regards, -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Feature request: Use key- (and index-)accessor in a With clause
Le 11/08/2013 13:33, Tobias Boege a écrit : > Hi Benoit, > > what bothers me from time to time is that With is *so* handy but can't be > used to access Array or Collection elements like: > > With hCollection ' or hArray >Print ["key"] ' or Print [0] > End With > > I see that this would be a syntactical problem because ["key"] and [0] may > equivalently well be recognised as inline arrays. But we have another > option, right? There is still the ! operator which is unambiguous: > > With hCollection >Print !key > End With > > Should be no problem if implemented. What do you think? And while we are at > it, couldn't the ! operator at the same time get the capability to support > integers, so that the above will also work with an array: > > With hArray >Print !0 > End With > > Regards, > Tobi > The '!' can't be used, because a!b is just syntactic sugar for a["b"]. Maybe a syntax like .[x] = y could be used, as at the moment .[x] is a syntax error... I will think about it. -- Benoît Minisini -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 440 in gambas: Faulty error message from valid code
Updates: Status: Fixed Labels: -Version Version-TRUNK Comment #2 on issue 440 by benoit.m...@gmail.com: Faulty error message from valid code http://code.google.com/p/gambas/issues/detail?id=440 That bug seems to be fixed, but I don't remember in which revision. Can you confirm ? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 458 in gambas: Repeated CRITICAL messages
Updates: Status: NeedsInfo Labels: -Version Version-TRUNK Comment #1 on issue 458 by benoit.m...@gmail.com: Repeated CRITICAL messages http://code.google.com/p/gambas/issues/detail?id=458 I can't reproduce the messages with Unity with the latest revision. Can you tell me if the problem is fixed for you? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 459 in gambas: Gambas 3.4.2 IDE not working recompile all when downgrading
Updates: Status: NeedsInfo Labels: -Version Version-TRUNK Comment #1 on issue 459 by benoit.m...@gmail.com: Gambas 3.4.2 IDE not working recompile all when downgrading http://code.google.com/p/gambas/issues/detail?id=459 "compile all" forces the recompilation of everything, as you did in the command line. Please send me a project where "compile all" does not fix the problem so that I can take a look. Thanks! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 460 in gambas: Desktop.Sendkeys("{[Control_L]A}") does not work
Updates: Status: NeedsInfo Labels: -Version Version-TRUNK Comment #1 on issue 460 by benoit.m...@gmail.com: Desktop.Sendkeys("{[Control_L]A}") does not work http://code.google.com/p/gambas/issues/detail?id=460 Please send your project so that I can debug. Anyway, if you want to manipulate the HTML page contents, you should use the WebView properties and the DOM instead of using Desktop.SendKeys(), which is not reliable. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 460 in gambas: Desktop.Sendkeys("{[Control_L]A}") does not work
Updates: Status: WontFix Comment #2 on issue 460 by benoit.m...@gmail.com: Desktop.Sendkeys("{[Control_L]A}") does not work http://code.google.com/p/gambas/issues/detail?id=460 OK : please write Desktop.SendKeys("{[Control_L]a}"), because having an "A" needs the SHIFT key (which leads to Control+Shift+A). Anyway, The WebView has no CTRL+A shortcut to select all, so you will have to do the good way: learn how to use the WebView properties and methods. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Sending mails "solved"
Am 12.08.2013 18:35, schrieb Benoît Minisini: > Le 12/08/2013 18:28, Rolf-Werner Eilert a écrit : >> Hi folks, >> >> just FYI, for you were so nice to try to get me up with the Gambas SMTP >> client: >> >> Finally, I picked up a discussion Benoit had had with someone else some >> time ago that it's tricky to really implement authorisation here. Then I >> remembered another discussion in some forum about a similar thing. So I >> searched again and found a script named "sendEmail" written in Perl >> which is easily doing the job. >> >> It hasn't been updated since 2009, but it's running out of the box, so I >> simply use a Shell command to let it send the mails the way I wanted. >> >> For Benoit this could be a template to complete his SMTP in Gambas. It's >> well commented, you can find it at >> http://caspian.dotconf.net/menu/Software/SendEmail/ >> >> Regards >> >> Rolf >> > > SmtpClient supports SSL and TLS authorisation. What was not working? > Well... it simply didn't send the mails, or more specific: the mails never arrived anywhere, and I couldn't make out any error messages anywhere. The only message I got was the ending "-> quit". During my holidays, it might have been caused by a bad internet connection, but it wouldn't run here either. Maybe you remember, you told me to look in the "standard errors", but I didn't find anything at /var/log... Then this weekend I found a discussion from last year or so you had had with someone on the SMTP topic, and it turned out you could not find a way to complete programming. In the documentation it says "not everything is supported yet". So I looked for another way of implementing it. Here is my test project which was intended to be included into the bigger main project once it had been running. My personal data have been changed: Public Sub Main() Dim t$ As String Dim email As New SmtpClient t$ = File.Load(Application.Path &/ "test.pdf") With email .Add("This is the mail text") .Add(t$, mime.Binary, "test.pdf") .To.Add("eilert-sprac...@t-online.de") .From = "myn...@web.de" .Subject = "Ein Test" .Encrypt = Net.SSL .Port = 587 .Host = "smtp.web.de" .User = "username" .Password = "password" .Debug = True End With Try email.Send If Error Then Print Error.Text Print Error.Where Endif End I tried this with my yahoo account and t-online account (= German Telecom), sending mails forth and back, but to no avail. When I tried sendEmail giving it the same data, the mail was sent at once. Rolf -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user