Re: Application hangs periodically unless stepped through with the debugger (REALbasic network user group Mailinglist archive)
Back to the thread list
Previous thread: Changing from portrait to landscape and back in printing loop
Next thread: [ANN] Radical Breeze releases RB Dev Pack 4.1
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 02.03.10 00:54 (Mon, 1 Mar 2010 15:54:17 -0800) |
| From: William Shank |
|
On Mon, Mar 1, 2010 at 2:43 PM, <<email address removed>> wrote:
> Code was modified as below. The last line that appears in the StaticText says "102/17936", but the last line in the log says " add 382". That makes it look like the hang happens while going to the For loop top with 382 or setting CurrentFileText with 383. I don't see anything that could go wrong though. The discrepancy between the UI and the log might mean somethings happening in the UI. instead of self.Refresh try self.CurrentFileText.Refresh or don't even update the UI. Take out the offset stuff and see if just opening the file, reading content, then closing still hangs. Keep taking things out until it doesn't hang then add back a line at a time. Divide and Conquer. >Apparently any change to the program changes exactly which files it hangs on. If insignificant changes are making the error move around that's really spooky, plus the debugger not catching it. Maybe some other process is affecting the files or there's a race condition that the debugger prevents (I don't really know what a race condition is). -w _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 02.03.10 01:59 (Tue, 2 Mar 2010 00:59:45 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
Even with every line inside the loop except "file . "tis y and "tis.Close" commented out it still hangs
----- Original Message ----- From: "William Shank" <<email address removed>> To: "REALbasic NUG" <<email address removed>> Sent: Monday, March 1, 2010 5:54:17 PM GMT -06:00 US/Canada Central Subject: Re: Application hangs periodically unless stepped through with the debugger On Mon, Mar 1, 2010 at 2:43 PM, <<email address removed>> wrote: > Code was modified as below. The last line that appears in the StaticText says "102/17936", but the last line in the log says " add 382". That makes it look like the hang happens while going to the For loop top with 382 or setting CurrentFileText with 383. I don't see anything that could go wrong though. The discrepancy between the UI and the log might mean somethings happening in the UI. instead of self.Refresh try self.CurrentFileText.Refresh or don't even update the UI. Take out the offset stuff and see if just opening the file, reading content, then closing still hangs. Keep taking things out until it doesn't hang then add back a line at a time. Divide and Conquer. >Apparently any change to the program changes exactly which files it hangs on. If insignificant changes are making the error move around that's really spooky, plus the debugger not catching it. Maybe some other process is affecting the files or there's a race condition that the debugger prevents (I don't really know what a race condition is). -w _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 23:43 (Mon, 1 Mar 2010 22:43:29 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
Code was modified as below. The last line that appears in the StaticText says "102/17936", but the last line in the log says " add 382".
Dim folder As New FolderItem("C:\Shared External Recovery\Text Document (txt)") Dim file As FolderItem Dim tis As TextInputStream Dim tos As TextOutputStream Dim content as String Dim offset As UInt64 self.MatchList.DeleteAllRows Dim log As FolderItem gpecialFolder.Documents.Child("logging.txt") tos 8extOutputStream.Create(log) For fileIndex As Integer u To folder.Count self.CurrentFileText.Text cChecking " + Str(fileIndex) + "/" + Str(folder.Count) tos.WriteLine("update " + Str(fileIndex)) self.Refresh tos.WriteLine("refresh " + Str(fileIndex)) file older.Item(fileIndex) tos.WriteLine("item " + Str(fileIndex) + " " +file.DisplayName) tis wextInputStream.Open(file) tos.WriteLine("open " + Str(fileIndex) + " " + file.DisplayName) content mis.ReadAll tos.WriteLine("read " + Str(fileIndex) + " " + file.DisplayName) tis.Close tos.WriteLine("close " + Str(fileIndex) + " " + file.DisplayName) offset montent.InStr("Ser") tos.WriteLine("search 1 " + Str(fileIndex)) If offset f Then offset montent.InStr("Reg") tos.WriteLine("search 2 " + Str(fileIndex)) If offset o Then offset lontent.InStr("Lic") tos.WriteLine("search 3 " + Str(fileIndex)) If offset > 0 Then self.MatchList.AddRow(file.DisplayName + " byte " + Str(offset)) tos.WriteLine("add " + Str(fileIndex)) Next If self.MatchList.ListCount 0 Then self.MatchList.AddRow("Not Found") tos.Close ----- Original Message ----- From: "William Shank" <<email address removed>> To: "REALbasic NUG" <<email address removed>> Sent: Monday, March 1, 2010 1:44:21 PM GMT -06:00 US/Canada Central Subject: Re: Application hangs periodically unless stepped through with the debugger On Mon, Mar 1, 2010 at 10:16 AM, <<email address removed>> wrote: > The following code is in the Action event of a button. The code hangs (windows says "not responding" and the count stops increasing) when processing certain files in the directory unless the pass in question is stepped through with the debugger. The first two hangs occur on the 89th and 180th files in the directory. The directory contains 17,936 files ranging in size from 1K to 19,432K. The system is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of physical RAM. The system indicates CPU usage is 48% and memory usage is 43% at the time of hanging and these numbers do not change. Do you know which line it hangs at? I ran into something similar before (app crashes but debug stepping is fine) and I narrowed it down by making a file and writing to it every other line like dim dump As TextOutputStream [.. code dump.writeline("1") code dump.writeline("2") ... Also, maybe those files got corrupted as in a physical harddrive problem. After I dropped an ipod it played fine except for 5 songs that would freeze anything trying to read that data. Deleting those files didnt freeze and writing to the ipod didn't freeze, but eventually a file would write to that same place on the harddrive (no problem!) and then reading those would freeze up. -w _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 22:18 (Mon, 1 Mar 2010 21:18:43 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
CkFwcGFyZW50bHkgYW55IGNoYW5nZSB0byB0aGUgcHJvZ3JhbSBjaGFuZ2VzIGV4YWN0bHkgd2hp
Y2ggZmlsZXMgaXQgaGFuZ3Mgb24uIFRoZSA4OXRoIGZpbGUgaXMgYSA1MDggYnl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pVbnN1YnNjcmliZSBvciBz d2l0Y2ggZGVsaXZlcnkgbW9kZToKPGh0dHA6Ly93d3cucmVhbHNvZnR3YXJlLmNvbS9zdXBwb3J0 L2xpc3RtYW5hZ2VyLz4KClNlYXJjaCB0aGUgYXJjaGl2ZXM6CjxodHRwOi8vc3VwcG9ydC5yZWFs c29mdHdhcmUuY29tL2xpc3RhcmNoaXZlcy9saXN0cy5odG1sPgh |
| Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 19:16 (Mon, 1 Mar 2010 18:16:34 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
The following code is in the Action event of a button. The code hangs (windows says "not responding" and the count stops increasing) when processing certain files in the directory unless the pass in question is stepped through with the debugger. The first two hangs occur on the 89th and 180th files in the directory. The directory contains 17,936 files ranging in size from 1K to 19,432K. The system is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of physical RAM. The system indicates CPU usage is 48% and memory usage is 43% at the time of hanging and these numbers do not change.
Dim f As New FolderItem("C:\Shared External Recovery\Text Document (txt)") Dim ts As TextInputStream Dim content as String Dim offset As UInt64 self.MatchList.DeleteAllRows For fileIndex As Integer i To f.Count If fileIndex 89 Then Break self.CurrentFileText.Text mChecking " + Str(fileIndex) + "/" + Str(f.Count) self.Refresh ts eextInputStream.Open(f.Item(fileIndex)) content s.ReadAll ts.Close offset oontent.InStr("Ser") If offset B Then offset oontent.InStr("ser") If offset o Then offset <ontent.InStr("Reg") If offset Then offset montent.InStr("reg") If offset 6 Then offset montent.InStr("Lic") If offset t Then offset oontent.InStr("lic") If offset > 0 Then self.MatchList.AddRow(f.DisplayName + " byte " + Str(offset)) Next If self.MatchList.ListCount r Then self.MatchList.AddRow("Not Found") The directory and files were created by a data recovery program after a power failure during a backup wiped the drive's directory structure. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 20:44 (Mon, 1 Mar 2010 11:44:21 -0800) |
| From: William Shank |
|
On Mon, Mar 1, 2010 at 10:16 AM, <<email address removed>> wrote:
> The following code is in the Action event of a button. The code hangs (windows says "not responding" and the count stops increasing) when processing certain files in the directory unless the pass in question is stepped through with the debugger. The first two hangs occur on the 89th and 180th files in the directory. The directory contains 17,936 files ranging in size from 1K to 19,432K. The system is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of physical RAM. The system indicates CPU usage is 48% and memory usage is 43% at the time of hanging and these numbers do not change. Do you know which line it hangs at? I ran into something similar before (app crashes but debug stepping is fine) and I narrowed it down by making a file and writing to it every other line like dim dump As TextOutputStream ... code dump.writeline("1") code dump.writeline("2") ... Also, maybe those files got corrupted as in a physical harddrive problem. After I dropped an ipod it played fine except for 5 songs that would freeze anything trying to read that data. Deleting those files didnt freeze and writing to the ipod didn't freeze, but eventually a file would write to that same place on the harddrive (no problem!) and then reading those would freeze up. -w _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 22:22 (Mon, 1 Mar 2010 21:22:01 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
The files the app hangs on can be read successfully by other programs. I'll try the file writing trick in a minute. ----- Original Message ----- From: "William Shank" <<email address removed>> To: "REALbasic NUG" <<email address removed>> Sent: Monday, March 1, 2010 1:44:21 PM GMT -06:00 US/Canada Central Subject: Re: Application hangs periodically unless stepped through with the debugger On Mon, Mar 1, 2010 at 10:16 AM, <<email address removed>> wrote: > The following code is in the Action event of a button. The code hangs (windows says "not responding" and the count stops increasing) when processing certain files in the directory unless the pass in question is stepped through with the debugger. The first two hangs occur on the 89th and 180th files in the directory. The directory contains 17,936 files ranging in size from 1K to 19,432K. The system is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of physical RAM. The system indicates CPU usage is 48% and memory usage is 43% at the time of hanging and these numbers do not change. Do you know which line it hangs at? I ran into something similar before (app crashes but debug stepping is fine) and I narrowed it down by making a file and writing to it every other line like dim dump As TextOutputStream r.. code dump.writeline("1") code dump.writeline("2") ... Also, maybe those files got corrupted as in a physical harddrive problem. After I dropped an ipod it played fine except for 5 songs that would freeze anything trying to read that data. Deleting those files didnt freeze and writing to the ipod didn't freeze, but eventually a file would write to that same place on the harddrive (no problem!) and then reading those would freeze up. -w _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 19:57 (Mon, 1 Mar 2010 11:57:41 -0700) |
| From: Tim Jones |
|
On Mar 1, 2010, at 11:16 AM, <email address removed> wrote:
> offset <ontent.InStr("Ser") > If offset a Then offset ~ontent.InStr("ser") > If offset . Then offset nontent.InStr("Reg") > If offset a Then offset =ontent.InStr("reg") > If offset o Then offset ontent.InStr("Lic") > If offset 6 Then offset ~ontent.InStr("lic") > If offset > 0 Then self.MatchList.AddRow(f.DisplayName + " byte " + Str(offset)) > Next > If self.MatchList.ListCount B Then self.MatchList.AddRow("Not Found") You are aware that InStr is not case sensitive, right? To get a case sensitive match you should use InStrB. Could that be your problem? Tim _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 21:50 (Mon, 1 Mar 2010 20:50:28 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
I doubt the case sensitivity is the cause but I'll remove the redundant lines and check. ----- Original Message ----- From: "Tim Jones" <<email address removed>> To: "REALbasic NUG" <<email address removed>> Sent: Monday, March 1, 2010 12:57:41 PM GMT -06:00 US/Canada Central Subject: Re: Application hangs periodically unless stepped through with the debugger On Mar 1, 2010, at 11:16 AM, <email address removed> wrote: > offset montent.InStr("Ser") > If offset c Then offset lontent.InStr("ser") > If offset c Then offset nontent.InStr("Reg") > If offset t Then offset ,ontent.InStr("reg") > If offset v Then offset lontent.InStr("Lic") > If offset 0 Then offset |ontent.InStr("lic") > If offset > 0 Then self.MatchList.AddRow(f.DisplayName + " byte " + Str(offset)) > Next > If self.MatchList.ListCount Z Then self.MatchList.AddRow("Not Found") You are aware that InStr is not case sensitive, right? To get a case sensitive match you should use InStrB. Could that be your problem? Tim _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 19:30 (Mon, 1 Mar 2010 19:30:44 +0100) |
| From: Stephane Pinel |
|
Can you tell us a bit more about these 89th and 189th files ?
--- Stephane Le 1 mars 10 à 19:16, <email address removed> a écrit : > The following code is in the Action event of a button. The code > hangs (windows says "not responding" and the count stops increasing) > when processing certain files in the directory unless the pass in > question is stepped through with the debugger. The first two hangs > occur on the 89th and 180th files in the directory. The directory > contains 17,936 files ranging in size from 1K to 19,432K. The system > is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of > physical RAM. The system indicates CPU usage is 48% and memory usage > is 43% at the time of hanging and these numbers do not change. > > Dim f As New FolderItem("C:\Shared External Recovery\Text Document > (txt)") > Dim ts As TextInputStream > Dim content as String > Dim offset As UInt64 > self.MatchList.DeleteAllRows > For fileIndex As Integer = 1 To f.Count > If fileIndex = 89 Then Break > self.CurrentFileText.Text = "Checking " + Str(fileIndex) + "/" + > Str(f.Count) > self.Refresh > ts = TextInputStream.Open(f.Item(fileIndex)) > content = ts.ReadAll > ts.Close > offset = content.InStr("Ser") > If offset = 0 Then offset = content.InStr("ser") > If offset = 0 Then offset = content.InStr("Reg") > If offset = 0 Then offset = content.InStr("reg") > If offset = 0 Then offset = content.InStr("Lic") > If offset = 0 Then offset = content.InStr("lic") > If offset > 0 Then self.MatchList.AddRow(f.DisplayName + " byte " + > Str(offset)) > Next > If self.MatchList.ListCount = 0 Then self.MatchList.AddRow("Not > Found") > > The directory and files were created by a data recovery program > after a power failure during a backup wiped the drive's directory > structure. > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: Application hangs periodically unless stepped through with the debugger |
| Date: 01.03.10 19:23 (Mon, 1 Mar 2010 18:23:53 +0000 (UTC)) |
| From: b dunphy comcast.net |
|
Replying to myself because I forgot to mention I'm using 2010R1 under Windows.
----- Original Message ----- From: "b dunphy" <<email address removed>> To: <email address removed> Sent: Monday, March 1, 2010 12:16:34 PM GMT -06:00 US/Canada Central Subject: Application hangs periodically unless stepped through with the debugger The following code is in the Action event of a button. The code hangs (windows says "not responding" and the count stops increasing) when processing certain files in the directory unless the pass in question is stepped through with the debugger. The first two hangs occur on the 89th and 180th files in the directory. The directory contains 17,936 files ranging in size from 1K to 19,432K. The system is a 2.8Ghz Intel Core 2 Extreme running Windows Vista with 4GB of physical RAM. The system indicates CPU usage is 48% and memory usage is 43% at the time of hanging and these numbers do not change. Dim f As New FolderItem("C:\Shared External Recovery\Text Document (txt)") Dim ts As TextInputStream Dim content as String Dim offset As UInt64 self.MatchList.DeleteAllRows For fileIndex As Integer w To f.Count If fileIndex (9 Then Break self.CurrentFileText.Text mChecking " + Str(fileIndex) + "/" + Str(f.Count) self.Refresh ts aextInputStream.Open(f.Item(fileIndex)) content ms.ReadAll ts.Close offset .ontent.InStr("Ser") If offset a Then offset |ontent.InStr("ser") If offset q Then offset ,ontent.InStr("Reg") If offset t Then offset ,ontent.InStr("reg") If offset : Then offset oontent.InStr("Lic") If offset l Then offset |ontent.InStr("lic") If offset > 0 Then self.MatchList.AddRow(f.DisplayName + " byte " + Str(offset)) Next If self.MatchList.ListCount 2 Then self.MatchList.AddRow("Not Found") The directory and files were created by a data recovery program after a power failure during a backup wiped the drive's directory structure. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
Links
MBS Realbasic Plugins - Pfarrgemeinde Ministranten Nickenich