[Windows] AutoComplete for StringGadgets
Just heard back. 5 reports already of the crash with the new memory lib... I asked them to report the contents of the message requester (to see if the heap invalid message is displaying) but no one has said that they saw it. That shouldn't be taken to mean that no one did, people are pretty notorious for not reporting that stuff.
I'll send it to a few people specifically and see if they can tell me if the heap invalid message is shown.
I'll send it to a few people specifically and see if they can tell me if the heap invalid message is shown.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Hey Xombie -- I actually like the API's flexibility in the different styles it supports but I can't use it if it keeps crashing without explanation.
If I can't get this moving in the next couple of days I'll have to switch!
If I can't get this moving in the next couple of days I'll have to switch!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Just heard back.. The crash happens and does *not* display the heap invalid error, so according to that code you sent it's valid..
Crazy, eh?
See... A few thousand users can break anything!
Crazy, eh?
See... A few thousand users can break anything!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
I just realized i made a mistake with the heap validation.
The AllocateMemory() command actually has its separate heap from the one used
by the other PB libraries (which makes sense). So we were testing the wrong one.
Here we go again:
This one tests the heap used for string storage, the one
from AllocateMemory(), and the one for the PB libraries
Please test it again.
The AllocateMemory() command actually has its separate heap from the one used
by the other PB libraries (which makes sense). So we were testing the wrong one.
Here we go again:
This one tests the heap used for string storage, the one
from AllocateMemory(), and the one for the PB libraries
Code: Select all
Procedure ValidatePBHeap(LineNumber)
Protected StringHeap, MemoryHeap, InternalHeap
!extrn _PB_Memory_Heap
!extrn _PB_StringHeap
!mov eax, dword [_PB_MemoryBase]
!mov [p.v_InternalHeap], eax
!mov eax, dword [_PB_StringHeap]
!mov [p.v_StringHeap], eax
!mov eax, dword [_PB_Memory_Heap]
!mov [p.v_MemoryHeap], eax
If HeapValidate_(StringHeap, 0, 0) = 0
MessageRequester("Error", "String Heap invalid at Line: "+Str(LineNumber))
EndIf
If HeapValidate_(MemoryHeap, 0, 0) = 0
MessageRequester("Error", "Memory Heap invalid at Line: "+Str(LineNumber))
EndIf
If HeapValidate_(InternalHeap, 0, 0) = 0
MessageRequester("Error", "Internal Memory Heap invalid at Line: "+Str(LineNumber))
EndIf
EndProcedure
Macro _validate
ValidatePBHeap(#PB_Compiler_Line)
EndMacro
quidquid Latine dictum sit altum videtur
Got it and just sent it out... I should hear something back in a few hours..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Wow, sure enough, I can reproduce it on another Windows XP Pro computer here..
Code: Select all
Procedure New_EnumString(StringArray$(1), StringCount)
*THIS.EnumString = 0
Size = 4 + StringCount * 4
For i = 0 To StringCount-1
Size + Len(StringArray$(i)) * 2 + 2
Next i
_validate ; THIS REPORTS INVALID HEAP AND CRASHES RIGHT AFTER
*StringBuffer.EnumStringBuffer = AllocateMemory(Size)
If *StringBuffer
*StringBuffer\RefCount = 1
*Pointer = *StringBuffer + 4 + StringCount * 4
For i = 0 To StringCount - 1
*StringBuffer\Strings[i] = *Pointer
PokeS(*Pointer, StringArray$(i), -1, #PB_Unicode)
*Pointer + Len(StringArray$(i)) * 2 + 2
Next i
_validate
*THIS = AllocateMemory(SizeOf(EnumString))
If *THIS
*THIS\Vtbl = ?IEnumStringVtbl
*THIS\RefCount = 1
*THIS\StringCount = StringCount
*THIS\Enumerator = 0
*THIS\Buffer = *StringBuffer
Else
FreeMemory(*StringBuffer)
EndIf
EndIf
ProcedureReturn *THIS
EndProcedure
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Atleast a step in the right direction...
Now the problem must be somewhere before this line is reached.
Some pointer stuff, PokeS() or other memory access must be going wrong.
You'll just have to throw some _validate lines around the code to find out where.
(I just hope its not in my code )
Now the problem must be somewhere before this line is reached.
Some pointer stuff, PokeS() or other memory access must be going wrong.
You'll just have to throw some _validate lines around the code to find out where.
(I just hope its not in my code )
quidquid Latine dictum sit altum videtur
Found it.
Looks like this isn't very unicode friendly.. I'll give it a go at re-writing it.
Looks like this isn't very unicode friendly.. I'll give it a go at re-writing it.
Code: Select all
Procedure.l AddODBCConnection(Driver$,Attributes$)
While Right(Attributes$,2)<>";;"
Attributes$+";"
Wend
_validate
*LPAttribMem=AllocateMemory(Len(Attributes$)*SizeOf(CHARACTER))
_validate
PokeS(*LPAttribMem,Attributes$,Len(Attributes$))
_validate ; < - INVALID HERE
For l=1 To Len(Attributes$)
CompilerIf #PB_Compiler_Unicode
If PeekW(*LPAttribMem + (l-1) * SizeOf(CHARACTER))=Asc(";")
PokeW(*LPAttribMem + (l-1) * SizeOf(CHARACTER),0)
EndIf
CompilerElse
If PeekB(*LPAttribMem + l -1)=Asc(";")
PokeB(*LPAttribMem + l -1,0)
EndIf
CompilerEndIf
Next
_validate
result=SQLConfigDataSource_(0,#ODBC_ADD_DSN,Driver$,*LPAttribMem)
FreeMemory(*LPAttribMem)
ProcedureReturn result
EndProcedure
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Wow! Forest for the trees on that one.
THANK YOU!
THANK YOU!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Yea, I never knew it was updated since you just hit "edit" instead of "reply"
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
-
- Enthusiast
- Posts: 732
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
is it possible to have diff gadgets with different arrays with autocomplete at the same time?
And how do you add items to list while program is running?
And how do you add items to list while program is running?
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net