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

Crash on quit after opening a saved note #36

Closed
humdingerb opened this issue Dec 30, 2019 · 2 comments · Fixed by #50
Closed

Crash on quit after opening a saved note #36

humdingerb opened this issue Dec 30, 2019 · 2 comments · Fixed by #50

Comments

@humdingerb
Copy link
Member

  • Launch TakeNotes
  • Open a saved Note (e.g. double-click in Tracker)
  • ALT+Q to quit

--> Crash!

Debug information for team /Source/TakeNotes/source/objects.x86-cc2-debug/TakeNotes (18234):
CPU(s): 8x Intel Core™ i7-4712MQ
Memory: 15.92 GiB total, 881.93 MiB used
Haiku revision: hrev53649 Dec 23 2019 07:37:15 (BePC)

Active Threads:
	thread 18234: TakeNotes (main)
	thread 18241: w>TakeNotes: Save 
	thread 18247: w>Untitled Note 0 
	thread 18255: w>TakeNotes: Save 
	thread 18265: team 18234 debug task 
	thread 18261: w>testnote 
		state: Call (sb)

		Frame		IP			Function Name
		-----------------------------------------------
		00000000	0x6085e112	commpage_syscall + 0x2 
			Disassembly:
				commpage_syscall:
				0x6085e110:             89e1  mov %esp, %ecx
				0x6085e112:             0f34  sysenter  <--

		0x714cfa68	0x14a3891	debugger + 0x39 
		0x714cfaa8	0x14b50e9	__assert_fail + 0x69 
		0x714cfae8	0x152ce2e	BPrivate::processHeap::free(void*) + 0x5e 
		0x714cfb18	0x152e9b5	free + 0xa9 
		0x714cfb50	0x14a1517	operator delete(void) + 0x1f 
		0x714cfb80	0x195c42c	_._5BView + 0x138 
		0x714cfbb0	0x19262a3	_._11BScrollView + 0x27 
		0x714cfbe0	0x195c34d	_._5BView + 0x59 
		0x714cfc10	0x9156fe	NoteView::~NoteView(int) + 0x3e (/Source/TakeNotes/source/NoteView.cpp:106)
			Variables:
			this: 0x184bd610 {
				fReplicated: false
				fInDeskbar: false
				fHash: 0xc
				fMessenger: 0xd0003
				message: 0x4c4f4e47
				fBitmap: 0x1
			}
			__in_chrg: 3
@owenca
Copy link

owenca commented Dec 30, 2019

Didn't crash for me on x86_64 but did on x86_gcc2, as far back as 50ebf74.

@diversys
Copy link
Member

Crashes here with this back trace:

Active Threads:
	thread 22269: TakeNotes (main)
	thread 22276: w>TakeNotes: Save 
	thread 22279: w>TakeNotes: Open 
	thread 22281: w>Untitled Note 0 
	thread 22302: team 22269 debug task 
	thread 22301: w>sss 
		state: Exception (Segment violation)

		Frame		IP			Function Name
		-----------------------------------------------
		0x7fb05bcc2990	0xa5d5fdf3e5	BScrollBar::SetTarget(BView*) + 0x15 
			Disassembly:
				BScrollBar::SetTarget(BView*):
				0x000000a5d5fdf3d0:   488b8728010000  mov 0x128(%rdi), %rax
				0x000000a5d5fdf3d7:           4885c0  test %rax, %rax
				0x000000a5d5fdf3da:             7414  jz 0xd5fdf3f0
				0x000000a5d5fdf3dc:   83bf3001000001  cmp $0x1, 0x130(%rdi)
				0x000000a5d5fdf3e3:             743b  jz 0xd5fdf420
				0x000000a5d5fdf3e5: 48c780a800000000  mov $0x0, 0xa8(%rax) <--

			Frame memory:
				[0x7fb05bcc2988]  ........   ee 9b 01 d6 a5 00 00 00
		0x7fb05bcc29b0	0xa5d6019be9	BView::~BView() + 0xb9 
		0x7fb05bcc29e0	0xa5d5fdf478	BScrollBar::~BScrollBar() + 0x48 
		0x7fb05bcc2a00	0xa5d5fdf4bc	BScrollBar::~BScrollBar() + 0xc 
		0x7fb05bcc2a20	0xa5d6019b77	BView::~BView() + 0x47 
		0x7fb05bcc2a40	0xa5d5fe2f0c	BScrollView::~BScrollView() + 0xc 
		0x7fb05bcc2a60	0xa5d6019b77	BView::~BView() + 0x47 
		0x7fb05bcc2a80	0xb62266c8dc	NoteView::~NoteView() + 0xc 
		0x7fb05bcc2aa0	0xa5d6019b77	BView::~BView() + 0x47 
		0x7fb05bcc2ac0	0xa5d6019c5c	BView::~BView() + 0xc 
		0x7fb05bcc2b20	0xa5d6021771	BWindow::~BWindow() + 0xc1 
		0x7fb05bcc2b40	0xb62266e1cc	NoteWindow::~NoteWindow() + 0xc 
		0x7fb05bcc2b70	0xa5d5f682ce	BLooper::Quit() + 0x6e 
		0x7fb05bcc2dc0	0xb62266efbd	NoteWindow::MessageReceived(BMessage*) + 0x4ad 
		0x7fb05bcc2ff0	0xa5d60256ae	BWindow::DispatchMessage(BMessage*, BHandler*) + 0xb2e 
		0x7fb05bcc3080	0xa5d6020d1b	BWindow::task_looper() + 0x1bb 
		0x7fb05bcc30a0	0xa5d5f6705b	BLooper::_task0_(void*) + 0x1b 
		0x7fb05bcc30c0	0xf66d5952f7	thread_entry + 0x17 
		00000000	0x7fa58aec8260	commpage_thread_exit + 0 

This was referenced Jan 8, 2020
emily0618 added a commit to emily0618/TakeNotes that referenced this issue Jan 13, 2020
- Change NoteWindow to B_TITLED_WINDOW to make room for the dragger
- Make the scroll view fill the gap left by the moved dragger
- Resize NoteWindow to the correct height after opening a file
- Set fNoteText to the target of scrollview after opening a file
- Change background color of NoteText view instead of NoteView
- Set background color of NoteView and the dragger to the default
- Move the dragger to the lower-right corner of the window

Fixes HaikuArchives#39. May also fix HaikuArchives#36.
emily0618 added a commit to emily0618/TakeNotes that referenced this issue Jan 13, 2020
- Change NoteWindow to B_TITLED_WINDOW to make room for the dragger
- Make the scroll view fill the gap left by the moved dragger
- Resize NoteWindow to the correct height after opening a file
- Set fNoteText to the target of scrollview after opening a file
- Change background color of NoteText view instead of NoteView
- Set background color of NoteView and the dragger to the default
- Move the dragger to the lower-right corner of the window
- Update takenotes.png with new screenshot

Fixes HaikuArchives#39. May also fix HaikuArchives#36.
scottmc pushed a commit that referenced this issue Jan 13, 2020
- Change NoteWindow to B_TITLED_WINDOW to make room for the dragger
- Make the scroll view fill the gap left by the moved dragger
- Resize NoteWindow to the correct height after opening a file
- Set fNoteText to the target of scrollview after opening a file
- Change background color of NoteText view instead of NoteView
- Set background color of NoteView and the dragger to the default
- Move the dragger to the lower-right corner of the window
- Update takenotes.png with new screenshot

Fixes #39. May also fix #36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants