Menu

#2 crashes when trying to open database on Mac OS X

open
Moonwink
None
5
2014-08-14
2006-04-18
No

sqlitecc just crashed when I tried to open one of our programmatically
created databases.
This may be related to the database being created by sqlite 3.3.4,
which may be newer than the version embedded in sqlitecc, producing
an error when trying to open the database, or it may be related to a
different encoding used when creating the database (the database
probably was created using UTF-16be encoding).

Anyway, here's the crash log:

Date/Time: 2006-04-18 12:35:18.410 +0200
OS Version: 10.4.4 (Build 8G32)
Report Version: 3

Command: sqlitecc
Path: /Volumes/sqlitecc/sqlitecc.app/Contents/MacOS/sqlitecc
Parent: WindowServer [2798]

Version: ??? (???)

PID: 9850
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000011c

Thread 0 Crashed:
0 libsqlite.0.dylib 0x0121d488 sqliteSafetyOn + 0 (util.c:
1092)
1 libsqlite.0.dylib 0x0120c338 sqlite_compile + 72
(main.c:701)
2 libsqlite.0.dylib 0x0120c138 sqlite_exec + 156 (main.c:
641)
3 libsqlite.0.dylib 0x01219f1c sqlite_get_table + 192
(table.c:152)
4 libsqlite.0.dylib 0x01215624 sqlite_get_table_vprintf +
80 (printf.c:855)
5 sqlitecc 0x00017dbc wxSQLiteQueryResult::Execute
(char const*, ...) + 256 (crt.c:300)
6 sqlitecc 0x0000b324 MyTableList::Load() + 88 (crt.c:
300)
7 sqlitecc 0x0000abd0 dbFrame::OnOpenDB
(wxCommandEvent&) + 1308 (crt.c:300)
8 libwx_base_carbon-2.5.3.dylib 0x0106708c
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 156 (icplusplus.c:27)
9 libwx_base_carbon-2.5.3.dylib 0x0106682c
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 160
(icplusplus.c:27)
10 libwx_base_carbon-2.5.3.dylib 0x01067238
wxEvtHandler::ProcessEvent(wxEvent&) + 204 (icplusplus.c:27)
11 libwx_mac_core-2.5.3.dylib 0x004907ec
wxMenuBase::SendEvent(int, int) + 144 (icplusplus.c:27)
12 libwx_mac_core-2.5.3.dylib 0x003e62b0
wxMacAppCommandEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 376 (icplusplus.c:27)
13 libwx_mac_core-2.5.3.dylib 0x003e6460
wxMacAppEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 188 (icplusplus.c:27)
14 com.apple.HIToolbox 0x9318cff4
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*,
HandlerCallRec*) + 692
15 com.apple.HIToolbox 0x9318c74c
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 372
16 com.apple.HIToolbox 0x931934ec
SendEventToEventTarget + 40
17 com.apple.HIToolbox 0x9320c05c
SendHICommandEvent(unsigned long, HICommand const*, unsigned
long, unsigned long, unsigned char, OpaqueEventTargetRef*,
OpaqueEventTargetRef*, OpaqueEventRef**) + 380
18 com.apple.HIToolbox 0x9323c368
SendMenuItemSelectedEvent + 136
19 com.apple.HIToolbox 0x9323c270 FinishMenuSelection
(MenuData*, MenuData*, MenuResult*, MenuResult*, unsigned long,
unsigned long, unsigned long, unsigned char) + 144
20 com.apple.HIToolbox 0x93223194 MenuSelectCore
(MenuData*, Point, double, unsigned long, OpaqueMenuRef**,
unsigned short*) + 404
21 com.apple.HIToolbox 0x93222c7c MenuSelect + 100
22 libwx_mac_core-2.5.3.dylib 0x00427ea4
wxMacTopLevelMouseEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 832 (icplusplus.c:27)
23 libwx_mac_core-2.5.3.dylib 0x003e64e0
wxMacAppEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 316 (icplusplus.c:27)
24 com.apple.HIToolbox 0x9318cff4
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*,
HandlerCallRec*) + 692
25 com.apple.HIToolbox 0x9318c74c
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 372
26 com.apple.HIToolbox 0x931934ec
SendEventToEventTarget + 40
27 com.apple.HIToolbox 0x93382744 HandleMouseEvent
(OpaqueEventRef*) + 388
28 com.apple.HIToolbox 0x93193858
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 496
29 com.apple.HIToolbox 0x9318d244
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*,
HandlerCallRec*) + 1284
30 com.apple.HIToolbox 0x9318c74c
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 372
31 com.apple.HIToolbox 0x931934ec
SendEventToEventTarget + 40
32 libwx_mac_core-2.5.3.dylib 0x003e71bc
wxApp::MacHandleOneEvent(void*) + 44 (icplusplus.c:27)
33 libwx_mac_core-2.5.3.dylib 0x003e7154
wxApp::MacDoOneEvent() + 156 (icplusplus.c:27)
34 libwx_mac_core-2.5.3.dylib 0x003e6d98 wxApp::MainLoop() +
36 (icplusplus.c:27)
35 libwx_base_carbon-2.5.3.dylib 0x0103ac30 wxEntry(int&, char**)
+ 96 (icplusplus.c:27)
36 sqlitecc 0x00016530 main + 40 (crt.c:300)
37 sqlitecc 0x000020c8 _start + 392 (crt.c:267)
38 dyld 0x8fe01048 _dyld_start + 60

Discussion

  • Moonwink

    Moonwink - 2006-04-23
    • assigned_to: nobody --> moonwink
     
  • Kurt Schwehr

    Kurt Schwehr - 2006-07-25

    Logged In: YES
    user_id=867950

    yup, it crashes on sqlite3, but loads sqlite2. Would be
    great to have the program just complain, rather than crash.

    Should be easy to check as the beginnings look like this:

    sqlite3: "SQLite format 3"
    sqlite2: "** This file contains an SQLite 2.1 database **"

    Also, where is sqlitecc3 in the downloads?

    Thanks for a great program!

    -kurt

     
  • Jens Miltner

    Jens Miltner - 2006-07-28

    Logged In: YES
    user_id=629488

    I don't even think you'll have to check for the file header: sqlite3_open is usually
    robust enough to return an error when trying to open an unsupported format.
    Maybe proper error checking is all that's required? (I have no idea how the
    program decides which databases are sqlite3 and which are sqlite2, so the
    culprit may actually be sqlite2's open command that doesn't return proper error
    codes...)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.