Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2641 closed Bug (fixed)

A magnetic-induced crash because of malformed url

Reported by: Waldorf Owned by: charles
Priority: Normal Milestone:
Component: libtransmission Version: 1.76+
Severity: Normal Keywords:


Apparently, I wasn't vary careful, and left in a space before the second url. Though one would expect something to go wrong, a crash might be over-the-top?

Background: I was experimenting with building a service for the mac to create a magnet-link from a hash and open it. I'm feeding it a raw hash of length 40, and added 2 trackers.

The Script:

on run {input, parameters}
	repeat with theHash in input
		if length of theHash is 40 then
			open location "magnet:?xt=urn:btih:" & theHash & "&tr="
		end if
	end repeat
	return input
end run

The interesting part from the crash:

Version:         1.76+ (9629)
Code Type:       X86-64 (Native)

Thread 0 Crashed:  Dispatch queue:
0   org.m0k.transmission          	0x00000001000c1a9f addTorrentToTier + 347
1   org.m0k.transmission          	0x00000001000c1c8f tr_announcerAddTorrent + 148
2   org.m0k.transmission          	0x0000000100082f45 torrentInit + 1062
3   org.m0k.transmission          	0x00000001000833de tr_torrentNew + 326
4   org.m0k.transmission          	0x000000010002ed85 -[Torrent initWithMagnetAddress:location:lib:] + 132 (Torrent.m:115)
5   org.m0k.transmission          	0x00000001000075ee -[Controller openMagnet:] + 114 (Controller.m:943)
6   org.m0k.transmission          	0x0000000100008898 -[Controller openURL:] + 160 (Controller.m:1116)
7   org.m0k.transmission          	0x00000001000062dc -[Controller handleOpenContentsEvent:replyEvent:] + 266 (Controller.m:765)
8          	0x00007fff80a36156 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 360
9          	0x00007fff80a35f86 _NSAppleEventManagerGenericHandler + 114
10                  	0x00007fff808da292 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 162
11                  	0x00007fff808da18b dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 32
12                  	0x00007fff808da095 aeProcessAppleEvent + 210
13           	0x00007fff8227a879 AEProcessAppleEvent + 48
14              	0x00007fff83b783d5 _DPSNextEvent + 1191
15              	0x00007fff83b77b41 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
16              	0x00007fff83b3d747 -[NSApplication run] + 395
17              	0x00007fff83b36468 NSApplicationMain + 364
18  org.m0k.transmission          	0x000000010000159e main + 136 (main.m:38)
19  org.m0k.transmission          	0x00000001000014f4 start + 52

Attachments (1)

Transmission_2009-12-04-232140_MacBookje.crash (37.2 KB) - added by Waldorf 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by livings124

  • Component changed from Transmission to libtransmission
  • Owner set to charles

comment:2 Changed 12 years ago by charles

Is there any way to repeat this crash with a build that's got line numbers in its debug information s.t. the crash report can tell /where/ the crash occurred?

Waldorf: is there an assertion message that goes along with this crash report?

comment:3 Changed 12 years ago by Waldorf

No, no assert msg. I do not know why, but in the crash logs Mac OS X produces, c line numbers are missing, however, they can be seen in the gdb backtrace.

#0  0x00000001000c1aa7 in addTorrentToTier (announcer=0x100449d60, tiers=0x113b76320, tor=0x10101b600) at /Users/maarten/Developer/Transmission/libtransmission/announcer.c:762
#1  0x00000001000c1c97 in tr_announcerAddTorrent (announcer=0x100449d60, tor=0x10101b600) at /Users/maarten/Developer/Transmission/libtransmission/announcer.c:790
#2  0x0000000100082f50 in torrentInit (tor=0x10101b600, ctor=0x113b75df0) at /Users/maarten/Developer/Transmission/libtransmission/torrent.c:685
#3  0x00000001000833e9 in tr_torrentNew (ctor=0x113b75df0, setmeError=0x0) at /Users/maarten/Developer/Transmission/libtransmission/torrent.c:752
#4  0x000000010002eda5 in -[Torrent initWithMagnetAddress:location:lib:] (self=0x113b75d70, _cmd=0x1000e7e9c, address=0x113b75cc0, location=0x0, lib=0x100631ab0) at /Users/maarten/Developer/Transmission/macosx/Torrent.m:115
#5  0x000000010000760e in -[Controller openMagnet:] (self=0x10062ca90, _cmd=0x1000e7598, address=0x113b75cc0) at /Users/maarten/Developer/Transmission/macosx/Controller.m:943
#6  0x00000001000088b8 in -[Controller openURL:] (self=0x10062ca90, _cmd=0x7fff842a7328, urlString=0x113b75cc0) at /Users/maarten/Developer/Transmission/macosx/Controller.m:1116
#7  0x00000001000062fc in -[Controller handleOpenContentsEvent:replyEvent:] (self=0x10062ca90, _cmd=0x1000e766d, event=0x100619be0, replyEvent=0x100619670) at /Users/maarten/Developer/Transmission/macosx/Controller.m:764
#8  0x00007fff80a36156 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
#9  0x00007fff80a35f86 in _NSAppleEventManagerGenericHandler ()
#10 0x00007fff808da292 in aeDispatchAppleEvent ()
#11 0x00007fff808da18b in dispatchEventAndSendReply ()
#12 0x00007fff808da095 in aeProcessAppleEvent ()
#13 0x00007fff8227a879 in AEProcessAppleEvent ()
#14 0x00007fff83b783d5 in _DPSNextEvent ()
#15 0x00007fff83b77b41 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#16 0x00007fff83b3d747 in -[NSApplication run] ()
#17 0x00007fff83b36468 in NSApplicationMain ()
#18 0x00000001000015be in main (argc=1, argv=0x7fff5fbff730) at /Users/maarten/Developer/Transmission/macosx/main.m:37

comment:4 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.80
  • Status changed from new to assigned

comment:5 Changed 12 years ago by charles

Waldorf, thanks for the gdb backtrace...

comment:6 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

r9693 libtransmission/announcer.c: (trunk libT) #2641 "a magnetic-induced crash because of malformed url" -- fixed in trunk for 1.80b2

comment:7 Changed 12 years ago by livings124

  • Milestone 1.80 deleted
Note: See TracTickets for help on using tickets.