|
-
Sep 28th, 2002, 03:17 PM
#1
Thread Starter
Junior Member
Strange error after compiling
1. "strange" means its not a runtime error but an error which is caused by MSVM60.dll AND it only happens in Win9x/ME
2.Thats the procedur's code where this error appears:
Public Sub FillList()
Dim i As Long, tmp As Long
lst.Clear
' Get the function work even if the array is erased
On Error Resume Next
tmp = -1
tmp = UBound(ArrayPersons)
On Error GoTo 0
For i = 0 To tmp
With ArrayPersons(i).NameInfo
If Not len(.Name)=0 Then
' If I put in a 'msgbox "blablabla"' right here I get runtime error '10' DURING the message box is shown
lst.AddItem .Title & vbTab & .Name & vbTab & .Nick
lst.ItemData(lst.NewIndex) = i
End If
End With
Next
End Sub
(I hope it wasn't my mistake )
 Visual Basic 
-
Sep 28th, 2002, 04:50 PM
#2
PowerPoster
That error (whatever it is) may occur because program must delay some other simiutanious excution while MsgBox is shown. I'd suggest to use DoEvents inside your loop to be on the safe side. So, it could look like:
VB Code:
With ArrayPersons(i).NameInfo
For i = 0 To tmp
DoEvents
If Not len(.Name)=0 Then
MsgBox "blablabla"
lst.AddItem .Title & vbTab & .Name & vbTab & .Nick
lst.ItemData(lst.NewIndex) = i
End If
Next
End With
-
Sep 28th, 2002, 07:13 PM
#3
PowerPoster
Well
Can you leave out the messagebox altogether, and report any messages at the end of the loop?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 28th, 2002, 07:21 PM
#4
The picture isn't missing
Timers can run asyncrounously to msgboxes, so it could be one of you timers causing problems.
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Sep 28th, 2002, 08:07 PM
#5
PowerPoster
In any case you should ALWAYS consider to include Error Handler in most of your procedures. It may look as follows:
VB Code:
....
On Error GoTo ErrClear
'some code
ErrClear:
'------------
Err.Clear
Resume Next
-
Sep 29th, 2002, 05:41 AM
#6
Thread Starter
Junior Member
Thank you, But the problbem is still there.
1.I dont get a runtime error but a system error... you know those beautiful message boxes with the red X "Critical error - app closed" - An error handler doesnt catch them.
2.If I put the message box in there im lucky enought to get a runtime error not a system related one. - A break through, isnt it? 
3.Ive also tried a DoEvents in there but the error is still there.
after some debugging at runtime ive figured out that the error occurs if im accessing entries around i=15.
In addition as I said allready it only occurs in win9x/ME not in NT/2k/XP... Could the MSVB60.dll be buggy?
 Visual Basic 
-
Sep 29th, 2002, 09:02 AM
#7
Fanatic Member
What exactly is the error?
-
Sep 29th, 2002, 10:46 AM
#8
Thread Starter
Junior Member
-
Sep 29th, 2002, 11:00 AM
#9
PowerPoster
Well
Yes the dialog is familiar, but which dll is it referencing that caused the crash?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 29th, 2002, 12:16 PM
#10
Thread Starter
Junior Member
MSVBVM60.dll - Thats the most important file for VB6
 Visual Basic 
-
Sep 29th, 2002, 12:20 PM
#11
PowerPoster
Well
Perhaps it's the negative one issue for the tmp variable?
You could have this situation
VB Code:
For i = 0 to tmp ' what if tmp = -1
See what I mean?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 29th, 2002, 02:52 PM
#12
Fanatic Member
ummm this might sound totally wack but
are there more than 366 items being added?
try looping upto 366
for i = 0 to 366
then run compile and run
( im just testing something so this post might seem strange )
tell me if it crashes then
P.S This is a loooooong shot
-
Sep 29th, 2002, 03:02 PM
#13
PowerPoster
Well
Originally posted by Geespot
ummm this might sound totally wack but
are there more than 366 items being added?
try looping upto 366
for i = 0 to 366
then run compile and run
( im just testing something so this post might seem strange )
tell me if it crashes then
P.S This is a loooooong shot
What are you getting at here? The declaration of the variable?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 29th, 2002, 03:07 PM
#14
Fanatic Member
what it is,
the CS register is 0x016f which is 367
and the CS register is used for incrementing variables ( i think! )
and as there is a for-next there, i just took a wild guess lol
-
Sep 29th, 2002, 03:09 PM
#15
PowerPoster
Well
Originally posted by Geespot
what it is,
the CS register is 0x016f which is 367
and the CS register is used for incrementing variables ( i think! )
and as there is a for-next there, i just took a wild guess lol
Wrong thread GeeSpot?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 30th, 2002, 03:30 PM
#16
Thread Starter
Junior Member
-
Sep 30th, 2002, 03:45 PM
#17
PowerPoster
Well
How is i declared ? As byte ? As Integer? . . .
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 3rd, 2002, 01:36 PM
#18
Thread Starter
Junior Member
"i" is declared as Long
the array is declared as a UDT - There are Longs, var Strings, other UDTs and booleans.
 Visual Basic 
-
Oct 3rd, 2002, 01:42 PM
#19
PowerPoster
Well
The array is a UDT ? Please post your code..
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 3rd, 2002, 01:55 PM
#20
Thread Starter
Junior Member
Thats the UDT's structure (very complex and german again ):
VB Code:
Public Type nName
Titel As String
Name As String
Vorname As String
End Type
Public Type nAdresse
Adresse As String
PLZ As String
ORT As String
End Type
Public Type nTelefon
Telefon As String
Mobiltelefon As String
Fax As String
EMail As String
End Type
Public Type nDienstgeber
Name As String
Adresse As nAdresse
TelInfo As nTelefon
End Type
Public Type nKrankenschein
Nummer As Long
Typ As Integer
ÜberweisungTyp As Integer
ÜberweisungArzt As Long
DatumAbgabe As Date
DatumBehandlung As Date
DatumÜberweisung As Date
Zusatz As Integer
Inaktiv As Integer
End Type
Public Type nPatient
NameInfo As nName
Geschlecht As Integer
Versicherung As Integer
VersicherungBundesland As Integer
VersicherungNummer As String
Adressen As nAdresse
TelInfo As nTelefon
Zuweiser As Long
KarteiPath As String
Geburtsdatum As String
Notizen As String
Versicherter As Long
VersicherterKat As Integer
Nummer As Long
Angehörige() As Long
Scheine() As nKrankenschein
Dienstgeber As nDienstgeber
End Type
Last edited by Xela001; Oct 3rd, 2002 at 02:47 PM.
 Visual Basic 
-
Oct 4th, 2002, 08:42 AM
#21
Thread Starter
Junior Member
Maybe I can go around that problem by writing a c++ dll, but this would cause much lower speed and much more work - do you have some other ideas?
hey, James where are you?
 Visual Basic 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|