Bug 148343 - EDITING an ODBC database (MS Access and Quickbase via QuNect ODBC for QuickBase) crashes LibreOffice
Summary: EDITING an ODBC database (MS Access and Quickbase via QuNect ODBC for QuickBa...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://youtu.be/JrrZTM7eYuo
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2022-04-03 23:42 UTC by Claude von Roesgen
Modified: 2023-05-07 13:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Base delivers invalid bookmark to MS Access via ODBC. (158.25 KB, image/png)
2022-04-03 23:45 UTC, Claude von Roesgen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claude von Roesgen 2022-04-03 23:42:12 UTC
Description:
Base crashes after editing a record and moving the cursor off of the edited record. Just add a few records and it will most likely crash. It will also crash if you navigate around the records enough without editing. You can also cause a crash by deleting records and navigating back and forth through the record set. 

Steps to Reproduce:
On a Windows machine install QuNect ODBC for QuickBase from this link:
https://qunect.com/download/QuNect.exe

follow configuration instructions here:

https://qunect.com/flash/configure.html

If you prefer you can use the Linux version of the driver and get the same results.
The Linux driver instructions are available here:
https://qunect.com/linux.html

The latest version of the Linux driver is available here:
https://qunect.com/download/linux/64real/Rocky8/2022/release/libqunect64.so


configure your DSN with a username of:
demo@qunect.com

and a usertoken of: (note this is not a password but it is a usertoken)
byj7yu_bahz_0_dyemitzb53wbqmbxkcub6du3eehb

and a Quickbase server of:
qunect.quickbase.com


1.Open BASE and in the Database Wizard select the bottom radio button "Connect to an existing database."
2.Choose ODBC from the dropdown
3.Choose the 64 bit DSN you configured above
4. Click Finish
5. Open the "Simple Table"
6. Add records, then delete a few, and then navigate around the record set
7. For good measure do a few Refreshes and Rebuilds

Actual Results:
LibreOffice Base crashes.

Expected Results:
Records are edited and saved to Quickbase


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Line 883 in OResultSet.cxx

setStmtOption<SQLLEN*, SQL_IS_POINTER>(SQL_ATTR_FETCH_BOOKMARK_PTR, reinterpret_cast<SQLLEN*>(aBookmark.getArray()));

gets a SQLLEN pointer (8 bytes) from aBookmark which is only a 4 byte array. I see this in Visual Studio when I set a breakpoint in my ODBC driver (QuNect ODBC for QuickBase). So the bookmark that my ODBC driver retrieves from the pointer defined by SQL_ATTR_FETCH_BOOKMARK_PTR, an ODBC statement attribute, is invalid. It's often a very large number, way beyond any valid value. MS Access ODBC connections also report
Comment 1 Claude von Roesgen 2022-04-03 23:45:05 UTC
Created attachment 179293 [details]
Base delivers invalid bookmark to MS Access via ODBC.
Comment 2 Claude von Roesgen 2022-04-03 23:49:03 UTC
Here's a typical stack trace of the crash:

dbalo.dll!rtl::Reference<connectivity::ORowVector<connectivity::ORowSetValue>>::operator*() Line 225
	at C:\cygwin\home\claud\lode\dev\core\include\rtl\ref.hxx(225)
dbalo.dll!dbaccess::ORowSetCache::insertRow(std::vector<com::sun::star::uno::Any,std::allocator<com::sun::star::uno::Any>> & o_aBookmarks) Line 1277
	at C:\cygwin\home\claud\lode\dev\core\dbaccess\source\core\api\RowSetCache.cxx(1277)
dbalo.dll!dbaccess::ORowSet::insertRow() Line 864
	at C:\cygwin\home\claud\lode\dev\core\dbaccess\source\core\api\RowSet.cxx(864)
frmlo.dll!frm::ODatabaseForm::insertRow() Line 3414
	at C:\cygwin\home\claud\lode\dev\core\forms\source\component\DatabaseForm.cxx(3414)
svxcorelo.dll!DbGridControl::SaveRow() Line 2894
	at C:\cygwin\home\claud\lode\dev\core\svx\source\fmcomp\gridctrl.cxx(2894)
svtlo.dll!svt::EditBrowseBox::IsCursorMoveAllowed(long nNewRow, unsigned short nNewColId) Line 807
	at C:\cygwin\home\claud\lode\dev\core\svtools\source\brwbox\editbrowsebox.cxx(807)
svtlo.dll!BrowseBox::GoToRowColumnId(long nRow, unsigned short nColId) Line 1594
	at C:\cygwin\home\claud\lode\dev\core\svtools\source\brwbox\brwbox1.cxx(1594)
svtlo.dll!BrowseBox::MouseButtonDown(const BrowserMouseEvent & rEvt) Line 1553
	at C:\cygwin\home\claud\lode\dev\core\svtools\source\brwbox\brwbox2.cxx(1553)
svtlo.dll!svt::EditBrowseBox::MouseButtonDown(const BrowserMouseEvent & rEvt) Line 444
	at C:\cygwin\home\claud\lode\dev\core\svtools\source\brwbox\editbrowsebox.cxx(444)
dbulo.dll!dbaui::SbaGridControl::MouseButtonDown(const BrowserMouseEvent & rMEvt) Line 909
	at C:\cygwin\home\claud\lode\dev\core\dbaccess\source\ui\browser\sbagrid.cxx(909)
svtlo.dll!BrowserDataWin::MouseButtonDown(const MouseEvent & rEvt) Line 435
	at C:\cygwin\home\claud\lode\dev\core\svtools\source\brwbox\datwin.cxx(435)
vcllo.dll!ImplHandleMouseEvent(const VclPtr<vcl::Window> & xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, __int64 nX, __int64 nY, unsigned __int64 nMsgTime, unsigned short nCode, MouseEventModifiers nMode) Line 710
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\window\winproc.cxx(710)
vcllo.dll!ImplHandleSalMouseButtonDown(vcl::Window * pWindow, const SalMouseEvent * pEvent) Line 2285
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\window\winproc.cxx(2285)
vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2636
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\window\winproc.cxx(2636)
vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 308
	at C:\cygwin\home\claud\lode\dev\core\vcl\inc\salframe.hxx(308)
vclplug_winlo.dll!ImplHandleMouseMsg(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 3235
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\window\salframe.cxx(3235)
vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5612
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\window\salframe.cxx(5612)
vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5965
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\window\salframe.cxx(5965)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchMessageWorker()
JitV.dll!00007ffbb9107d28()
vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 475
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\app\salinst.cxx(475)
vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 552
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\app\salinst.cxx(552)
vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581
	at C:\cygwin\home\claud\lode\dev\core\vcl\win\app\salinst.cxx(581)
vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 474
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\app\svapp.cxx(474)
vcllo.dll!Application::Yield() Line 559
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\app\svapp.cxx(559)
vcllo.dll!Application::Execute() Line 452
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\app\svapp.cxx(452)
sofficeapp.dll!desktop::Desktop::Main() Line 1606
	at C:\cygwin\home\claud\lode\dev\core\desktop\source\app\app.cxx(1606)
vcllo.dll!ImplSVMain() Line 202
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\app\svmain.cxx(202)
vcllo.dll!SVMain() Line 235
	at C:\cygwin\home\claud\lode\dev\core\vcl\source\app\svmain.cxx(235)
sofficeapp.dll!soffice_main() Line 98
	at C:\cygwin\home\claud\lode\dev\core\desktop\source\app\sofficemain.cxx(98)
soffice.exe!sal_main() Line 51
	at C:\cygwin\home\claud\lode\dev\core\desktop\source\app\main.c(51)
soffice.exe!main(int argc, char * * argv) Line 49
	at C:\cygwin\home\claud\lode\dev\core\desktop\source\app\main.c(49)
Comment 3 Claude von Roesgen 2022-04-04 13:00:16 UTC Comment hidden (obsolete)
Comment 4 Claude von Roesgen 2022-04-04 13:01:04 UTC
Here's the YouTube video on how to reproduce the crash:
https://youtu.be/JrrZTM7eYuo