Ruby C extension returns report_on_exception is true

I was trying to import server_info api in the ibm_db extension. It worked well in windows but in Linux, it returns thread sleep error.

#<Thread:0x000055c9febc5ca0 sleep> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
stack level too deep (SystemStackError)
^C*** stack smashing detected ***: <unknown> terminated

code :

require 'ibm_db'
conn = IBM_DB.connect('DATABASE=;HOSTNAME=localhost;PORT=50000;PROTOCOL=TCPIP;UID=;PWD=','','')
puts 'this is ibm_db'
#Thread.report_on_exception = false
puts 'this is begin'
puts IBM_DB
serverinfo = IBM_DB::server_info( conn )
puts serverinfo.DBMS_NAME[0,100]
puts IBM_DB.close(conn)

It works fine in windows but not on linux.
In linux if I add sleep after connect it will work fine.
why was wrong in that ruby gem?
code where it connects to c extension is in this link… https://github.com/ibmdb/ruby-ibmdb/blob/master/IBM_DB_Adapter/ibm_db/ext/ibm_db.c#L688

Thanks,
Akhil

SketchUp does not run under Linux, and only Win and MacOS editions of the SDK are distributed.

Does this have anything to do with the SketchUp embedded Ruby API or the SketchUp C API ?

sorry it is not related to sketchup. I couldn’t find any active members in any other forms for ruby so I posted it here.

1 Like

I’d give stack overflow a try :wink:

I have already tried stack overflow.

Well the newer Ruby forum is here …

… it imported all the topic threads from the old defunct forum.


The main problem with posting here is that Ruby threads do no work well inside the embedded Ruby that SketchUp uses. So there may not be many who could answer your questions here.