[Gambas-user] gb3: multiple errors

Kevin Fishburne kevinfishburne at ...1887...
Wed Feb 29 07:26:39 CET 2012


On 02/29/2012 01:13 AM, Kevin Fishburne wrote:
> On 02/29/2012 12:45 AM, Kevin Fishburne wrote:
>> I'm using the build from a few days ago (recompiling now) and get this
>> error when trying to create a module in a new or existing project:
>>
>> This application has raised an unexpected error and must abort.
>>
>> [11] Unknown symbol 'Margin' in class 'FileChooser'.
>> FCreateFile.FCreateFile.0
>>
>> I also get a crash trying to run this code:
>>
>> ' Server Module
>>
>> Public Struct Server_QueueOut
>>      Acknowledged As Boolean ' Whether or not transaction has been
>> acknowledged by recipient.
>>      Player As Short         ' Number of player transaction was sent to.
>>      Timestamp As Float      ' Time transaction was sent.
>>      Type As Byte            ' Transaction type.
>>      Data As String          ' Transaction payload.
>> End Struct
>> Public QueueOut[2000, 32768] As Struct Server_QueueOut
>>
>> ' Network module
>>
>> Public QueueSize As Short = 1023        ' Maximum number of incoming and
>> outgoing transaction queue elements.
>>
>>          ' Set outgoing transaction queue acknowledgments to true.
>>          For Counter2 = 0 To 1999
>>            For Counter1 = 0 To QueueSize
>>              Server.QueueOut[Counter2, Counter1].Acknowledged = True
>>            Next
>>          Next
>>
>> It crashes the first time it tries to execute the
>> "Server.QueueOut[Counter2, Counter1].Acknowledged = True" line. I'll let
>> you know if the latest revision fixes it.
>>
>>
> Looks like the new module error was caused by creating a new project in
> the same directory as an old project.
>
> The current gb3 build has the same second issue, which I captured here:
>
> http://eightvirtues.com/sanctimonia/misc/What%20the%20fuck%20is%20going%20on%3f.webm
>
> I recreated the basic code and variables in a test project and the issue
> didn't occur, so it has something to do with unrelated variables and
> modules. The change I made across my project was changing the queue size
> from 256 to 32768, so the QueueOut array went from this:
>
> Public QueueOut[2000, 256] As Struct Server_QueueOut
>
> to this:
>
> Public QueueOut[2000, 32768] As Struct Server_QueueOut
>

Holy shit I may be a genius (obviously not). It appears that creating 
such a large array of structures caused a RAM issue. The initial 
declaration didn't raise an error, but attempting to read/write from/to 
the array caused a RAM usage spike which in turn caused the sig 11. I 
have 2 GB of RAM assigned to the VM I'm running the server in, and I 
can't believe that the array of structures actually consumed that much 
RAM. Let's say that it in fact did need that much RAM. Does GAMBAS 
normally handle such things gracefully, or is this a bug?

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list