Re: [Gambas-user] I think I might have a corrupt project
Tobi, The project was created by user marty not root. The permissions on the project directory and the backup directory are the same. Owner = marty read and write, group = marty read and write and other read only. I've copied all of the files into the new database using sources - new - form - existing .. I'm still getting unknown symbol errors. Newest is filechooser1 is unknown. Is there a component missing? I got the backup to run by using the save as suggested by Charlie. I know the last form I was working on before the problems occurred. Should I delete this form in the original project and import the one in the working backup? I'm thinking that the problems are related to this form. I think I'll copy or archive the working BU to some other location on the drive before I do anything further. What do you think? Thanks, Marty -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
On Wed, 12 Nov 2014, Martin McGlensey wrote: Tobi, The project was created by user marty not root. The permissions on the project directory and the backup directory are the same. Owner = marty read and write, group = marty read and write and other read only. I've copied all of the files into the new database using sources - new - form - existing .. I'm still getting unknown symbol errors. Newest is filechooser1 is unknown. Is there a component missing? I got the backup to run by using the save as suggested by Charlie. I know the last form I was working on before the problems occurred. Should I delete this form in the original project and import the one in the working backup? I'm thinking that the problems are related to this form. I think I'll copy or archive the working BU to some other location on the drive before I do anything further. What do you think? More backups are always good. Apart from that I'm out of ideas, sorry. -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
Am Mittwoch, den 12.11.2014, 14:48 +0100 schrieb Tobias Boege: On Wed, 12 Nov 2014, Martin McGlensey wrote: Tobi, The project was created by user marty not root. The permissions on the project directory and the backup directory are the same. Owner = marty read and write, group = marty read and write and other read only. I've copied all of the files into the new database using sources - new - form - existing .. I'm still getting unknown symbol errors. Newest is filechooser1 is unknown. Is there a component missing? I got the backup to run by using the save as suggested by Charlie. I know the last form I was working on before the problems occurred. Should I delete this form in the original project and import the one in the working backup? I'm thinking that the problems are related to this form. I think I'll copy or archive the working BU to some other location on the drive before I do anything further. What do you think? More backups are always good. Apart from that I'm out of ideas, sorry. Salut Martin, did you give /Tools/Update all forms a chance? If *.form files corrupted they throw some times strange errors. They appear mostly in top of the project explorer. I would only work with the newly per Save as created project . And I would take a diff-tool (Meld p.ex.) and look for the diff of the meant corrupted .form and .class. or the whole project. To find out what was happened (but not to long, dont waste time). And then wipe the old corrupted project from your disk, or pack it with 'corrupted' in the name, and then wipe the corrupted project from your disk . -- Amicalement Charlie -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] I think I might have a corrupt project
Hello, Have a large Gambas database app that I have been developing over the past year. It had been working well up until last night. I was adding a new form and debugging an older one. Now I'm getting strange error messages. For example - Message.Info(You are in bad trouble now!) gets unable to load image error. Originally this project was developed under Gambas 3.5.X now using 3.6.1 on Ununtu 12.04. Worse than that this code, that had been ok before, returns Type mismatch: Wanted Boolean got Function on the line Neighborhood.Connection = modMain.$Con. The Query above the error works as it should. The connection appears OK since the query works. It's only the DataSource Neighborhood that errors out. This error occurs on all forms that have a DataSource object regardless of its name or datatable. If I create a new project with the same code, one form and datasource, and message.Info() it works. The problem has to be in the project. Is there any way too fix this? This is a large project with a database that is large and confidential. So I can't send it. My backup runs OK but it is a read only I cannot edit it. Can I change this attribute? ModMain opens the connection to the MySQL database HOA_Data: Code in modMain Public Procedure Connect() $Con.Close() ' Close the connection $Con.Type = mysql ' Type of connection $Con.Host = localhost ' Name of the server $Con.Login = User ' User's name for the connection $Con.Port = 3306' Port to use in the connection, usually 3306 $Con.Name = HOA_Data' Name of the database we want to use $Con.Password = ' User's password Try $Con.Open()' Open the connection Catch If Error Then Print Message.Info(Connection Failed) End -- This code is common to all forms: Code in form_Open() Dim $Query As String Dim strTest As String $Query = SELECT tblneighborhood.* FROM tblneighborhood; modMain.$Result = modMain.$Con.Exec($Query) modMain.$Result.MoveFirst strTest = modMain.$Result!Last_Name Neighborhood.Connection = modMain.$Con Neighborhood.Table = tblneighborhood Neighborhood.Sort = Last_Name Neighborhood.MoveFirst Thanks, Marty -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
On Tue, 11 Nov 2014, Martin McGlensey wrote: Hello, Have a large Gambas database app that I have been developing over the past year. It had been working well up until last night. I was adding a new form and debugging an older one. Now I'm getting strange error messages. For example - Message.Info(You are in bad trouble now!) gets unable to load image error. Originally this project was developed under Gambas 3.5.X now using 3.6.1 on Ununtu 12.04. Did you do any update after you last checked that the project worked and before it didn't work? Unable to load image from the Message class is a possible runtime error and does not necessarily indicate any corruption in your project. The Message class tries to load the icon corresponding to the type of message you display (in your case the info icon). An error loading it is not caught so the interpreter will throw an error. The absence of this file indicates either a problem in your installation or a corrupted gb.form.stock component binary (or wherever the Picture class gets its pictures from). From this error, I'd say the reason for the failure is more likely to be found in the last update or maybe in how reliable your hard drive is...? Worse than that this code, that had been ok before, returns Type mismatch: Wanted Boolean got Function on the line Neighborhood.Connection = modMain.$Con. The Query above the error works as it should. The connection appears OK since the query works. It's only the DataSource Neighborhood that errors out. This error occurs on all forms that have a DataSource object regardless of its name or datatable. If I create a new project with the same code, one form and datasource, and message.Info() it works. The problem has to be in the project. This is also not a too exotic error. It indicates that something is used incorrectly, in a syntax way. These things are sometimes hard to spot because in Gambas functions are also used to implement properties which are syntactically two very different things. But if you say, you didn't change the project since it last worked, that's indeed weird. I honestly don't think your project is corrupted because these two points don't really fit into my experience with actually corrupted projects. They're not wild enough. In any case, be sure to recompile the entire project by doing $ cd /your/project/directory $ rm -r .gambas $ gbc3 -ga then try running it again. I don't think it can fix the first point but it _could_ fix the second one. Regards, Tobi -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
Tobi, Did as you suggested. $ cd /your/project/directory $ rm -r .gambas $ gbc3 -ga Had to be root to rm the .gambas directory. Recompiled usin gbc3 -ga. Files in .gambas directory now show date of 11/11. Errors still present. No change. If it's syntax. How can I find the offending code? Marty -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
On Tue, 11 Nov 2014, Martin McGlensey wrote: Tobi, Did as you suggested. $ cd /your/project/directory $ rm -r .gambas $ gbc3 -ga Had to be root to rm the .gambas directory. Recompiled usin gbc3 -ga. Files in .gambas directory now show date of 11/11. OK, unless you develop your project as root (which I would not recommend) or have messed with your project directory as root (also not recommended), your .gambas directory should NOT be owned by root and you should be able to delete it without elevated privileges. So maybe you were correct and your project is corrupted. But not the Gambas project metadata (which is what I was referring to when I said corrupted) but the filesystem metadata. Errors still present. No change. If it's syntax. How can I find the offending code? I can't tell. These wanted X got function instead errors are very subtle but the runtime error should point you right into a code path where the error is. But let's focus on the prior symptom first: What about you create a new project (as your regular user!) and copy the contents of the files of your existing project into that new project? Maybe don't copy the files but really copy and paste the _contents_. It may take you some time and it surely is an idiot solution but I'm curious if it helps. If it doesn't, there is an error in your code or your installation. Regards, Tobi -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
Am Dienstag, den 11.11.2014, 21:30 +0100 schrieb Tobias Boege: On Tue, 11 Nov 2014, Martin McGlensey wrote: Tobi, Did as you suggested. $ cd /your/project/directory $ rm -r .gambas $ gbc3 -ga Had to be root to rm the .gambas directory. Recompiled usin gbc3 -ga. Files in .gambas directory now show date of 11/11. OK, unless you develop your project as root (which I would not recommend) or have messed with your project directory as root (also not recommended), your .gambas directory should NOT be owned by root and you should be able to delete it without elevated privileges. So maybe you were correct and your project is corrupted. But not the Gambas project metadata (which is what I was referring to when I said corrupted) but the filesystem metadata. Errors still present. No change. If it's syntax. How can I find the offending code? I can't tell. These wanted X got function instead errors are very subtle but the runtime error should point you right into a code path where the error is. But let's focus on the prior symptom first: What about you create a new project (as your regular user!) and copy the contents of the files of your existing project into that new project? Maybe don't copy the files but really copy and paste the _contents_. It may take you some time and it surely is an idiot solution but I'm curious if it helps. If it doesn't, there is an error in your code or your installation. Regards, Tobi Salut, what's about Save as.., or an Source-Archive (Ctrl + Alt + A), yes I saw that, corrupted disk space, making project troubles. And Marty talked also about an read-only backup, a chown should help there. -- Amicalement Charlie -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] I think I might have a corrupt project
Tobi, Some more information. I created a new project then imported the minimal files need to test it from the original project. They are the Main Men (startup class), form1, form2 and the module containing the connection. Commented out all references to forms not loaded. Now the connection and message errors are gone. Form1 and form2 will load and show data as they should. There is a new error however. It comes with the line Me.DataCombo1.Table = tbllocation. The error message is Unknown symbol 'DataCombo1' in container. The DataCombo box is in the datasource container with the other datacontrols. If I comment out the code for the DataCombo box the form loads properly. Tried adding a regular combobox outside the datasource and tried programming it. This generated the error as the datacombo box. The three forms loaded in the new project are not the ones I was working on prior to the problem. What should I do now? Regards Marty -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] I think I might have a corrupt project
On Tue, 11 Nov 2014, Martin McGlensey wrote: Tobi, Some more information. I created a new project then imported the minimal files need to test it from the original project. They are the Main Men (startup class), form1, form2 and the module containing the connection. Commented out all references to forms not loaded. Now the connection and message errors are gone. Form1 and form2 will load and show data as they should. There is a new error however. It comes with the line Me.DataCombo1.Table = tbllocation. The error message is Unknown symbol 'DataCombo1' in container. The DataCombo box is in the datasource container with the other datacontrols. If I comment out the code for the DataCombo box the form loads properly. Tried adding a regular combobox outside the datasource and tried programming it. This generated the error as the datacombo box. The three forms loaded in the new project are not the ones I was working on prior to the problem. What should I do now? If files are missing, you will get errors about missing (a.k.a. unknown) things. So complete the import before you try it out -- and try not to mess around with the code (like commenting things out or changing controls) as we're still not sure there isn't just an error in the code :-) Also, you can try Charlie's suggestion to copy your project backup to some temporary location and go through it with $ chown youruser:yourgroup -R /your/project/backup/copy where youruser is your username (id -un), yourgroup is the group of your user (id -gn). This method may give success faster. Don't work on your backup, but a copy of it. -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user