Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Index was outside the bounds of the array. in Managed ODP.NET 19.3

user1111031Jul 22 2021 — edited Jul 22 2021

Hi,
I'm receiving the following index out of bounds error when using the ODP.NET 19.3 Managed driver:
Index was outside the bounds of the array.
at OracleInternal.ServiceObjects.DataUnmarshaller.StartAccumulatingColumnData(Int32 currentRow, Int32 columnIndex, List`1 rowDataSegments)
at OracleInternal.TTC.Accessors.Accessor.GetInternalDataRef(DataUnmarshaller dataUnmarshaller, Int32 currentRow, Int32 columnIndex, Byte[]& dataByteRep, Int32& dataOffset, Int32& dataLength)
at Oracle.ManagedDataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
at Oracle.ManagedDataAccess.Client.OracleDataReader.GetValue(Int32 i)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteScalar()

My program is running multithreaded with each thread having its own ODP.NET connection and command instances. The threads should not be sharing any ODP.NET resources, yet I still see this error. We're using the .NET Framework version of ODP.NET released with 64-bit ODAC 19.3, not .NET Core.
Does anyone have any experience with this or know of any way to resolve this issue?

This post has been answered by user1111031 on Aug 1 2021
Jump to Answer

Comments

Hello!

This problem has been fixed in the latest patch, so updating your compiler will help:

$ cat b.cc

    static constexpr char16_t kFallbackPaddingString[] = u" ";

$ CC -g  a.cc -std=c++11 -V

CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 Patch 152716-03 2019/04/10

...

koval

Are those patches available somewhere for Solaris 10?

Maxim Kartashev-Oracle

Yes, all patches for Studio are made available both for Solaris 11 and 10. Patches for Solaris 10 can be downloaded through MOS (support.oracle.com). You'll need a support contract to do that.

User_07208

Is this patch available for solaris 11 ?

Alanc-Oracle

Updates for Solaris 11 are provided to customers with support contracts via the Studio IPS repository.

1 - 5

Post Details

Added on Jul 22 2021
8 comments
2,105 views