[mono-vb] VBNC crasch when using marshalAs on arrays in struct

Rolf Kvinge Rolf.Kvinge at microsoft.com
Mon Aug 22 10:07:17 UTC 2016


Hi,

This looks like a compiler bug, but at this point the Visual Basic compiler (vbnc) is not really maintained, so it's unlikely it will be fixed any time soon.

Best regards,
Rolf


On 11/08/16 10:56, "Mono-vb on behalf of Lars Lindholm" <mono-vb-bounces at lists.dot.net on behalf of lars.lindholm at vtab.se> wrote:

    Hi,
    
    I have a structure I need to apply to an byte array. To do this I have a 
    VB Structure with marshaling commands to enforce proper packing and 
    ensure correct interpretation.
    
    This have worked in a vs environment before and now I'm trying to move 
    over to a monodevelop environment. I have tried with the latest 
    mono-basic compiler from the github repo(Mono 4.6 - master/c93133d).
    
    When trying to compile I get: vbnc : Command line : error VBNC99999: 
    Unexpected error: Specified cast is not valid.
    
    This might be related to this bug: 
    https://bugzilla.xamarin.com/show_bug.cgi?id=2867
    
    I'm attaching a complete output and source for a minimal example where 
    commenting away the marshal command makes it compile and leaving it in 
    makes it crasch.
    
    Best regards
    
    Lars Lindholm
    
    
    







More information about the Mono-vb mailing list