Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workbook#get_worksheet_by_name crashes #100

Open
rellampec opened this issue Jan 19, 2024 · 0 comments
Open

Workbook#get_worksheet_by_name crashes #100

rellampec opened this issue Jan 19, 2024 · 0 comments

Comments

@rellampec
Copy link

rellampec commented Jan 19, 2024

The code below without calling #get_worksheet_by_name works perfectly well (so commenting lines #1 and #3)

    unless sheet = workbook.get_worksheet_by_name(name)
      sheet = workbook.add_worksheet(name)
    end

   sheet.append_row(["TEST", nil, nil])

Running the code crashes with the info below (omitted client code):

-- Control frame information -----------------------------------------------
c:0034 p:---- s:0189 e:000188 CFUNC  :worksheet_write_string
c:0033 p:0020 s:0180 e:000179 METHOD C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel/binding/worksheet.rb:210
c:0032 p:0378 s:0172 e:000171 METHOD C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:479
c:0031 p:0046 s:0164 e:000163 BLOCK  C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:440 [FINISH]
c:0030 p:---- s:0158 e:000157 IFUNC
c:0029 p:---- s:0155 e:000154 CFUNC  :each
c:0028 p:---- s:0152 e:000151 CFUNC  :each_with_index
c:0027 p:0008 s:0148 e:000147 METHOD C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:435
c:0026 p:0022 s:0141 e:000140 METHOD C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:515

-- Ruby level backtrace information ----------------------------------------
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:515:in `append_row'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:435:in `write_row'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:435:in `each_with_index'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:435:in `each'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:440:in `block in write_row'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel.rb:479:in `write_value'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel/binding/worksheet.rb:210:in `write_string'
C:/ruby/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fast_excel-0.5.0/lib/fast_excel/binding/worksheet.rb:210:in `worksheet_write_string'
-- C level backtrace information -------------------------------------------
C:\Windows\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0x14) [0x00007ffba4b2f3f4]
C:\Windows\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x8e) [0x00007ffba22044ee]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_bugreport+0x34b) [0x00000000653c657b]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_bug_for_fatal_signal+0x7f) [0x00000000651df83f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(ruby_sysinit+0x1040) [0x00000000653207a0]
 [0x0000000000401ea2]
C:\Windows\System32\msvcrt.dll(_C_specific_handler+0x98) [0x00007ffba3b2b248]
C:\Windows\SYSTEM32\ntdll.dll(_chkstk+0x12f) [0x00007ffba4b3441f]
C:\Windows\SYSTEM32\ntdll.dll(RtlFindCharInUnicodeString+0xa96) [0x00007ffba4aae466]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e) [0x00007ffba4b3340e]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\extensions\x64-mingw32\2.7.0\fast_excel-0.5.0\libxlsxwriter.dll(lxw_worksheet_write_single_row+0x251) [0x00000000615bcd81]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\gems\ffi-1.12.2-x64-mingw32\lib\2.7\ffi_c.so(Init_ffi_c+0xc41) [0x0000000007ed3fd1]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\gems\ffi-1.12.2-x64-mingw32\lib\2.7\ffi_c.so(Init_ffi_c+0x8a4) [0x0000000007ed3c34]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\gems\ffi-1.12.2-x64-mingw32\lib\2.7\ffi_c.so(Init_ffi_c+0x8e9) [0x0000000007ed3c79]
 [0x0000000007ec9470]
 [0x0000000007ecccdd]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\gems\ffi-1.12.2-x64-mingw32\lib\2.7\ffi_c.so(Init_ffi_c+0xbf8) [0x0000000007ed3f88]
C:\ruby\Ruby27-x64\lib\ruby\gems\2.7.0\gems\ffi-1.12.2-x64-mingw32\lib\2.7\ffi_c.so(Init_ffi_c+0xd6e) [0x0000000007ed40fe]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x228) [0x00000000653b4ce8]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_enc_foreach_name+0x66df) [0x00000000651ced7f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_bh_to_procval+0x2326) [0x00000000653a6b26]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x13c) [0x00000000653af35c]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_ary_each+0x3d) [0x000000006514586d]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_invoke_proc+0x70a) [0x00000000653b003a]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_call_kw+0x178) [0x00000000653b0f28]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_funcall_with_block_kw+0x214) [0x00000000653b3d14]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_rewind_cfp+0x19e) [0x00000000653a370e]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_block_call+0x85) [0x00000000653a3aa5]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_enc_foreach_name+0x1f68) [0x00000000651ca608]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x2f2) [0x00000000653af512]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_ary_each+0x3d) [0x000000006514586d]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x9bf) [0x00000000653a9b5f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x2f2) [0x00000000653af512]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_ary_each+0x3d) [0x000000006514586d]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x2f2) [0x00000000653af512]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_obj_tap+0xe) [0x000000006528cffe]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_call_kw+0x178) [0x00000000653b0f28]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_proc_lambda_p+0x13ae) [0x00000000652c6d1e]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_bh_to_procval+0x2326) [0x00000000653a6b26]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_bh_to_procval+0x24e4) [0x00000000653a6ce4]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_invoke_bmethod+0x1105) [0x00000000653ab415]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x228) [0x00000000653b4ce8]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x2f2) [0x00000000653af512]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_obj_tap+0xe) [0x000000006528cffe]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_hash_compare_by_id_p+0x488) [0x000000006520e988]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_hash_rassoc+0x51f) [0x000000006521193f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_ensure+0x13a) [0x00000000651e9cca]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_hash_foreach+0xb2) [0x0000000065219062]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_hash_assoc+0x31e) [0x0000000065219a6e]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_yield+0x2f2) [0x00000000653af512]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_ary_each+0x3d) [0x000000006514586d]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x34f) [0x00000000653b4e0f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x231) [0x00000000653a93d1]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_get_expanded_load_path+0x13db) [0x000000006524b4fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_f_require_relative+0x47) [0x000000006524b727]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_error_arity+0x34b) [0x000000006539e8fb]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_add_method+0x228) [0x00000000653b4ce8]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_vm_exec+0x9bf) [0x00000000653a9b5f]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(rb_call_end_proc+0x142) [0x00000000651e3e92]
C:\ruby\Ruby27-x64\bin\x64-msvcrt-ruby270.dll(ruby_run_node+0x95) [0x00000000651e8b45]
 [0x0000000000402759]
 [0x00000000004013c1]
 [0x00000000004014f6]
C:\Windows\System32\KERNEL32.DLL(BaseThreadInitThunk+0x1d) [0x00007ffba2ee257d]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant